MDL-8062 Remove name attribute from <form> and related javascript code cleanup (tested with FF, IE, Konq and Opera)

This commit is contained in:
skodak 2007-01-06 19:22:58 +00:00
parent ee7f231d08
commit d2ce367fb9
38 changed files with 135 additions and 125 deletions

View file

@ -85,7 +85,7 @@
}
print_heading(get_string("amend", "exercise")." ".get_string("gradeforstudentsassessment",
"exercise", $course->student));
echo "<form name=\"amendgrade\" method=\"post\" action=\"assessments.php\">\n";
echo "<form id=\"amendgrade\" method=\"post\" action=\"assessments.php\">\n";
echo "<input type=\"hidden\" name=\"aid\" value=\"$aid\" />\n";
echo "<input type=\"hidden\" name=\"action\" value=\"updategradinggrade\" />\n";
echo "<input type=\"hidden\" name=\"id\" value=\"$cm->id\" />\n";
@ -271,7 +271,7 @@
// set up heading, form and table
print_heading_with_help(get_string("editingassessmentelements", "exercise"), "elements", "exercise");
?>
<form name="form" method="post" action="assessments.php">
<form id="form" method="post" action="assessments.php">
<input type="hidden" name="id" value="<?php echo $cm->id ?>" />
<input type="hidden" name="action" value="insertelements" />
<center><table cellpadding="5" border="1">

View file

@ -1567,7 +1567,7 @@ function exercise_print_assessment_form($exercise, $assessment = false, $allowch
// now print the grading form with the teacher's comments if any
// FORM is needed for Mozilla browsers, else radio bttons are not checked
?>
<form name="assessmentform" method="post" action="assessments.php">
<form id="assessmentform" method="post" action="assessments.php">
<input type="hidden" name="id" value="<?php echo $cm->id ?>" />
<input type="hidden" name="aid" value="<?php echo $assessment->id ?>" />
<input type="hidden" name="action" value="updateassessment" />
@ -2017,9 +2017,9 @@ function exercise_print_assessment_form($exercise, $assessment = false, $allowch
if (isteacher($course->id)) {
// ...show two buttons...to resubmit or not to resubmit
echo "<input type=\"button\" value=\"".get_string("studentnotallowed", "exercise", $course->student)."\"
onclick=\"document.assessmentform.submit();\" />\n";
onclick=\"getElementById('assessmentform').submit();\" />\n";
echo "<input type=\"button\" value=\"".get_string("studentallowedtoresubmit", "exercise", $course->student)."\"
onclick=\"document.assessmentform.resubmit.value='1';document.assessmentform.submit();\" />\n";
onclick=\"getElementById('assessmentform').resubmit.value='1';getElementById('assessmentform').submit();\" />\n";
}
else {
// ... show save button
@ -2368,7 +2368,7 @@ function exercise_print_teacher_assessment_form($exercise, $assessment, $submiss
echo "</td></tr></table></center><br clear=\"all\" />\n";
?>
<form name="assessmentform" method="post" action="assessments.php">
<form id="assessmentform" method="post" action="assessments.php">
<input type="hidden" name="id" value="<?php echo $cm->id ?>" />
<input type="hidden" name="said" value="<?php echo $assessment->id ?>" />
<input type="hidden" name="sid" value="<?php echo $submission->id ?>" />
@ -2784,9 +2784,9 @@ function exercise_print_teacher_assessment_form($exercise, $assessment, $submiss
// ...and close the table and show two buttons...to resubmit or not to resubmit
echo "</table>\n";
echo "<br /><input type=\"button\" value=\"".get_string("studentnotallowed", "exercise", $course->student)."\"
onclick=\"document.assessmentform.submit();\" />\n";
onclick=\"getElementById('assessmentform').submit();\" />\n";
echo "<input type=\"button\" value=\"".get_string("studentallowedtoresubmit", "exercise", $course->student)."\"
onclick=\"document.assessmentform.resubmit.value='1';document.assessmentform.submit();\" />\n";
onclick=\"getElementById('assessmentform').resubmit.value='1';getElementById('assessmentform').submit();\" />\n";
echo "</center></form>\n";
}

View file

@ -69,7 +69,7 @@
$submission = get_record("exercise_submissions", "id", $sid);
print_heading(get_string("amendtitle", "exercise"));
?>
<form name="amendtitleform" action="submissions.php" method="post">
<form id="amendtitleform" action="submissions.php" method="post">
<input type="hidden" name="action" value="adminupdatetitle" />
<input type="hidden" name="id" value="<?php echo $cm->id ?>" />
<input type="hidden" name="sid" value="<?php echo $sid ?>" />

View file

@ -251,7 +251,7 @@
if (!$correctpass) {
print_simple_box_start("center");
echo "<form name=\"password\" method=\"post\" action=\"view.php\">\n";
echo "<form id=\"password\" method=\"post\" action=\"view.php\">\n";
echo "<input type=\"hidden\" name=\"id\" value=\"$cm->id\" />\n";
echo "<table cellpadding=\"7px\">";
if (isset($_POST['userpassword'])) {