mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
MDL-8062 Remove name attribute from <form> and related javascript code cleanup (tested with FF, IE, Konq and Opera)
This commit is contained in:
parent
ee7f231d08
commit
d2ce367fb9
38 changed files with 135 additions and 125 deletions
|
@ -169,7 +169,7 @@ function question_category_form($course, $current, $recurse=1, $showhidden=false
|
|||
echo "<input type=\"submit\" value=\"$streditcats\" />";
|
||||
echo "</form>";
|
||||
echo '</td></tr></table>';
|
||||
echo '<form method="post" action="edit.php" name="displayoptions">';
|
||||
echo '<form method="post" action="edit.php" id="displayoptions">';
|
||||
echo '<table><tr><td>';
|
||||
echo "<input type=\"hidden\" name=\"courseid\" value=\"{$course->id}\" />";
|
||||
echo '<input type="hidden" name="recurse" value="0" />';
|
||||
|
@ -177,7 +177,7 @@ function question_category_form($course, $current, $recurse=1, $showhidden=false
|
|||
if ($recurse) {
|
||||
echo ' checked="checked"';
|
||||
}
|
||||
echo ' onchange="document.displayoptions.submit(); return true;" />';
|
||||
echo ' onchange="getElementById(\'displayoptions\').submit(); return true;" />';
|
||||
print_string('recurse', 'quiz');
|
||||
// hide-feature
|
||||
echo '<br />';
|
||||
|
@ -186,7 +186,7 @@ function question_category_form($course, $current, $recurse=1, $showhidden=false
|
|||
if ($showhidden) {
|
||||
echo ' checked="checked"';
|
||||
}
|
||||
echo ' onchange="document.displayoptions.submit(); return true;" />';
|
||||
echo ' onchange="getElementById(\'displayoptions\').submit(); return true;" />';
|
||||
print_string('showhidden', 'quiz');
|
||||
echo '</td><noscript><td valign="center">';
|
||||
echo ' <input type="submit" value="'. get_string('go') .'" />';
|
||||
|
|
|
@ -225,7 +225,7 @@
|
|||
|
||||
?>
|
||||
|
||||
<form name="form" enctype="multipart/form-data" method="post" action="import.php">
|
||||
<form id="form" enctype="multipart/form-data" method="post" action="import.php">
|
||||
<input type="hidden" name="sesskey" value="<?php echo sesskey(); ?>" />
|
||||
<?php print_simple_box_start("center"); ?>
|
||||
<table cellpadding="5">
|
||||
|
|
|
@ -89,7 +89,7 @@ $QTYPES[$question->qtype]->print_question_form_end($question,
|
|||
function determineMinAndMax() {
|
||||
// This client-side script will determine the values for min and max
|
||||
// based on the input for answer and acceptederror.
|
||||
with(document.theform) {
|
||||
with(getElementById('theform')) {
|
||||
if (formula0.value=='') {
|
||||
alert('<?php print_string("missingformula","quiz") ?>');
|
||||
return false;
|
||||
|
@ -103,8 +103,8 @@ function determineMinAndMax() {
|
|||
} else if (isNaN(tolerance0.value)) {
|
||||
alert('<?php print_string("tolerancemustbenumeric","quiz") ?>');
|
||||
return false;
|
||||
} else if ('2' == document.theform['correctanswerformat[]'].value
|
||||
&& '0' == document.theform['correctanswerlength[]'].value) {
|
||||
} else if ('2' == getElementById('theform')['correctanswerformat[]'].value
|
||||
&& '0' == getElementById('theform')['correctanswerlength[]'].value) {
|
||||
alert('<?php print_string("zerosignificantfiguresnotallowed","quiz") ?>');
|
||||
return false;
|
||||
} else {
|
||||
|
|
|
@ -337,7 +337,7 @@ class question_calculated_qtype extends question_dataset_dependent_questiontype
|
|||
: 'significantfigures'), 'quiz', $i);
|
||||
}
|
||||
return '<input type="submit" onClick="'
|
||||
. "document.addform.regenerateddefid.value='$defid'; return true;"
|
||||
. "getElementById('addform').regenerateddefid.value='$defid'; return true;"
|
||||
.'" value="'. get_string('generatevalue', 'quiz') . '"/><br/>'
|
||||
. '<input type="text" size="3" name="calcmin[]" '
|
||||
. " value=\"$regs[2]\"/> & <input name=\"calcmax[]\" "
|
||||
|
|
|
@ -249,7 +249,7 @@
|
|||
|
||||
// Print the new-dataset table
|
||||
$addtable->data = array($addline);
|
||||
echo "<form name=\"addform\" method=\"post\" action=\"question.php\">
|
||||
echo "<form id=\"addform\" method=\"post\" action=\"question.php\">
|
||||
<input type=\"hidden\" name=\"regenerateddefid\" value=\"0\"/>
|
||||
<input type=\"hidden\" name=\"id\" value=\"$question->id\"/>
|
||||
<input type=\"hidden\" name=\"category\" value=\"$question->category\"/>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<form name="theform" method="post" action="question.php">
|
||||
<form id="theform" method="post" action="question.php">
|
||||
<center>
|
||||
<table cellpadding="5">
|
||||
<?php if (!empty($datasets)) { ?>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<form name="theform" method="post" action="question.php">
|
||||
<form id="theform" method="post" action="question.php">
|
||||
<center>
|
||||
<table cellpadding="5">
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<form name="theform" method="post" action="question.php">
|
||||
<form id="theform" method="post" action="question.php">
|
||||
<center>
|
||||
<table cellpadding="5">
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<form name="theform" method="post" action="question.php">
|
||||
<form id="theform" method="post" action="question.php">
|
||||
<table cellpadding="5">
|
||||
|
||||
<tr valign="top">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue