]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-8062 1.3 Remove name attribute from <form> and fix focus everywhere - more change...
authorskodak <skodak>
Thu, 4 Jan 2007 21:32:36 +0000 (21:32 +0000)
committerskodak <skodak>
Thu, 4 Jan 2007 21:32:36 +0000 (21:32 +0000)
120 files changed:
admin/auth.php
admin/auth_config.php
admin/enrol.php
admin/enrol_config.php
admin/lang.php
admin/langdoc.php
admin/langimport.php
admin/mnet/access_control.php
admin/register.php
admin/roles/assign.html
admin/roles/manage.html
admin/roles/manage.php
admin/roles/override.html
admin/search.php
admin/settings.php
admin/upgradesettings.php
admin/xmldb/actions/edit_field/edit_field.class.php
admin/xmldb/actions/edit_index/edit_index.class.php
admin/xmldb/actions/edit_key/edit_key.class.php
admin/xmldb/actions/edit_sentence/edit_sentence.class.php
auth/cas/index_form.html
backup/backup_check.html
backup/backup_form.html
backup/restore_form.html
blocks/loancalc/block_loancalc.php
blocks/login/block_login.php
blocks/search/block_search.php
blog/preferences.html
calendar/event_delete.html
calendar/event_edit.html
calendar/event_new.html
calendar/preferences.html
course/category.php
course/editsection.html
course/groups-edit.html
course/importstudents.html
course/importstudents.php
course/index.php
course/lib.php
course/mod_delete.html
course/pending-reject.html
course/report/participation/index.php
course/reset.php
course/scales.php
course/search.php
enrol/manual/enrol.html
enrol/mnet/allowed_courses.php
enrol/mnet/remote_enrolment.html
error/index.php
files/index.php
grade/exceptions.html
grade/lib.php
lib/rsslib.php
lib/speller/controls.html
message/search.html
message/send.php
message/settings.html
mod/assignment/config.html
mod/assignment/lib.php
mod/assignment/type/common.html
mod/chat/config.html
mod/chat/gui_header_js/chatinput.php
mod/choice/view.php
mod/data/config.html
mod/data/field.php
mod/data/lib.php
mod/data/preset.php
mod/data/templates.php
mod/forum/config.html
mod/forum/lib.php
mod/forum/prune.html
mod/forum/subscriber.html
mod/glossary/config.html
mod/glossary/editcategories.html
mod/glossary/editcategories.php
mod/glossary/formats.php
mod/glossary/import.html
mod/glossary/view.php
mod/hotpot/config.html
mod/hotpot/lib.php
mod/hotpot/report/overview/report.php
mod/hotpot/view.php
mod/journal/edit.html
mod/lams/config.html
mod/lesson/action/addbranchtable.php
mod/lesson/action/addpage.php
mod/lesson/action/continue.html
mod/lesson/action/editpage.php
mod/lesson/essay.php
mod/lesson/highscores.php
mod/lesson/importppt.php
mod/lesson/report.php
mod/lesson/view.php
mod/quiz/attempt.php
mod/quiz/editlib.php
mod/quiz/jstimer.php
mod/quiz/report/analysis/report.php
mod/quiz/report/overview/report.php
mod/scorm/config.html
mod/scorm/locallib.php
mod/survey/mod.html
mod/survey/report.php
mod/survey/view.php
mod/wiki/admin.php
mod/wiki/lib.php
mod/wiki/mod.html
mod/wiki/view.php
mod/workshop/assessment_grading_form.html
mod/workshop/assessments.php
mod/workshop/locallib.php
mod/workshop/mod.html
mod/workshop/submissions.php
mod/workshop/view.php
search/query.php
sso/hive/expired.php
user/edit.html
user/edit.php
user/extendenrol.php
user/index.php
user/message.html

index 0b2d3f73231d189bdc624d4a2eca6cd1f317dca7..2dba551f1ce7ba411ac5837f7163e63ea6787a0d 100644 (file)
@@ -216,7 +216,7 @@ foreach ($displayauths as $auth => $name) {
 admin_externalpage_print_header($adminroot);
 print_simple_box(get_string('configauthenticationplugins', 'admin'), 'center', '700');
 
-echo "<form $CFG->frametarget name=\"authmenu\" method=\"post\" action=\"auth.php\">";
+echo "<form $CFG->frametarget id=\"authmenu\" method=\"post\" action=\"auth.php\">";
 echo "<input type=\"hidden\" name=\"sesskey\" value=\"".$USER->sesskey."\">";
 print_table($table);
 
index 47e2516e222c0da9ee398f8f4ad993dcdb577bec..578ca0ce5b6b479f897cae0df790a29ba7663e16 100644 (file)
@@ -62,12 +62,8 @@ asort($options);
 admin_externalpage_print_header($adminroot);
 
 // choose an authentication method
-echo "<form $CFG->frametarget name=\"authmenu\" method=\"post\" action=\"auth_config.php\">\n";
+echo "<form $CFG->frametarget id=\"authmenu\" method=\"post\" action=\"auth_config.php\">\n";
 echo "<input type=\"hidden\" name=\"sesskey\" value=\"".$USER->sesskey."\">\n";
-echo "<div align=\"center\"><p><b>\n";
-echo get_string('chooseauthmethod').': ';
-choose_from_menu ($options, "auth", $auth, '', "document.location='auth_config.php?sesskey=$USER->sesskey&auth='+document.authmenu.auth.options[document.authmenu.auth.selectedIndex].value", '');
-echo "</b></p></div>\n\n";
 
 // auth plugin description
 print_simple_box_start('center', '80%');
@@ -118,10 +114,18 @@ function print_auth_lock_options ($auth, $user_fields, $helptext, $retrieveopts,
     foreach ($user_fields as $field) {
 
         // Define some vars we'll work with
-        optional_variable($pluginconfig->{"field_map_$field"}, '');
-        optional_variable($pluginconfig->{"field_updatelocal_$field"}, '');
-        optional_variable($pluginconfig->{"field_updateremote_$field"}, '');
-        optional_variable($pluginconfig->{"field_lock_$field"}, '');
+        if (isset($pluginconfig->{"field_map_$field"})) {
+            $pluginconfig->{"field_map_$field"} = '';
+        }
+        if (isset($pluginconfig->{"field_updatelocal_$field"})) {
+            $pluginconfig->{"field_updatelocal_$field"} = '';
+        }
+        if (isset($pluginconfig->{"field_updateremote_$field"})) {
+            $pluginconfig->{"field_updateremote_$field"} = '';
+        }
+        if (isset($pluginconfig->{"field_lock_$field"})) {
+            $pluginconfig->{"field_lock_$field"} = '';
+        }
 
         // define the fieldname we display to the  user
         $fieldname = $field;
index 6d07cdd9398b8264e9c19c0b85dd00325ee109b4..3f6cfb2fdb61620e718836e68305d75fe5428ef7 100644 (file)
@@ -52,7 +52,7 @@
 
     print_simple_box(get_string('configenrolmentplugins', 'admin'), 'center', '700');
 
-    echo "<form $CFG->frametarget name=\"enrolmenu\" method=\"post\" action=\"enrol.php\">";
+    echo "<form $CFG->frametarget id=\"enrolmenu\" method=\"post\" action=\"enrol.php\">";
     echo "<input type=\"hidden\" name=\"sesskey\" value=\"".$USER->sesskey."\" />";
 
     $table = new stdClass();
index 925546cab857050e7eeb419bcc625d41aa7541e9..f69e7d547761e75e62f93e6e49b0d272d9cbfb65 100644 (file)
 
     admin_externalpage_print_header($adminroot);
 
-    echo "<form $CFG->frametarget name=\"enrolmenu\" method=\"post\" action=\"enrol_config.php\">";
+    echo "<form $CFG->frametarget id=\"enrolmenu\" method=\"post\" action=\"enrol_config.php\">";
     echo "<input type=\"hidden\" name=\"sesskey\" value=\"".$USER->sesskey."\">";
-    echo "<div align=\"center\"><p><b>";
-
-
-/// Choose an enrolment method
-    echo get_string('chooseenrolmethod').': ';
-    choose_from_menu ($options, "enrol", $enrol, "",
-                      "document.location='enrol_config.php?enrol='+document.enrolmenu.enrol.options[document.enrolmenu.enrol.selectedIndex].value", "");
-
-    echo "</b></p></div>";
 
 /// Print current enrolment type description
     print_simple_box_start("center", "80%");
index 83a4e06fd394b4e620bcad339936652a61a2044b..8d1b8428355e35a6e98bf9f96dc6c94e504b3f37 100644 (file)
             @include("$langdir/$currentfile");
 
             if ($editable) {
-                echo "<form name=\"$currentfile\" action=\"lang.php\" method=\"post\">";
+                echo "<form id=\"$currentfile\" action=\"lang.php\" method=\"post\">";
             }
             echo "<table summary=\"\" width=\"100%\" cellpadding=\"2\" cellspacing=\"3\" border=\"0\" class=\"generalbox\">";
             $linescounter = 0;
index 25ff92dcdf83239a2146c263ebc7e34004c65bb2..d6d2ebf59f1fd13261d8642c34c8a68bd2289d0c 100755 (executable)
@@ -169,7 +169,7 @@ $langdir/$currentfile")."</font></p>";
         echo "<td align=\"center\">\n";
 
         if ($editable) {
-            echo "<form name=\"$currentfile\" action=\"langdoc.php\" method=\"post\">";
+            echo "<form id=\"$currentfile\" action=\"langdoc.php\" method=\"post\">";
             echo '<input type="hidden" name="sesskey" value="'.$USER->sesskey.'" />';
             echo '<input type="hidden" name="currentfile" value="'.$currentfile.'" />';
 
index 5c4b7fa8d2605c79a86978f29f39898e8c6afb7c..f671df4985c29fde629a3e3324de307656bcfa9b 100755 (executable)
             print_simple_box_start('center','60%');
             echo '<table summary="" width="100%">';
             echo '<tr><td align="center" valign="top">';
-            echo '<form name="uninstallform" action="langimport.php?mode=4" method="post">';
+            echo '<form id="uninstallform" action="langimport.php?mode=4" method="post">';
             echo '<input name="sesskey" type="hidden" value="'.sesskey().'" />';
             unset($CFG->langlist);   // ignore admin's langlist
             $installedlangs = get_list_of_languages();
             echo '</select>';
             echo '<br /><input type="submit" value="'.get_string('uninstall','admin').'" />';
             echo '</form>';
-            echo '<form name="updateform" action="langimport.php?mode=5" method="post">';
+            echo '<form id="updateform" action="langimport.php?mode=5" method="post">';
             echo '<br /><input type="submit" value="'.get_string('updatelangs','admin').'" />';
             echo '</form>';
 
 
             /// if this language pack is not already installed, then we allow installation
 
-            echo '<form name="installform" method="post" action="langimport.php?mode=2">';
+            echo '<form id="installform" method="post" action="langimport.php?mode=2">';
             echo '<input name="sesskey" type="hidden" value="'.sesskey().'" />';
             echo '<label for="pack">'.get_string('availablelangs','admin')."</label><br />\n";
             if ($remote) {
index 43036863743cda6dcfbd571b3fe093dc2db0b737..046159ff3c5442aac6e040615cc9ecc626f04f31 100644 (file)
@@ -171,7 +171,7 @@ print_simple_box_start('center','90%','','20');
 
 ?>
  <div class="mnetaddtoaclform"> 
-  <form name="mnetaddtoacl" method="post">
+  <form id="mnetaddtoacl" method="post">
     <input type="hidden" name="sesskey" value="<?php echo $sesskey; ?>">
 <?php
 
index 9bb7a369de78565a4ac5109619f3a369d1aa9566..a7e2bd7135bae664597773ca10b0026dd3646563 100644 (file)
@@ -47,7 +47,7 @@
 
     print_simple_box_start("center", "");
 
-    echo "<form name=\"form\" action=\"http://moodle.org/register/\" method=\"post\">\n";
+    echo "<form id=\"form\" action=\"http://moodle.org/register/\" method=\"post\">\n";
     echo "<table cellpadding=\"9\" border=\"0\">\n";
     echo "<tr valign=\"top\">\n";
     echo "<td align=\"center\" colspan=\"2\">".get_string("location")."</td>\n";
index a7c87854bd7aac51310905911397816ba799be14..7286706f5021b5d03bee7fd8aa14f0f339c12779 100755 (executable)
@@ -1,4 +1,4 @@
-<form name="assignform" id="assignform" method="post" action="">
+<form id="assignform" method="post" action="">
 <input type="hidden" name="previoussearch" value="<?php p($previoussearch) ?>" />
 <input type="hidden" name="userid" value="<?php p($userid) ?>" />
 <input type="hidden" name="courseid" value="<?php p($courseid) ?>" />
@@ -11,9 +11,9 @@
           <label for="removeselect"><?php print_string('existingusers', 'role', count($contextusers)); ?></label>
           <br />
           <select name="removeselect[]" size="20" id="removeselect" multiple="multiple"
-                  onfocus="document.assignform.add.disabled=true;
-                           document.assignform.remove.disabled=false;
-                           document.assignform.addselect.selectedIndex=-1;">
+                  onfocus="getElementById('assignform').add.disabled=true;
+                           getElementById('assignform').remove.disabled=false;
+                           getElementById('assignform').addselect.selectedIndex=-1;">
           <?php
               foreach ($contextusers as $contextuser) {
                   $fullname = fullname($contextuser, true);
@@ -44,9 +44,9 @@
           <label for="addselect"><?php print_string('potentialusers', 'role', $usercount); ?></label>
           <br />
           <select name="addselect[]" size="20" id="addselect" multiple="multiple"
-                  onfocus="document.assignform.add.disabled=false;
-                           document.assignform.remove.disabled=true;
-                           document.assignform.removeselect.selectedIndex=-1;">
+                  onfocus="getElementById('assignform').add.disabled=false;
+                           getElementById('assignform').remove.disabled=true;
+                           getElementById('assignform').removeselect.selectedIndex=-1;">
           <?php
 
               if (!empty($searchtext)) {
          <br />
          <label for="searchtext" class="accesshide"><?php p($strsearch) ?></label>
          <input type="text" name="searchtext" id="searchtext" size="30" value="<?php p($searchtext, true) ?>"
-                  onfocus ="document.assignform.add.disabled=true;
-                            document.assignform.remove.disabled=true;
-                            document.assignform.removeselect.selectedIndex=-1;
-                            document.assignform.addselect.selectedIndex=-1;"
+                  onfocus ="getElementById('assignform').add.disabled=true;
+                            getElementById('assignform').remove.disabled=true;
+                            getElementById('assignform').removeselect.selectedIndex=-1;
+                            getElementById('assignform').addselect.selectedIndex=-1;"
                   onkeydown = "var keyCode = event.which ? event.which : event.keyCode;
                                if (keyCode == 13) {
-                                    document.assignform.previoussearch.value=1;
-                                    document.assignform.submit();
+                                    getElementById('assignform').previoussearch.value=1;
+                                    getElementById('assignform').submit();
                                } " />
          <input name="search" id="search" type="submit" value="<?php p($strsearch) ?>" />
          <?php
index 7748d8f3cea8842627957a845f65bbed1ea5d0e0..7401712c643c52a1741263b218621288194565e5 100755 (executable)
@@ -17,7 +17,7 @@
 <div align="right">
 <a href="manage.php?roleid=<?php p($roleid); ?>&amp;action=duplicate"><?php print_string('duplicaterole'); ?></a>
 </div>
-<form name="rolesform" action="manage.php" method="post">
+<form id="rolesform" action="manage.php" method="post">
 <input type="hidden" name="roleid" value="<?php p($roleid) ?>" />
 <input type="hidden" name="sesskey" value="<?php p(sesskey()) ?>" />
 <input type="hidden" name="action" value="<?php if ($action != 'view') { echo p($action); } ?>" />
index 02c37ee3c403a5db04d5727de617620da71d7edc..f630aa5ca81770ef7db51092f2b883be1007d317 100755 (executable)
         echo '<div align="center" class="selector">';
         if ($action == 'view') {
             echo get_string('selectrole', 'role').': ';
-            echo '<form style="display:inline;" name="switchrole" action="manage.php" method="get">';
+            echo '<form style="display:inline;" id="switchrole" action="manage.php" method="get">';
             echo '<input type="hidden" name="action" value="view" />';
             choose_from_menu ($roleoptions, 'roleid', $roleid, get_string('listallroles', 'role').'...', $script='switchrole.submit()');
             echo '</form>';
-            echo '<form style="display:inline;" name="editrole" action="manage.php" method="get">';
+            echo '<form style="display:inline;" id="editrole" action="manage.php" method="get">';
             echo '<input type="hidden" name="roleid" value="'.$roleid.'" />';
             echo '<input type="hidden" name="action" value="edit" />';
             echo '<input type="submit" value="'.get_string('edit').'" />';
index b03224f1a6dab421014f8f7a047fa454ca06f9c3..8a9800bb050b59496ba7393393bde64c2080e1ff 100755 (executable)
@@ -5,7 +5,7 @@
     $strprohibit = get_string('prohibit','role');
 ?>
 
-<form name="overrideform" action="override.php" method="post">
+<form id="overrideform" action="override.php" method="post">
     <input type="hidden" name="contextid" value="<?php p($contextid) ?>" />
     <input type="hidden" name="roleid" value="<?php p($roleid) ?>" />
     <input type="hidden" name="sesskey" value="<?php p(sesskey()) ?>" />
index f33028ef8cdef9c2debe10538f6f716243c90c81..c68ef13801e4ef57903b0a52588c975d7b78a0b0 100644 (file)
@@ -58,7 +58,7 @@ if ($statusmsg != '') {
 
 $resultshtml = search_settings_html(admin_get_root(), $query);
 
-echo '<form action="search.php" method="post" name="adminsettings" id="adminsettings">';
+echo '<form action="search.php" method="post" id="adminsettings">';
 echo '<input type="hidden" name="sesskey" value="' . sesskey() . '" />';
 echo '<input type="hidden" name="query" value="' . s($query) . '" />';
 echo '<fieldset>';
index 43d6ac667460dff2f2d55a27926e2adcc7c7a09b..9279b9700caed6056bcaee80e8ba3bbe61813ac2 100644 (file)
@@ -115,7 +115,7 @@ if ($statusmsg != '') {
 
 // ---------------------------------------------------------------------------------------------------------------
 
-echo '<form action="settings.php" method="post" name="adminsettings" id="adminsettings">';
+echo '<form action="settings.php" method="post" id="adminsettings">';
 echo '<input type="hidden" name="section" value="' . $PAGE->section . '" />';
 echo '<input type="hidden" name="sesskey" value="' . $USER->sesskey . '" />';
 echo '<input type="hidden" name="return" value="' . $return . '" />';
index 7bcf6ce44edde303c0eb1879e2922a0dd85e777b..3b6482c4202c651760941fc221de7108bc8a379a 100644 (file)
@@ -58,7 +58,7 @@ admin_externalpage_print_header($adminroot);
 
 print_simple_box(get_string('upgradesettingsintro','admin'),'','100%','',5,'generalbox','');
 
-echo '<form action="upgradesettings.php" method="post" name="adminsettings" id="adminsettings">';
+echo '<form action="upgradesettings.php" method="post" id="adminsettings">';
 echo '<input type="hidden" name="sesskey" value="' . sesskey() . '" />';
 echo '<fieldset>';
 echo '<div class="clearer"><!-- --></div>';
index 71e0b04f42eae4904e793d84a5d1813f41cf32f4..bd833613cceb0056f976f545425e9a63a823e8b0 100644 (file)
@@ -98,7 +98,7 @@ class edit_field extends XMLDBAction {
         $origstructure =& $dbdir->xml_file->getStructure();
 
     /// Add the main form
-        $o = '<form name="form" id="form" action="index.php" method="post">';
+        $o = '<form id="form" action="index.php" method="post">';
         $o.= '    <input type="hidden" name ="dir" value="' . str_replace($CFG->dirroot, '', $dirpath) . '" />';
         $o.= '    <input type="hidden" name ="table" value="' . $tableparam .'" />';
         $o.= '    <input type="hidden" name ="field" value="' . $fieldparam .'" />';
index 5e7a5e7f715035aa209349cf4e8393484d699483..4aaaf8b9fc7c5f879f998769b78fb4f43c56050c 100644 (file)
@@ -98,7 +98,7 @@ class edit_index extends XMLDBAction {
         $origstructure =& $dbdir->xml_file->getStructure();
 
     /// Add the main form
-        $o = '<form name="form" id="form" action="index.php" method="post">';
+        $o = '<form id="form" action="index.php" method="post">';
         $o.= '    <input type="hidden" name ="dir" value="' . str_replace($CFG->dirroot, '', $dirpath) . '" />';
         $o.= '    <input type="hidden" name ="table" value="' . $tableparam .'" />';
         $o.= '    <input type="hidden" name ="index" value="' . $indexparam .'" />';
index 68812de24daad220d88e8a0936853064c2b8362a..24d316386a767d7f6eaa131252ce11be5b9b3dce 100644 (file)
@@ -98,7 +98,7 @@ class edit_key extends XMLDBAction {
         $origstructure =& $dbdir->xml_file->getStructure();
 
     /// Add the main form
-        $o = '<form name="form" id="form" action="index.php" method="post">';
+        $o = '<form id="form" action="index.php" method="post">';
         $o.= '    <input type="hidden" name ="dir" value="' . str_replace($CFG->dirroot, '', $dirpath) . '" />';
         $o.= '    <input type="hidden" name ="table" value="' . $tableparam .'" />';
         $o.= '    <input type="hidden" name ="key" value="' . $keyparam .'" />';
index 24bf5902722e11f50b0e78d331861c0fdd01a7e7..300f192f908f7f3cac9e1956c1eebfa6695873e3 100644 (file)
@@ -114,7 +114,7 @@ class edit_sentence extends XMLDBAction {
             $values = $statement->getValuesFromInsertSentence($sentence);
 
         /// Add the main form
-            $o = '<form name="form" id="form" action="index.php" method="post">';
+            $o = '<form id="form" action="index.php" method="post">';
             $o.= '    <input type="hidden" name ="dir" value="' . str_replace($CFG->dirroot, '', $dirpath) . '" />';
             $o.= '    <input type="hidden" name ="statement" value="' . $statementparam .'" />';
             $o.= '    <input type="hidden" name ="sentence" value="' . $sentenceparam .'" />';
index 0cc529d5cd20b003a2d15c5042dde81d72f15734..78ee639482be81ca38a0c7bc1e01fe15255ecf1d 100644 (file)
         (<?php print_string("cookiesenabled");?>) 
          <?php helpbutton("cookies", get_string("cookiesenabled"))?><br /><?php formerr($errormsg) ?>
       </p>
-      <form action="index.php" method="post" name="login" id="login">
+      <form action="index.php" method="post" id="login">
         <table border="0" align="center" style="font-size: small">
         <tr>
           <td width="100%">
-            <input type="hidden" name="username" value="cas" />
-            <input type="hidden" name="password" value="cas" />
+            <input type="hidden" name="username" id="username" value="cas" />
+            <input type="hidden" name="password" id="password" value="cas" />
             <input type="submit" value="<?php print_string("auth_cas_logincas", "auth") ?>" />
           </td>
         </tr>
@@ -29,7 +29,7 @@
 <?php if ($CFG->guestloginbutton) {  ?>
       <hr width="80%" />
       <p><?php print_string("someallowguest") ?>:</p>
-        <form action="index.php" method="post" name="guestlogin">
+        <form action="index.php" method="post" id="guestlogin">
           <input type="hidden" name="username" value="guest" />
           <input type="hidden" name="password" value="guest" />
           <input type="submit" value="<?php print_string("loginguest") ?>" />
@@ -42,7 +42,7 @@
 ?>
       <hr width="80%" />
       <p><?php print_string("forgotten") ?></p> 
-        <form action="<?php p($changepassword) ?>" method="get" name="changepassword">
+        <form action="<?php p($changepassword) ?>" method="get" id="changepassword">
           <input type="submit" value="<?php p($changebuttonname) ?>" />
         </form>
 <?php } ?>
@@ -56,7 +56,7 @@
                  print_string("loginsteps", "", "signup.php");
 ?>
                  <div align="center">
-                   <form action="signup.php" method="get" name="signup">
+                   <form action="signup.php" method="get" id="signup">
                    <input type="submit" value="<?php print_string("startsignup") ?>" />
                    </form>
                  </div>
@@ -71,7 +71,7 @@
 ?>
 
                  <div align="center">
-                    <form action="signup.php" method="get" name="signup">
+                    <form action="signup.php" method="get" id="signup">
                     <input type="submit" value="<?php print_string("startsignup") ?>" />
                     </form>
                  </div>
index af5e194c38ecdea565728c6d5560faf7687fbad5..225ff656eb73739a72e60f9d2b3285decebde390 100644 (file)
@@ -35,7 +35,7 @@
     }
 ?>
 
-<form name="form" method="post" action="backup.php">
+<form id="form" method="post" action="backup.php">
 <table cellpadding="5">
 <?php
 
index 534eac496e9a822457dd43af077a844fc9542f38..354c524c56b21a1b382479d2e25303b043c2732c 100644 (file)
@@ -113,7 +113,7 @@ function selectItemInCheckboxByName(formId, checkName, checked ) {
 -->
 </script>
 
-<form name="form1" id="form1" method="post" action="backup.php">
+<form id="form1" method="post" action="backup.php">
 <table cellpadding="5">
 <?php
     //Now, check modules and info and show posibilities
index 50094b1a148ff155098dabf5f8a2d57697d84f92..87baf98e2abb754bbc6613655c2b366d80705233 100644 (file)
@@ -159,7 +159,7 @@ function selectItemInCheckboxByName(formId, checkName, checked ) {
 -->
 </script>
 
-<form name="form1" id="form1" method="post" action="restore.php">
+<form id="form1" method="post" action="restore.php">
 <table cellpadding="5">
 <?php
 
index df7ce8c58959229ea41b13916eeb56a2ce2ef530..4a3c7f37786a1b44d59d93710be8d2141f702fd7 100644 (file)
@@ -153,7 +153,7 @@ function comp(v) { // general entry point for all cases
 <title></title>
 
 <h1></h1>
-<form method="post" id="vbankform" name="vbankform">
+<form method="post" id="vbankform">
             <table>
                 <tr>
                     <td colspan="2">'.get_string('amountofloan','block_loancalc').'</td>
index decfe2cd44fac2fee25cc1364a23c4f2a38438cb..2db70cead677f14d6a72615cd9d0d12a188826a4 100644 (file)
@@ -42,7 +42,7 @@ class block_login extends block_base {
 
         if (empty($USER->loggedin) or isguest()) {   // Show the block
 
-            $this->content->text .= "\n".'<form class="loginform" name="login" method="post" action="'.$wwwroot.'/login/index.php">';
+            $this->content->text .= "\n".'<form class="loginform" id="login" method="post" action="'.$wwwroot.'/login/index.php">';
 
             $this->content->text .= '<div class="c1"><label for="login_username">'.get_string('username').'</label>: ';
             $this->content->text .= '<input type="text" name="username" id="login_username" value="'.$username.'" /></div>';
index f06d6c9d07f35695b3f41158c1ae61c6e4e352fb..365ad2f8868ffcb269f881406ff1c6cccc798c96 100644 (file)
@@ -50,7 +50,7 @@
         
         //basic search form
         $this->content->text =
-            '<form name="query" method="get" action="'. $CFG->wwwroot .'/search/query.php"><div>'
+            '<form id="searchquery" method="get" action="'. $CFG->wwwroot .'/search/query.php"><div>'
           . '<label for="block_search_q">'. $label .'</label>'
           . '<input id="block_search_q" type="text" name="query_string" length="50" />'
           . '<input type="submit" value="'.$button.'" />'
index 95fc363d97e3d74aadb6645677af2fb9636e5578..ef2267494110514dd70f8821aad8ac95b1fee1ba 100755 (executable)
@@ -1,4 +1,4 @@
-<form method="post" action="preferences.php" name="entry" id="entry">
+<form method="post" action="preferences.php" id="entry">
 <table cellpadding="9" cellspacing="0">
 <tr>
     <td><?php print_string('pagesize', 'blog');?>:</td>
index 6383d50945a98299cdda564c70c13b83a3ee6d13..8ebe69fb51ed13d0d5cb5fe9f88604f3324dbdf8 100644 (file)
@@ -1,7 +1,7 @@
 <table style="margin: auto;">
   <tr>
     <td>
-      <form method="get" action="event.php" name="delete">
+      <form method="get" action="event.php" id="delete">
       <p>
       &nbsp;
       <input type="submit" value=" <?php print_string('delete') ?> " />
@@ -18,7 +18,7 @@
     </td>
     <?php if($repeatcount > 1) { ?>
     <td>
-      <form method="get" action="event.php" name="delete">
+      <form method="get" action="event.php" id="delete">
       <p>
       &nbsp;
       <input type="submit" value=" <?php print_string('deleteall') ?> " />
@@ -35,7 +35,7 @@
     </td>
     <?php } ?>
     <td>
-      <form method="get" action="view.php" name="cancel">
+      <form method="get" action="view.php" id="cancel">
       <p>
       &nbsp;
       <input type="submit" value=" <?php print_string('cancel') ?> ">
index 3a33f0bf0dd47b75813da91fcab9f185d7961ef2..8e612edc82d41ce104a26b4702585f48be285eba 100644 (file)
@@ -1,4 +1,4 @@
-<form method="post" action="event.php" name="eventform">
+<form method="post" action="event.php" id="eventform">
 <table cellpadding="5" cellspacing="0">
   <tr>
     <td style="vertical-align: top; text-align: right;">
index 92cda132af21d7ca10c233478ff2cc49cd1d63db..47af5684651c449ed519cf08d4ea0f3c4dd3d65e 100644 (file)
@@ -2,7 +2,7 @@
     // The following is a hack to fix bug 1488
     $course = get_record('course', 'id', ($form->courseid) ? $form->courseid : $site->id);
 ?>
-<form method="post" action="event.php" name="eventform">
+<form method="post" action="event.php" id="eventform">
 <table cellpadding="5">
   <tr>
     <td style="vertical-align: top; text-align: right;">
index e25a17462c260ea8a8f10b5d24a27e0c6f32c7f4..b4e52c07aef023488437c32b0d6065f8d2b39b14 100644 (file)
@@ -1,4 +1,4 @@
-<form method="post" action="preferences.php" name="form">
+<form method="post" action="preferences.php" id="prefform">
 
 <table class="formtable">
 <tr>
index 3cfc17795f42a21afb12f4426b8936f293eab0a1..d667bf3b9578880cf29a7e4b3e9ec7f04fbd628a 100644 (file)
         $strrequireskey     = get_string("requireskey");
 
 
-        echo '<form name="movecourses" action="category.php" method="post">';
+        echo '<form id="movecourses" action="category.php" method="post">';
         echo '<input type="hidden" name="sesskey" value="'.sesskey().'" />';
         echo '<table align="center" border="0" cellspacing="2" cellpadding="4" class="generalbox"><tr>';
         echo '<th scope="col">'.$strcourses.'</th>';
             echo '<tr><td colspan="3" align="right">';
             echo '<br />';
             unset($displaylist[$category->id]);
-            choose_from_menu ($displaylist, "moveto", "", get_string("moveselectedcoursesto"), "javascript:document.movecourses.submit()");
+            choose_from_menu ($displaylist, "moveto", "", get_string("moveselectedcoursesto"), "javascript: getElementById('movecourses').submit()");
             echo '<input type="hidden" name="id" value="'.$category->id.'" />';
             echo '</td></tr>';
         }
 
     if (has_capability('moodle/category:update', $context)) {           /// Print form to rename the category
         $strrename= get_string('rename');
-        echo '<form name="renameform" action="category.php" method="post">';
+        echo '<form id="renameform" action="category.php" method="post">';
         echo '<input type="hidden" name="id" value="'.$category->id.'" />';
         echo '<input type="hidden" name="sesskey" value="'.$USER->sesskey.'" />';
         echo '<input type="text" size="30" name="rename" value="'.s($category->name).'" alt="'.$strrename.'" />';
index 913d0b07af8ad2dad3c6390db64ef76ac48e1554..46ec51f170d7d1f886730d0eda4b6a7d2a5eb0a3 100644 (file)
@@ -1,5 +1,5 @@
 <center>
-<form name="theform" method="post" action="editsection.php">
+<form id="theform" method="post" action="editsection.php">
 <table cellpadding="5">
 <tr valign="top">
     <td align="right"><p><b><?php print_string("summary") ?>:</b></p>
index b7005b2bd989dfe4b010a84197a5d71f3d9c60e1..6d43f92e534e9c36104ace37b3d7296ba2c23df7 100755 (executable)
@@ -80,7 +80,7 @@ function groupWindow(selectgroup) {
 //]]>
 </script>
 
-        <form id="rolesform1" name="rolesform1" action="groups.php" method="get">
+        <form id="rolesform1" action="groups.php" method="get">
         <input type="hidden" name="id" value="<?php echo $courseid ?>" />
         <div align="center"><?php echo get_string('currentrole', 'role') ?>: 
             <?php choose_from_menu ($roleoptions, 'roleid', $roleid, '', 'document.getElementById(\'rolesform1\').submit()') ?>
@@ -90,7 +90,7 @@ function groupWindow(selectgroup) {
     <tr align="center" valign="top">
       <td class="generalboxcontent">
         <label for="nonmembers"><?php p($strmemberincourse) ?></label>
-        <form name="form1" id="form1" method="post" action="groups.php">
+        <form id="form1" method="post" action="groups.php">
           <input type="hidden" name="id" value="<?php p($course->id) ?>" />
           <input type="hidden" name="groupid" value="<?php p($selectedgroup) ?>" />
           <input type="hidden" name="sesskey" value="<?php p($sesskey) ?>" />
@@ -124,7 +124,7 @@ function groupWindow(selectgroup) {
       </td>
       <td class="generalboxcontent">
         <label for="groups"><?php p($strgroups) ?></label>
-        <form name="form2" id="form2" method="post" action="groups.php">
+        <form id="form2" method="post" action="groups.php">
           <input type="hidden" name="id" value="<?php p($course->id) ?>" />
           <input type="hidden" name="sesskey" value="<?php p($sesskey) ?>" />
           <input type="hidden" name="roleid" value="<?php p($roleid) ?>" />
@@ -156,7 +156,7 @@ function groupWindow(selectgroup) {
 
       <td class="generalboxcontent">
         <label for="members"><?php p($strgroupmembersselected) ?></label>
-        <form name="form3" id="form3" method="post" action="groups.php">
+        <form id="form3" method="post" action="groups.php">
           <input type="hidden" name="id" value="<?php p($course->id) ?>" />
           <input type="hidden" name="groupid" value="<?php p($selectedgroup) ?>" />
           <input type="hidden" name="sesskey" value="<?php p($sesskey) ?>" />
index e8664173f5ef5fee1a1e42179b397171c633ffd4..ab35b54cfd0d77a636214e53e455a2a0cb201f22 100644 (file)
@@ -1,5 +1,5 @@
 
-<form name="studentform" id="studentform" method="post" action="importstudents.php">
+<form id="studentform" method="post" action="importstudents.php">
 <input type="hidden" name="previoussearch" value="<?php echo $previoussearch ?>" />
 <input type="hidden" name="sesskey" value="<?php echo sesskey() ?>" />
 <input type="hidden" name="id" value="<?php echo $id?>" />
@@ -9,9 +9,9 @@
           <label for="removeselect"><?php echo count($alreadycourses) . " ". $stralreadycourses ?></label>
           <br />
           <select name="removeselect[]" size="20" id="removeselect" multiple
-                  onFocus="document.studentform.add.disabled=true;
-                           document.studentform.remove.disabled=false;
-                           document.studentform.addselect.selectedIndex=-1;">
+                  onFocus="getElementById('studentform').add.disabled=true;
+                           getElementById('studentform').remove.disabled=false;
+                           getElementById('studentform').addselect.selectedIndex=-1;">
           <?php 
             foreach ($alreadycourses as $course) {
                 echo "<option value=\"$course->id\">".course_format_name($course,60)."</option>\n";
@@ -30,9 +30,9 @@
           <label for="addselect"><?php echo $numcourses . " " . $strpotentialcourses ?></label>
           <br />
           <select name="addselect[]" size="20" id="addselect" multiple
-                  onFocus="document.studentform.add.disabled=false;
-                           document.studentform.remove.disabled=true;
-                           document.studentform.removeselect.selectedIndex=-1;">
+                  onFocus="getElementById('studentform').add.disabled=false;
+                           getElementById('studentform').remove.disabled=true;
+                           getElementById('studentform').removeselect.selectedIndex=-1;">
           <?php
   
               if (!empty($searchcourses)) {
          <br />
          <label for="searchtext" class="accesshide"><?php p($strsearch) ?></label>
          <input type="text" name="searchtext" id="searchtext" size="30" value="<?php p($searchtext, true) ?>" 
-                  onFocus ="document.studentform.add.disabled=true;
-                            document.studentform.remove.disabled=true;
-                            document.studentform.removeselect.selectedIndex=-1;
-                            document.studentform.addselect.selectedIndex=-1;"
+                  onFocus ="getElementById('studentform').add.disabled=true;
+                            getElementById('studentform').remove.disabled=true;
+                            getElementById('studentform').removeselect.selectedIndex=-1;
+                            getElementById('studentform').addselect.selectedIndex=-1;"
                   onkeydown = "var keyCode = event.which ? event.which : event.keyCode;
                                if (keyCode == 13) {
-                                    document.studentform.previoussearch.value=1;
-                                    document.studentform.submit();
+                                    getElementById('studentform').previoussearch.value=1;
+                                    getElementById('studentform').submit();
                                } " />
          <input name="search" id="search" type="submit" value="<?php p($strsearch) ?>" />
          <?php
index d8682e316a50d8ca503f3a0f7c772c85b44cf3a7..a49fd179b9e78bac0069b4d5226c6622e154b0cf 100644 (file)
@@ -46,7 +46,7 @@
     print_header("$course->shortname: $strassigncourses",
                  "$site->fullname",
                  "<a href=\"view.php?id=$course->id\">$course->shortname</a> -> $strassigncourses",
-                 "studentform.searchtext");
+                 "searchtext");
 
 
 /// Print a help notice about the need to use this page
index 8ff237f509c51240a0cfbff2258c3a1c91681db0..429ce9163bffced6a128f3057f4f839e72d037f0 100644 (file)
 /// Print form for creating new categories
     if (has_capability('moodle/category:create', $context)) {
         echo "<center>";
-        echo "<form name=\"addform\" action=\"index.php\" method=\"post\">";
+        echo "<form id=\"addform\" action=\"index.php\" method=\"post\">";
         echo "<input type=\"text\" size=\"30\" alt=\"$straddnewcategory\" name=\"addcategory\" />";
         echo "<input type=\"submit\" value=\"$straddnewcategory\" />";
         echo "<input type=\"hidden\" name=\"sesskey\" value=\"$USER->sesskey\" />";
index 59b6d95100bee06828e2b41e7584721cf9467346..0b6f90cac1525599052950cbd0b2935b92bf100f 100644 (file)
@@ -1864,19 +1864,19 @@ function print_course_search($value="", $return=false, $format="plain") {
     $strsearchcourses= get_string("searchcourses");
 
     if ($format == 'plain') {
-        $output  = '<form name="coursesearch" action="'.$CFG->wwwroot.'/course/search.php" method="get">';
+        $output  = '<form id="coursesearch" action="'.$CFG->wwwroot.'/course/search.php" method="get">';
         $output .= '<center><p align="center" class="coursesearchbox">';
         $output .= '<input type="text" size="30" name="search" alt="'.s($strsearchcourses).'" value="'.s($value, true).'" />';
         $output .= '<input type="submit" value="'.s($strsearchcourses).'" />';
         $output .= '</p></center></form>';
     } else if ($format == 'short') {
-        $output  = '<form name="coursesearch" action="'.$CFG->wwwroot.'/course/search.php" method="get">';
+        $output  = '<form id="coursesearch" action="'.$CFG->wwwroot.'/course/search.php" method="get">';
         $output .= '<center><p align="center" class="coursesearchbox">';
         $output .= '<input type="text" size="12" name="search" alt="'.s($strsearchcourses).'" value="'.s($value, true).'" />';
         $output .= '<input type="submit" value="'.s($strsearchcourses).'" />';
         $output .= '</p></center></form>';
     } else if ($format == 'navbar') {
-        $output  = '<form name="coursesearch" action="'.$CFG->wwwroot.'/course/search.php" method="get">';
+        $output  = '<form id="coursesearch" action="'.$CFG->wwwroot.'/course/search.php" method="get">';
         $output .= '<table border="0" cellpadding="0" cellspacing="0"><tr><td nowrap="nowrap">';
         $output .= '<input type="text" size="20" name="search" alt="'.s($strsearchcourses).'" value="'.s($value, true).'" />';
         $output .= '<input type="submit" value="'.s($strsearchcourses).'" />';
index 8670c0784d2a6e3e80a4b9a9f6944a2cbcb7ca7f..e6c21eb48ea3a67d8726280ea31631bae0c55f20 100644 (file)
@@ -1,4 +1,4 @@
-<form name="form" method="post" action="<?php echo "$CFG->wwwroot/course/mod.php" ?>">
+<form id="form" method="post" action="<?php echo "$CFG->wwwroot/course/mod.php" ?>">
 
 <input type="hidden" name="mode"         value="delete" />
 <input type="hidden" name="section"      value="<?php p($form->section) ?>" />
index 6c6203e380312ba9477e2be4b7552ec3a107d308..5f60042d46092176b4e7612d61feb319ce9cfccd 100644 (file)
@@ -1,4 +1,4 @@
-<form action="pending.php" method="post" name="reject">
+<form action="pending.php" method="post" id="reject">
 <input type="hidden" name="reject" value="<?php p($reject->id); ?>" />
 <textarea name="rejectnotice" rows="10" cols="50"></textarea><br />
 <input type="submit" value="<?php print_string("savechanges");?>" />
index 1cf7e1550dbf8665f7143697d1db04c7890c5cea..e17e0266520abd0be1a88ab17123cbbd1b454e09 100644 (file)
@@ -328,7 +328,7 @@ function checknos() {
 //]]>
 </script>
 ';
-        echo '<form action="'.$CFG->wwwroot.'/user/action_redir.php" method="post" name="studentsform" onSubmit="return checksubmit(this);">';
+        echo '<form action="'.$CFG->wwwroot.'/user/action_redir.php" method="post" id="studentsform" onSubmit="return checksubmit(this);">';
         echo '<input type="hidden" name="id" value="'.$id.'" />';
         echo '<input type="hidden" name="returnto" value="'.$_SERVER['REQUEST_URI'].'" />';
         echo '<input type="hidden" name="sesskey" value="'.$USER->sesskey.'" />';
index f8d92a5a9ea9c044465e764d22f94dbd2576f33d..c405e5af777892daedad1ac842c6f46e558dc9d1 100755 (executable)
@@ -54,7 +54,7 @@ The feature will also reset the start date of the course if necessary.
 
     print_simple_box(get_string('resetinfo'), 'center', '60%');
 
-    echo '<form name="reset" action="reset.php" method="POST">';
+    echo '<form id="reset" action="reset.php" method="POST">';
 
     print_heading(get_string('course'), 'left', 3);
 
index 60b9506a86e494e4c92405051ad58aec730b1ef7..9505364dabd6c45e0abd61c9010a117cfef1b5cd 100644 (file)
             $scale->scale = $form->scalescale;
             $scale->description = $form->description;
         }
-        echo "<form method=\"post\" action=\"scales.php\" name=\"form$scale->id\">";
+        echo "<form method=\"post\" action=\"scales.php\" id=\"form$scale->id\">";
         echo "<table cellpadding=\"9\" cellspacing=\"0\" align=\"center\" class=\"generalbox\">";
         echo "<tr valign=\"top\">";
         if (!empty($errors[$scale->id]->name)) {
index a3fc8cf7a50ebe61c647cb62f1e0d2c9a9246e48..044f28f802ac78a67388f855524ec48661e11220 100644 (file)
             }
         } else { // slightly more sophisticated
 
-            echo "<form name=\"movecourses\" action=\"search.php\" method=\"post\">";
+            echo "<form id=\"movecourses\" action=\"search.php\" method=\"post\">";
             echo "<input type=\"hidden\" name=\"sesskey\" value=\"$USER->sesskey\">";
             echo "<input type=\"hidden\" name=\"search\" value=\"".s($search, true)."\">";
             echo "<input type=\"hidden\" name=\"page\" value=\"$page\">";
             echo "<br />";
             echo "<input type=\"button\" onclick=\"checkall()\" value=\"$strselectall\" />\n";
             echo "<input type=\"button\" onclick=\"uncheckall()\" value=\"$strdeselectall\" />\n";
-            choose_from_menu ($displaylist, "moveto", "", get_string("moveselectedcoursesto"), "javascript:document.movecourses.submit()");
+            choose_from_menu ($displaylist, "moveto", "", get_string("moveselectedcoursesto"), "javascript: getElementById('movecourses').submit()");
             echo "</td></tr>";
             echo "</table>";
 
index 1c359f74da5d232abf9e0b30f472e75c48fb253e..fee7c259cff7f16aaa47b4fa2e34930bc60a5593 100644 (file)
@@ -13,7 +13,7 @@
       <p align="center"><?php if (! empty($this->errormsg)) {formerr($this->errormsg);} ?></p>
 
 
-      <form name="form" method="post" action="enrol.php">
+      <form method="post" action="enrol.php">
         <table align="center" width="100%">
           <tr>
             <td align="right"><?php print_string("enrolmentkey") ?>:</td>
@@ -41,7 +41,7 @@
     if ($course->guest and !isguest()) {
       print_simple_box_start('center');
 ?>
-      <form name="form" method="post" action="enrol.php">
+      <form method="post" action="enrol.php">
         <table align="center" cellpadding="20">
             <tr>
               <td><?php print_string('allowguests') ?>:&nbsp; </td>
index 2407dc930b5537e51e7ef601fc51b50b31ac4d89..b6fb8ca08d828827d39235fbb88175eb89c1c464 100644 (file)
@@ -111,7 +111,7 @@ print_simple_box_start('center','90%','','20');
 
 ?>
  <div class="allowedcoursesdiv"> 
-  <form name="allowedcoursesform" method="post">
+  <form id="allowedcoursesform" method="post">
     <input type="hidden" name="sesskey" value="<?php echo $sesskey; ?>">
 <?php
 
@@ -135,9 +135,9 @@ if (count($categories) < 1) {
     <tr>
       <td valign="top">
           <select name="removecategories[]" size="20" id="removecategories" multiple
-                  onFocus="document.allowedcoursesform.addcategory.disabled=true;
-                           document.allowedcoursesform.removecategory.disabled=false;
-                           document.allowedcoursesform.addcategories.selectedIndex=-1;" />
+                  onFocus="getElementById('allowedcoursesform').addcategory.disabled=true;
+                           getElementById('allowedcoursesform').removecategory.disabled=false;
+                           getElementById('allowedcoursesform').addcategories.selectedIndex=-1;" />
           <?php
               foreach ($allowedcategories as $category) {
                   echo "<option value=\"$category->id\"> $category->name </option>\n";
@@ -156,9 +156,9 @@ if (count($categories) < 1) {
 
       <td valign="top">
           <select name="addcategories[]" size="20" id="addcategories" multiple
-                  onFocus="document.allowedcoursesform.addcategory.disabled=false;
-                           document.allowedcoursesform.removecategory.disabled=true;
-                           document.allowedcoursesform.removecategories.selectedIndex=-1;">
+                  onFocus="getElementById('allowedcoursesform').addcategory.disabled=false;
+                           getElementById('allowedcoursesform').removecategory.disabled=true;
+                           getElementById('allowedcoursesform').removecategories.selectedIndex=-1;">
           <?php
             foreach ($potentialcategories as $category) {
                 echo "<option value=\"$category->id\"> $category->name </option>\n";
@@ -192,9 +192,9 @@ if (count($courses) < 1) {
     <tr>
       <td valign="top">
           <select name="removecourses[]" size="20" id="removecourses" multiple
-                  onFocus="document.allowedcoursesform.addcourse.disabled=true;
-                           document.allowedcoursesform.removecourse.disabled=false;
-                           document.allowedcoursesform.addcourses.selectedIndex=-1;" />
+                  onFocus="getElementById('allowedcoursesform').addcourse.disabled=true;
+                           getElementById('allowedcoursesform').removecourse.disabled=false;
+                           getElementById('allowedcoursesform').addcourses.selectedIndex=-1;" />
           <?php
               foreach ($allowedcourses as $course) {
                   echo "<option value=\"$course->id\"> $course->shortname </option>\n";
@@ -213,9 +213,9 @@ if (count($courses) < 1) {
 
       <td valign="top">
           <select name="addcourses[]" size="20" id="addcourses" multiple
-                  onFocus="document.allowedcoursesform.addcourse.disabled=false;
-                           document.allowedcoursesform.removecourse.disabled=true;
-                           document.allowedcoursesform.removecourses.selectedIndex=-1;">
+                  onFocus="getElementById('allowedcoursesform').addcourse.disabled=false;
+                           getElementById('allowedcoursesform').removecourse.disabled=true;
+                           getElementById('allowedcoursesform').removecourses.selectedIndex=-1;">
           <?php
             foreach ($potentialcourses as $course) {
                 echo "<option value=\"$course->id\"> $course->shortname </option>\n";
index 4016c76ffcfcfdf74a4322a03e39f9b55fdeeaf3..99984df12a7f908e37266d5eccb2c11c0b6595fd 100755 (executable)
@@ -1,5 +1,5 @@
 
-<form name="assignform" id="assignform" method="post" action="">
+<form id="assignform" id="assignform" method="post" action="">
 <input type="hidden" name="previoussearch" value="<?php p($previoussearch) ?>" />
 <input type="hidden" name="courseid" value="<?php p($courseid) ?>" />
 <input type="hidden" name="host" value="<?php p($mnethost->id) ?>" />
@@ -17,9 +17,9 @@
     <tr>
       <td valign="top">
           <select name="removeselect[]" size="20" id="removeselect" multiple
-                  onFocus="document.assignform.add.disabled=true;
-                           document.assignform.remove.disabled=false;
-                           document.assignform.addselect.selectedIndex=-1;" />
+                  onFocus="getElementById('assignform').add.disabled=true;
+                           getElementById('assignform').remove.disabled=false;
+                           getElementById('assignform').addselect.selectedIndex=-1;" />
           <?php
               foreach ($enrolledusers as $enrolleduser) {
                   $fullname = fullname($enrolleduser, true);
@@ -37,9 +37,9 @@
       </td>
       <td valign="top">
           <select name="addselect[]" size="20" id="addselect" multiple
-                  onFocus="document.assignform.add.disabled=false;
-                           document.assignform.remove.disabled=true;
-                           document.assignform.removeselect.selectedIndex=-1;">
+                  onFocus="getElementById('assignform').add.disabled=false;
+                           getElementById('assignform').remove.disabled=true;
+                           getElementById('assignform').removeselect.selectedIndex=-1;">
           <?php
 
               if (!empty($searchtext)) {
          </select>
          <br />
          <input type="text" name="searchtext" size="30" value="<?php p($searchtext, true) ?>"
-                  onFocus ="document.assignform.add.disabled=true;
-                            document.assignform.remove.disabled=true;
-                            document.assignform.removeselect.selectedIndex=-1;
-                            document.assignform.addselect.selectedIndex=-1;"
+                  onFocus ="getElementById('assignform').add.disabled=true;
+                            getElementById('assignform').remove.disabled=true;
+                            getElementById('assignform').removeselect.selectedIndex=-1;
+                            getElementById('assignform').addselect.selectedIndex=-1;"
                   onkeydown = "var keyCode = event.which ? event.which : event.keyCode;
                                if (keyCode == 13) {
-                                    document.assignform.previoussearch.value=1;
-                                    document.assignform.submit();
+                                    getElementById('assignform').previoussearch.value=1;
+                                    getElementById('assignform').submit();
                                } " />
          <input name="search" id="search" type="submit" value="<?php p($strsearch) ?>" />
          <?php
index 08fa0c21254a5466496d8806e9d89a17694f3c6a..d8633575be1bdc5105b3b90fd9d1a55f5c85f9e2 100644 (file)
     $httpreferer = empty($_SERVER['HTTP_REFERER']) ? '' : $_SERVER['HTTP_REFERER'];
     $requesturi  = empty($_SERVER['REQUEST_URI'])  ? '' : $_SERVER['REQUEST_URI'];
     
-    print_header($site->fullname .':Error', $site->fullname .': Error 404', '', 'form.text');
+    print_header($site->fullname .':Error', $site->fullname .': Error 404', '', 'text');
     print_simple_box('<p align="center">'. get_string('pagenotexist', 'error'). '<br />'.s($requesturi).'</p>', 'center');
   
 ?>
   
   <center>
   <p><?php echo get_string('pleasereport', 'error'); ?>
-  <p><form action="<?php echo $CFG->wwwroot ?>/error/index.php" name="form" method="post">
-     <textarea rows="3" cols="50" name="text"></textarea><br />
+  <p><form action="<?php echo $CFG->wwwroot ?>/error/index.php" method="post">
+     <textarea rows="3" cols="50" name="text" id="text"></textarea><br />
      <input type="hidden" name="referer" value="<?php p($httpreferer) ?>">
      <input type="hidden" name="requested" value="<?php p($requesturi) ?>">
      <input type="submit" value="<?php echo get_string('sendmessage', 'error'); ?>">
index 4f3a555fbfd4720558dd3d29bd39beba913947cf..89e7d354bb8de3282a0df89099dade902fcbcc10 100644 (file)
                 html_header($course, $wdir, "form.name");
                 echo "<p>$strrenamefileto:</p>";
                 echo "<table><tr><td>";
-                echo "<form action=\"index.php\" method=\"post\" name=\"form\">";
+                echo "<form action=\"index.php\" method=\"post\">";
                 echo ' <input type="hidden" name="choose" value="'.$choose.'" />';
                 echo " <input type=\"hidden\" name=\"id\" value=\"$id\" />";
                 echo " <input type=\"hidden\" name=\"wdir\" value=\"$wdir\" />";
                 html_header($course, $wdir, "form.name");
                 echo "<p>$strcreatefolder:</p>";
                 echo "<table><tr><td>";
-                echo "<form action=\"index.php\" method=\"post\" name=\"form\">";
+                echo "<form action=\"index.php\" method=\"post\">";
                 echo ' <input type="hidden" name="choose" value="'.$choose.'" />';
                 echo " <input type=\"hidden\" name=\"id\" value=\"$id\" />";
                 echo " <input type=\"hidden\" name=\"wdir\" value=\"$wdir\" />";
                 print_heading("$streditfile");
 
                 echo "<table><tr><td colspan=\"2\">";
-                echo "<form action=\"index.php\" method=\"post\" name=\"form\">";
+                echo "<form action=\"index.php\" method=\"post\">";
                 echo ' <input type="hidden" name="choose" value="'.$choose.'" />';
                 echo " <input type=\"hidden\" name=\"id\" value=\"$id\" />";
                 echo " <input type=\"hidden\" name=\"wdir\" value=\"$wdir\" />";
                     echo "<br />";
                     echo "<p align=\"center\">".get_string("whattocallzip")."</p>";
                     echo "<table><tr><td>";
-                    echo "<form action=\"index.php\" method=\"post\" name=\"form\">";
+                    echo "<form action=\"index.php\" method=\"post\">";
                     echo ' <input type="hidden" name="choose" value="'.$choose.'" />';
                     echo " <input type=\"hidden\" name=\"id\" value=\"$id\" />";
                     echo " <input type=\"hidden\" name=\"wdir\" value=\"$wdir\" />";
@@ -694,7 +694,7 @@ function displaydir ($wdir) {
     $strfile   = get_string("file");
 
 
-    echo "<form action=\"index.php\" method=\"post\" name=\"dirform\">";
+    echo "<form action=\"index.php\" method=\"post\" id=\"dirform\">";
     echo '<input type="hidden" name="choose" value="'.$choose.'" />';
     echo "<hr width=\"640\" align=\"center\" noshade=\"noshade\" size=\"1\" />";
     echo "<table border=\"0\" cellspacing=\"2\" cellpadding=\"2\" width=\"640\" class=\"files\">";
index 30feacea75f4c41c07b68180b097bc5e7ec83193..494f43362fa6fc084d833f1edce6408d6ce8c6f3 100644 (file)
@@ -50,8 +50,8 @@
 ?>
 
 function updategrade_item() {
-    document.form1.grade_itemid.value = document.form2.grade_items.value;
-    document.form3.grade_itemid.value = document.form2.grade_items.value;
+    getElementById('form1').grade_itemid.value = getElementById('form2').grade_items.value;
+    getElementById('form3').grade_itemid.value = getElementById('form2').grade_items.value;
 }
 
 
@@ -61,11 +61,11 @@ function updateMembers(selectgrade_item) {
     username = grade_item.username;
     userid = grade_item.userid;
 
-    document.form3['members[]'].length = username.length;
+    getElementById('form3')['members[]'].length = username.length;
 
     for (i=0;i<username.length;i++) {
-        document.form3['members[]'].options[i].value = userid[i];
-        document.form3['members[]'].options[i].text  = username[i];
+        getElementById('form3')['members[]'].options[i].value = userid[i];
+        getElementById('form3')['members[]'].options[i].text  = username[i];
     }
 
     eval('grade_item_inc=grade_item_inc'+selectgrade_item.value); 
@@ -73,11 +73,11 @@ function updateMembers(selectgrade_item) {
     username = grade_item_inc.username;
     userid = grade_item_inc.userid;
 
-    document.form1['nonmembers[]'].length = username.length;
+    getElementById('form1')['nonmembers[]'].length = username.length;
 
     for (i=0;i<username.length;i++) {
-        document.form1['nonmembers[]'].options[i].value = userid[i];
-        document.form1['nonmembers[]'].options[i].text  = username[i];
+        getElementById('form1')['nonmembers[]'].options[i].value = userid[i];
+        getElementById('form1')['nonmembers[]'].options[i].text  = username[i];
     }
 
     updategrade_item();
@@ -104,7 +104,7 @@ function updateMembers(selectgrade_item) {
     </tr>
     <tr align="center" valign="top">
       <td class="generalboxcontent">
-        <form name="form1" id="form1" method="post" action="exceptions.php">
+        <form id="form1" method="post" action="exceptions.php">
           <input type="hidden" name="id" value="<?php p($course->id) ?>" />
           <input type="hidden" name="grade_itemid" value="<?php p($selectedgrade_item) ?>" />
           <input type="hidden" name="action" value="excepts" />
@@ -125,7 +125,7 @@ function updateMembers(selectgrade_item) {
         </form>
       </td>
       <td class="generalboxcontent">
-        <form name="form2" id="form2" method="post" action="grade_items.php">
+        <form id="form2" method="post" action="grade_items.php">
           <input type="hidden" name="id" value="<?php p($course->id) ?>" />
           <input type="hidden" name="action" value="excepts" />
           <input type="hidden" name="sesskey" value="<?php p($USER->sesskey) ?>"/>
@@ -147,7 +147,7 @@ function updateMembers(selectgrade_item) {
 
 
       <td class="generalboxcontent">
-        <form name="form3" id="form3" method="post" action="exceptions.php">
+        <form id="form3" method="post" action="exceptions.php">
           <input type="hidden" name="id" value="<?php p($course->id) ?>" />
           <input type="hidden" name="grade_itemid" value="<?php p($selectedgrade_item) ?>" />
           <input type="hidden" name="sesskey" value="<?php p($USER->sesskey) ?>"/>
index 881d083b7bf6780b2e1bff553bb0baaf9b1c8c7f..68e157457531a1d5f62af65102048d679a7175fc 100644 (file)
@@ -2376,7 +2376,7 @@ function grade_display_grade_weights() {
     
     $categories = get_records('grade_category', 'courseid', $course->id);
     if ($categories) {
-        echo  '<form name="grade_weights" action="./index.php" method="post">';
+        echo  '<form id="grade_weights" action="./index.php" method="post">';
         echo  '<table border="0" cellspacing="2" cellpadding="5" align="center" class="generalbox">';
         echo  '<tr><th colspan="5" class="header" scope="col">'.get_string('setweights','grades');
         helpbutton('weight', get_string('gradeweighthelp','grades'), 'grade');
@@ -2449,7 +2449,7 @@ function grade_set_categories() {
     echo  '<td align="center" class="generaltableheader">'.get_string('maxgrade','grades').'</td>';
     echo  '<td align="center" class="generaltableheader">'.get_string('curveto','grades').'</td>';
     echo  '<td align="center" class="generaltableheader">'.get_string('extracredit','grades').'</td></tr>';
-    echo  '<form name="set_categories" method="post" action="./index.php" >';
+    echo  '<form id="set_categories" method="post" action="./index.php" >';
     echo  '<input type="hidden" name="action" value="assign_categories" />';
     echo  '<input type="hidden" name="id" value="'.$course->id.'" />';
     echo  '<input type="hidden" name="sesskey" value="'.$USER->sesskey.'" />';
@@ -2634,7 +2634,7 @@ function grade_add_category_form() {
     /// just a simple text box with submit
     global $course;
     global $USER;
-    echo  '<form name="new_category">';
+    echo  '<form id="new_category">';
     echo  get_string('addcategory','grades').':<input type="text" name="name" size="20" />';
     echo  '<input type="hidden" name="id" value="'.$course->id.'" />';
     echo  '<input type="hidden" name="action" value="insert_category" />';
@@ -2647,7 +2647,7 @@ function grade_delete_category_form() {
     // outputs a form to delete a category
     global $course;
     global $USER;
-    echo  '<form name="delete_category">';
+    echo  '<form id="delete_category">';
     echo  get_string('deletecategory','grades').': <select name="category_id">';
     grade_category_select();
     echo  '</select><input type="hidden" name="id" value="'.$course->id.'" />';
@@ -2733,7 +2733,7 @@ function grade_display_grade_preferences($course, $preferences) {
     print_single_button('index.php', $buttonoptions, $buttonlabel, 'post');
     echo '<br /></center>';
 
-    echo  '<form name="set_grade_preferences" method="post" action="./index.php">';
+    echo  '<form id="set_grade_preferences" method="post" action="./index.php">';
     echo  '<input type="hidden" name="action" value="set_grade_preferences" />';
     echo  '<input type="hidden" name="id" value="'.$course->id.'" />';
     echo  '<input type="hidden" name="sesskey" value="'.sesskey().'" />';
@@ -2882,7 +2882,7 @@ function grade_display_letter_grades() {
         $letters[10]->courseid = $course->id;
     }
 
-    echo '<form name="grade_letter"><input type="hidden" name="id" value="'.$course->id.'" />';
+    echo '<form id="grade_letter"><input type="hidden" name="id" value="'.$course->id.'" />';
     echo '<table border="0" cellspacing="2" cellpadding="5" align="center" class="generalbox"><tr>';
     echo '<th colspan="3" class="header" scope="col">'.get_string('setgradeletters','grades');
     helpbutton('letter', get_string('gradeletterhelp','grades'), 'grade');
index 757ece9ccbf4807e931c9b79f48a3bd0d7f9a4a8..72dd02a0f337abc4f9b437d97c94f4d9fba4a4c7 100644 (file)
@@ -457,7 +457,7 @@ function rss_get_form($act='none', $url='', $rssid='', $preferredtitle='', $shar
     $straddfeed = get_string('addfeed', 'block_rss_client');
     
     $returnstring = '<table align="center"><tbody><tr><td>'."\n";    
-    $returnstring .= '<form action="'. $CFG->wwwroot .'/blocks/rss_client/block_rss_client_action.php" method="POST" name="block_rss">'."\n";
+    $returnstring .= '<form action="'. $CFG->wwwroot .'/blocks/rss_client/block_rss_client_action.php" method="post" id="block_rss">'."\n";
 
     if ($act == 'rssedit') {
         $returnstring .= $strupdatefeed; 
@@ -508,7 +508,7 @@ function rss_get_form($act='none', $url='', $rssid='', $preferredtitle='', $shar
     $returnstring .= '<input type="hidden" name="user" value="'. $USER->id .'" />'."\n";
     $returnstring .= '<br /><input type="submit" value="';
     $validatestring = "<a href=\"#\" 
-onClick=\"window.open('http://feedvalidator.org/check.cgi?url='+document.block_rss.elements['url'].value,'validate','width=640,height=480,scrollbars=yes,status=yes,resizable=yes');return true;\">". get_string('validatefeed', 'block_rss_client')."</a>";
+onClick=\"window.open('http://feedvalidator.org/check.cgi?url='+getElementId('block_rss').elements['url'].value,'validate','width=640,height=480,scrollbars=yes,status=yes,resizable=yes');return true;\">". get_string('validatefeed', 'block_rss_client')."</a>";
 
     if ($act == 'rssedit') {
         $returnstring .= $stredit;
index 95e85ad085b44ed2015464cc4899187837ccb17a..1e7ed5737dbf4bf0afea05e414dce3064f173db0 100644 (file)
@@ -55,7 +55,7 @@ function suggText() {
 }
 
 function init_spell() {
-       var controlForm = document.spellcheck;
+       var controlForm = getElementById('spellcheck');
 
        // create a new controlWindow object
        controlWindowObj = new controlWindow( controlForm );
@@ -74,7 +74,7 @@ function init_spell() {
 
 <body class="controlWindowBody" onLoad="init_spell();">
 
-<form name="spellcheck">
+<form id="spellcheck">
 
 <table border="0" cellpadding="0" cellspacing="0" border="0">
 <tr>
index e0a3118d53219040a798259fa84c41f5623f016a..f37fd95fcbebb9b49f844d4d9a045234d85b5537 100644 (file)
@@ -1,4 +1,4 @@
-<form name="personsearch" action="index.php" method="post">
+<form id="personsearch" action="index.php" method="post">
 <input type="hidden" name="tab" value="search" />
 
 
index 4da717a3e0e3038bb4d37c8faa33a071796385bc..989925d13b54a5a47f2b1d3903848d7ee90c7b8b 100644 (file)
@@ -87,7 +87,7 @@
 
     echo '<body class="message course-1" id="message-send">';
     echo '<center>';
-    echo '<form name="editing" method="post" action="send.php">';
+    echo '<form id="editing" method="post" action="send.php">';
     echo '<input type="hidden" name="id" value="'.$user->id.'" />';
     echo '<input type="hidden" name="sesskey" value="'.$USER->sesskey.'" />';
 
index c2aad9fc6d720861db8d0f87819dbfcf9bdf080e..1c0ddcec9b2a20fe876be74dbb2c8c7b42bad8b0 100644 (file)
@@ -1,4 +1,4 @@
-<form name="message_settings" action="index.php" method="post">
+<form id="message_settings" action="index.php" method="post">
 <input type="hidden" name="tab" value="settings" />
 
 
index 54bd74f7368b7d1e77f7c2759e565c9f8a546410..f239c8aadfb651f011ed9ecac7badebd68da0c26 100644 (file)
@@ -1,4 +1,4 @@
-<form method="post" action="module.php" name="form">
+<form method="post" action="module.php" id="form">
 <input type="hidden" name="sesskey" value="<?php echo sesskey(); ?>" />
 
 <table cellpadding="9" cellspacing="0" >
index ed2edba39b73f942392d7f5e564df0320cd25ea4..65f75ad51e3870d8c74b99d08c81f5e9c7fcd824 100644 (file)
@@ -885,7 +885,7 @@ class assignment_base {
         print_user_picture($teacher->id, $this->course->id, $teacher->picture);
         echo '</td>';
         echo '<td class="content">';
-        echo '<form name="submitform" action="submissions.php" method="post">';
+        echo '<form id="submitform" action="submissions.php" method="post">';
         echo '<input type="hidden" name="offset" value="'.++$offset.'">';
         echo '<input type="hidden" name="userid" value="'.$userid.'" />';
         echo '<input type="hidden" name="id" value="'.$this->cm->id.'" />';
@@ -1186,7 +1186,7 @@ class assignment_base {
         
         /// Print quickgrade form around the table
         if ($quickgrade){
-            echo '<form action="submissions.php" name="fastg" method="post">';
+            echo '<form action="submissions.php" id="fastg" method="post">';
             echo '<input type="hidden" name="id" value="'.$this->cm->id.'">';
             echo '<input type="hidden" name="mode" value="fastgrade">';
             echo '<input type="hidden" name="page" value="'.$page.'">';
@@ -1203,7 +1203,7 @@ class assignment_base {
         
         /// Mini form for setting user preference
         echo '<br />';
-        echo '<form name="options" action="submissions.php?id='.$this->cm->id.'" method="post">';
+        echo '<form id="options" action="submissions.php?id='.$this->cm->id.'" method="post">';
         echo '<input type="hidden" id="updatepref" name="updatepref" value="1" />';
         echo '<table id="optiontable" align="center">';
         echo '<tr align="right"><td>';
index bb15b6ed28e13ad46721b8d1370f378476461770..5ef072f7d4cb6d164d096ed9f011f5cc7ca8b5de 100644 (file)
@@ -1,4 +1,4 @@
-<form name="form" method="post" action="<?php p($action) ?>">
+<form id="form" method="post" action="<?php p($action) ?>">
 
 <?php
    $form->sesskey = sesskey();
index 8d262c10f760c4c0fb5011d01a90219a450c0ce5..b37b7af5ba402c4c0b064953cdb353d288bd18b6 100644 (file)
@@ -1,4 +1,4 @@
-<form method="post" action="module.php" name="form">
+<form method="post" action="module.php" id="form">
 <input type="hidden" name="sesskey" value="<?php echo $USER->sesskey ?>">
 
 <table cellpadding="9" cellspacing="0" >
index 5ef4bb8ddbeca3882edcb1913aed1a53c3e34b0d..208e6352c8552c713ce2e91bc4c01fb7f777a0d7 100644 (file)
         if(waitFlag) return false;
         waitFlag = true;
         var input_chat_message = document.getElementById('input_chat_message');
-        document.sendForm.chat_message.value = input_chat_message.value;
+        getElementById('sendForm').chat_message.value = input_chat_message.value;
         input_chat_message.value = '';
         input_chat_message.className = 'wait';
-        document.sendForm.submit();
+        getElementById('sendForm').submit();
         enableForm();
         return false;
     }
     <?php
 
     $meta = ob_get_clean();
-    print_header('', '', '', 'inputForm.chat_message', $meta, false);
+    print_header('', '', '', 'input_chat_message', $meta, false);
 
 ?>
-    <form action="../empty.php" method="post" target="empty" name="inputForm"
+    <form action="../empty.php" method="post" target="empty" id="inputForm"
           onsubmit="return empty_field_and_submit()">
         &gt;&gt;<input type="text" id="input_chat_message" name="chat_message" size="60" value="" />
         <?php helpbutton('chatting', get_string('helpchatting', 'chat'), 'chat', true, false); ?>
     </form>
 
-    <form action="insert.php" method="post" target="empty" name="sendForm">
+    <form action="insert.php" method="post" target="empty" id="sendForm">
         <input type="hidden" name="chat_sid" value="<?php echo $chat_sid ?>" />
         <input type="hidden" name="chat_message" />
     </form>
index 265d64aa3e49a8a7e4f570e88fd15e7f4ec06172..491d9fa1d2171fd61cd6131ec9416be1aab09a0a 100644 (file)
@@ -89,7 +89,7 @@
           has_capability('mod/choice:choose', $context) ) {
     // They haven't made their choice yet or updates allowed and choice is open
 
-        echo '<form name="form" method="post" action="view.php">';        
+        echo '<form id="form" method="post" action="view.php">';        
 
         choice_show_form($choice, $USER, $cm);
         
index baca72ff4671def1ef34abf630b1e03e077dec93..090d6e5d4a32f99dd4f6b54e011de0bbc7120f7e 100644 (file)
@@ -1,4 +1,4 @@
-<form method="post" action="module.php" name="form">
+<form method="post" action="module.php" id="form">
 <input type="hidden" name="sesskey" value="<?php echo $USER->sesskey ?>">
 
 <table cellpadding="9" cellspacing="0" >
index 3a5ea41f92e637d83ad32072e6941d51efd1c44d..a4669b41b7fe7175f505a870685753d8c927a1fd 100755 (executable)
 
         if ($fields = get_records('data_fields','dataid',$data->id)) {
             echo '<div class="sortdefault" align="center">';
-            echo '<form name="sortdefault" action="'.$CFG->wwwroot.'/mod/data/field.php" method="get">';
+            echo '<form id="sortdefault" action="'.$CFG->wwwroot.'/mod/data/field.php" method="get">';
             echo '<input type="hidden" name="d" value="'.$data->id.'" />';
             echo '<input type="hidden" name="mode" value="sort" />';
             echo '<input type="hidden" name="sesskey" value="'.sesskey().'" />';
index 1d478d43b352a113f37bab0411596225896e55a3..5bda765d4836cc438ad2976bede672e285af3031 100755 (executable)
@@ -178,7 +178,7 @@ class data_field_base {     /// Base class for Database Field Types (see field/*
         }
         print_simple_box_start('center','80%');
 
-        echo '<form name="editfield" action="'.$CFG->wwwroot.'/mod/data/field.php" method="post">'."\n";
+        echo '<form id="editfield" action="'.$CFG->wwwroot.'/mod/data/field.php" method="post">'."\n";
         echo '<input type="hidden" name="d" value="'.$this->data->id.'" />'."\n";
         if (empty($this->field->id)) {
             echo '<input type="hidden" name="mode" value="add" />'."\n";
@@ -912,7 +912,7 @@ function data_print_template($template, $records, $data, $search='',$page=0, $re
  ************************************************************************/
 function data_print_preference_form($data, $perpage, $search, $sort='', $order='ASC'){
     echo '<br /><div class="datapreferences" align="center">';
-    echo '<form name="options" action="view.php" method="get">';
+    echo '<form id="options" action="view.php" method="get">';
     echo '<input type="hidden" name="d" value="'.$data->id.'" />';
     echo '<label for="pref_perpage">'.get_string('pagesize','data').'</label> ';
     $pagesizes = array(2=>2,3=>3,4=>4,5=>5,6=>6,7=>7,8=>8,9=>9,10=>10,15=>15,
@@ -963,7 +963,7 @@ function data_print_ratings($data, $record) {
             $ratingsmenuused = false;
 
             echo '<div class="ratings" align="center">';
-            echo '<form name="form" method="post" action="rate.php">';
+            echo '<form id="form" method="post" action="rate.php">';
 
             if (has_capability('mod/data:rate', $context) and !data_isowner($record->id)) {
                 data_print_ratings_mean($record->id, $ratingsscale, has_capability('mod/data:viewrating', $context));
index 6c773f16e49aac1ef4ffb7443a4889284e5679f6..f6e2d2a0a91e7e8bdffde0b555c34a72ee84d41d 100644 (file)
@@ -319,7 +319,7 @@ echo '<tr><td><label for="fromfile">'.$strfromfile.'</label>';
 helpbutton('importfromfile', '', 'data');
 echo '</td><td>';
 
-echo '<form name="uploadpreset" method="post" action="preset.php">';
+echo '<form id="uploadpreset" method="post" action="preset.php">';
 echo '<input type="hidden" name="d" value="'.$data->id.'" />';
 echo '<input type="hidden" name="action" value="importzip" />';
 echo '<input type="hidden" name="sesskey" value="'.sesskey().'" />';
@@ -333,7 +333,7 @@ echo '<tr valign="top"><td><label>'.$strusestandard.'</label>';
 helpbutton('usepreset', '', 'data');
 echo '</td><td>';
 
-echo '<form name="presets" method="post" action="preset.php" >';
+echo '<form id="presets" method="post" action="preset.php" >';
 echo '<input type="hidden" name="d" value="'.$data->id.'" />';
 echo '<input type="hidden" name="action" value="importpreset" />';
 echo '<input type="hidden" name="sesskey" value="'.sesskey().'" />';
index c9471cf34116297f08efd8a91fba0bb5091f9e65..86d846dce5dca94d4e5b078bbc9c4daa7ff807be 100755 (executable)
@@ -78,7 +78,7 @@
 
     $bodytag = 'onload="';
     $bodytag .= 'if (typeof('.$editorobj.') != \'undefined\') { currEditor = '.$editorobj.'; } ';
-    $bodytag .= 'currTextarea = document.tempform.template;';
+    $bodytag .= 'currTextarea = getElementById(\'tempform\').template;';
     $bodytag .= '" ';
 
     // Javascript to insert the field tags into the textarea.
     }
 
 
-    echo '<form name="tempform" action="templates.php?d='.$data->id.'&amp;mode='.$mode.'" method="post">';
+    echo '<form id="tempform" action="templates.php?d='.$data->id.'&amp;mode='.$mode.'" method="post">';
     echo '<input name="sesskey" value="'.sesskey().'" type="hidden" />';
     // Print button to autogen all forms, if all templates are empty
 
index e5933f9b302b6f61952b2ba2d499ec98b41e1d8b..738eb59addec804f4b44f4ef1b587992059e5ceb 100644 (file)
@@ -1,4 +1,4 @@
-<form method="post" action="module.php" name="form">
+<form method="post" action="module.php" id="form">
 <input type="hidden" name="sesskey" value="<?php echo $USER->sesskey ?>" />
 
 <table cellpadding="9" cellspacing="0" >
index 93d2fdbb5f76a9e1766eafb9ab5cd0550eb3b515..28e5fcc8b089585dc02aee708105595285da2802 100644 (file)
@@ -3146,7 +3146,7 @@ function forum_print_latest_discussions($course, $forum, $maxdiscussions=5, $dis
             && $course->id != SITEID)) {
 
         echo '<div class="singlebutton forumaddnew">';
-        echo "<form name=\"newdiscussionform\" method=\"get\" action=\"$CFG->wwwroot/mod/forum/post.php\">";
+        echo "<form id=\"newdiscussionform\" method=\"get\" action=\"$CFG->wwwroot/mod/forum/post.php\">";
         echo "<input type=\"hidden\" name=\"forum\" value=\"$forum->id\" />";
         echo '<input type="submit" value="';
         echo ($forum->type == 'news') ? get_string('addanewtopic', 'forum')
@@ -3352,7 +3352,7 @@ function forum_print_discussion($course, $forum, $discussion, $post, $mode, $can
             $ratings->allow = $canrate;
 
             if ($ratings->allow) {
-                echo '<form name="form" method="post" action="rate.php">';
+                echo '<form id="form" method="post" action="rate.php">';
                 echo '<input type="hidden" name="id" value="'.$course->id.'" />';
                 echo '<input type="hidden" name="forumid" value="'.$forum->id.'" />';
             }
index da09e93c20a0dbcdb77c0cfd554b4c2dcdc48fa1..383b3a9b73f1976706cc27764afc9f773c800543 100644 (file)
@@ -1,4 +1,4 @@
-<form name="prune" method="get" action="post.php">
+<form id="pruneform" method="get" action="post.php">
 <table border="0" cellpadding="5">
 <tr valign="top">
     <td align="right"><b><?php print_string("discussionname", "forum"); ?>:</b></td>
index 9417bbeb70f988fc1609988df71da568e7c0b79e..3eb59d1a59f0889cccf5b6062d715d8a63da8975 100644 (file)
@@ -1,5 +1,5 @@
 
-<form name="subscriberform" id="subscriberform" method="post" action="subscribers.php">
+<form id="subscriberform" method="post" action="subscribers.php">
 <input type="hidden" name="previoussearch" value="<?php echo $previoussearch ?>" />
 <input type="hidden" name="id" value="<?php echo $id?>" />
   <table align="center" border="0" cellpadding="5" cellspacing="0">
@@ -15,9 +15,9 @@
     <tr>
       <td valign="top">
           <select name="removeselect[]" size="20" id="removeselect" multiple
-                  onFocus="document.subscriberform.add.disabled=true;
-                           document.subscriberform.remove.disabled=false;
-                           document.subscriberform.addselect.selectedIndex=-1;">
+                  onFocus="getElementById('subscriberform').add.disabled=true;
+                           getElementById('subscriberform').remove.disabled=false;
+                           getElementById('subscriberform').addselect.selectedIndex=-1;">
           <?php 
               foreach ($subscribers as $subscriber) {
                   $fullname = fullname($subscriber, true);
@@ -35,9 +35,9 @@
       </td>
       <td valign="top">
           <select name="addselect[]" size="20" id="addselect" multiple
-                  onFocus="document.subscriberform.add.disabled=false;
-                           document.subscriberform.remove.disabled=true;
-                           document.subscriberform.removeselect.selectedIndex=-1;">
+                  onFocus="getElementById('subscriberform').add.disabled=false;
+                           getElementById('subscriberform').remove.disabled=true;
+                           getElementById('subscriberform').removeselect.selectedIndex=-1;">
           <?php
               if (!empty($searchusers)) {
                   echo "<optgroup label=\"$strsearchresults (" . count($searchusers) . ")\">\n";
          </select>
          <br />
          <input type="text" name="searchtext" size="30" value="<?php echo $searchtext ?>" 
-                  onFocus ="document.subscriberform.add.disabled=true;
-                            document.subscriberform.remove.disabled=true;
-                            document.subscriberform.removeselect.selectedIndex=-1;
-                            document.subscriberform.addselect.selectedIndex=-1;"
+                  onFocus ="getElementById('subscriberform').add.disabled=true;
+                            getElementById('subscriberform').remove.disabled=true;
+                            getElementById('subscriberform').removeselect.selectedIndex=-1;
+                            getElementById('subscriberform').addselect.selectedIndex=-1;"
                   onkeydown = "var keyCode = event.which ? event.which : event.keyCode;
                                if (keyCode == 13) {
-                                    document.subscriberform.previoussearch.value=1;
-                                    document.subscriberform.submit();
+                                    getElementById('subscriberform').previoussearch.value=1;
+                                    getElementById('subscriberform').submit();
                                } " />
          <input name="search" id="search" type="submit" value="<?php p($strsearch) ?>" />
          <?php
index 9c539429d00d1ee32fea0707fe1951811f0f111d..76ab50342a64b2bb43bf17f4df9bcf16b40d9717 100644 (file)
@@ -2,7 +2,7 @@
     $yes = get_string("yes");
     $no  = get_string("no");
 ?>
-<form method="post" action="module.php" name="form">
+<form method="post" action="module.php" id="form">
 <input type="hidden" name="sesskey" value="<?php echo $USER->sesskey ?>">
 
 <table cellpadding=9 cellspacing=0 >
index 60efd60c29c0b0ea7ea6681bcc5c88e7cb3c6ff9..fc55d27ac7efdb7f181ad4e4214facfade94f83d 100644 (file)
@@ -3,7 +3,7 @@
     require_once("../../config.php");
 ?>
 <center>
-<form name="form" method="post" action="editcategories.php">
+<form id="form" method="post" action="editcategories.php">
 <table  class="generalbox" cellpadding="5">
 <tr valign="top">
     <td align="right"><b><?php echo get_string("name") ?>:</b></td>
index a81114deff4a51ccea6d3da38781b593d6baeead..ff8e38cb80f3983069638542a0840d3d5ce48b6a 100644 (file)
                 echo "<p>";
                 print_string("areyousuredelete","glossary");
 ?>
-                <form name="form" method="post" action="editcategories.php">
+                <form id="form" method="post" action="editcategories.php">
 
                 <input type="hidden" name="id"          value="<?php p($cm->id) ?>" />
                 <input type="hidden" name="action"      value="delete" />
 
 <div align="center">
 
-<form name="theform" method="post" action="editcategories.php">
+<form method="post" action="editcategories.php">
 <table width="40%" class="generalbox" cellpadding="5">
         <tr>
           <td width="90%" align="center"><b>
index 7820f1676569a6fce4d6ad6e1b93b364c6b049fc..8033ac18544cb217bdd9c6f08906e4c3ec21f4be 100644 (file)
@@ -66,7 +66,7 @@
     $yes = get_string("yes");
     $no  = get_string("no");
 
-    echo '<form method="post" action="formats.php" name="form">';
+    echo '<form method="post" action="formats.php" id="form">';
     echo '<table width="90%" align="center" class="generalbox">';
     ?>
     <tr>
index bbd520208898546b1fd5960eeb4740c86f3155db..b3864e36fd9997d1c3346ca5f35e1035eefae74b 100644 (file)
@@ -1,4 +1,4 @@
-<form method="post" action="import.php" name="form" enctype="multipart/form-data">
+<form method="post" action="import.php" enctype="multipart/form-data">
 <table border="0" cellpadding="3" cellspacing="3" width="100%">
 <tr>
     <td align="right" valign="top" width="30%"><b><?php print_string("filetoimport","glossary") ?>:<br />
index e8dea1308d71312d9d48136f67f8122f365ac8a8..88aac4fea9d7f0be3e09f6ed39a6b89d3c9abcb9 100644 (file)
                 $ratings->allow = true;
             }
 
-            echo "<form name=\"form\" method=\"post\" action=\"rate.php\">";
+            echo "<form method=\"post\" action=\"rate.php\">";
             echo "<input type=\"hidden\" name=\"id\" value=\"$course->id\" />";
         }
 
index a783402612ac7c17de90af59b716208a8be09956..eb8189edcff5868c9538d3d7828847b2cf7989a7 100644 (file)
@@ -1,4 +1,4 @@
-<form method="post" action="module.php" name="form">
+<form method="post" action="module.php" id="form">
 <INPUT type="hidden" name="sesskey" value="<?PHP print isset($USER->sesskey) ? $USER->sesskey : '' ?>">
 
 <TABLE cellpadding="9" cellspacing="0">
index e540b9b60d2105779fcb75c0b503fd0c8ba89089..462207a08475388302e2c00478d07f49b335e618 100644 (file)
@@ -1708,7 +1708,7 @@ class hotpot_xml_quiz extends hotpot_xml_tree {
             $replace .= '\\2';
         }
         if ($form_name) {
-            $replace = '<form action="'.$CFG->wwwroot.'/mod/hotpot/attempt.php" method="POST" name="'.$form_name.'" '.$CFG->frametarget.'">'.$replace.'</form>';
+            $replace = '<form action="'.$CFG->wwwroot.'/mod/hotpot/attempt.php" method="post" name="'.$form_name.'" '.$CFG->frametarget.'">'.$replace.'</form>';
         }
         if ($center) {
             $replace = '<div style="margin-left:auto; margin-right:auto; text-align: center;">'.$replace.'</div>';
index a2bcee5182d541739665b22a10ce4b6e13de9db2..f0e87b85a183a495b71747cceb6f60ffd978f446 100644 (file)
@@ -114,15 +114,15 @@ class hotpot_report extends hotpot_default_report {
                if ($options['reportformat']=='htm' && has_capability('mod/hotpot:viewreport',get_context_instance(CONTEXT_COURSE, $course->id))) {
                        $strdeletecheck = get_string('deleteattemptcheck','quiz');
                        $table->start = $this->deleteform_javascript();
-                       $table->start .= '<form method="post" action="report.php" name="deleteform" onsubmit="'."return deletecheck('".$strdeletecheck."', 'selection')".'">'."\n";
+                       $table->start .= '<form method="post" action="report.php" id="deleteform" onsubmit="'."return deletecheck('".$strdeletecheck."', 'selection')".'">'."\n";
                        $table->start .= '<input type="hidden" name="del" value="selection">'."\n";
                        $table->start .= '<input type="hidden" name="id" value="'.$cm->id.'">'."\n";
                        $table->finish = '<center>'."\n";
                        $table->finish .= '<input type="submit" value="'.get_string("deleteselected").'">&nbsp;'."\n";
                        if ($abandoned) {
-                               $table->finish .= '<input type=button value="'.get_string('deleteabandoned', 'hotpot').'" onClick="if(deletecheck('."'".addslashes(get_string('deleteabandonedcheck', 'hotpot', $abandoned))."', 'abandoned', true".'))document.deleteform.submit();">'."\n";
+                               $table->finish .= '<input type=button value="'.get_string('deleteabandoned', 'hotpot').'" onClick="if(deletecheck('."'".addslashes(get_string('deleteabandonedcheck', 'hotpot', $abandoned))."', 'abandoned', true".')) getElementById(\'deleteform\').submit();">'."\n";
                        }
-                       $table->finish .= '<input type=button value="'.get_string("deleteall").'" onClick="if(deletecheck('."'".addslashes($strdeletecheck)."', 'all', true".'))document.deleteform.submit();">'."\n";
+                       $table->finish .= '<input type=button value="'.get_string("deleteall").'" onClick="if(deletecheck('."'".addslashes($strdeletecheck)."', 'all', true".'))getElementById(\'deleteform\').submit();">'."\n";
                        $table->finish .= '</center>'."\n";
                        $table->finish .= '</form>'."\n";
                }
@@ -136,7 +136,7 @@ class hotpot_report extends hotpot_default_report {
 function deletecheck(p, v, x) {
        var r = false; // result
        // get length of form elements
-       var f = document.deleteform;
+       var f = getElementById('deleteform');
        var l = f ? f.elements.length : 0;
        // count selected items, if necessary
        if (!x) {
index 7ca9bc0d42d09b9606838a6d21aaa956b4c81e9e..8eb89e2160b4a00a845308e646b72677bdfeb651 100644 (file)
@@ -75,7 +75,7 @@
                 print_simple_box_end();
                 print "<br />\n";
             }
-            print '<form name="passwordform" method="post" action="view.php?id='.$cm->id.'">'."\n";
+            print '<form id="passwordform" method="post" action="view.php?id='.$cm->id.'">'."\n";
             print_simple_box_start($boxalign, $boxwidth);
             print '<div align="center">';
             print get_string('requirepasswordmessage', 'quiz').'<br /><br />';
index 024dcf4195eafeaab2a68bbdc32fdb4e94663912..3f2bc1f4af7b5398107f6c9811f1f4a7d5d5b41d 100644 (file)
@@ -1,4 +1,4 @@
-<form name="theform" method="post" action="edit.php">
+<form id="theform" method="post" action="edit.php">
 <table cellpadding="10" cellspacing="0" class="generalbox">
   <tr><td align="right">
      <?php
index 435f86c5e6c3f264a642a941d539c8d8ec1c9441..d2177fc317562017aeb31cd277f1357f29de9bac 100644 (file)
@@ -1,4 +1,4 @@
-<form method="post" action="module.php" name="form">
+<form method="post" action="module.php" id="form">
 <input type="hidden" name="sesskey" value="<?php echo $USER->sesskey ?>">
 
 <table cellpadding="9" cellspacing="0">
index 3f3fe13fa2144c2a322e8d10ef469b1c57de566c..931978344bef0edf22e003ae9a85642ae8948f19 100644 (file)
@@ -36,7 +36,7 @@
     // give teacher a blank proforma
     print_heading_with_help(get_string("addabranchtable", "lesson"), "overview", "lesson");
     ?>
-    <form name="form" method="post" action="lesson.php">
+    <form id="form" method="post" action="lesson.php">
     <input type="hidden" name="id" value="<?PHP echo $cm->id ?>" />
     <input type="hidden" name="action" value="insertpage" />
     <input type="hidden" name="pageid" value="<?PHP echo $pageid ?>" />
index 3f7ba74e2542206204b079aa818a8f40584053a7..a5d6ec9e48f891097d2b44347c9ecd76d64d5a0a 100644 (file)
@@ -46,7 +46,7 @@
     // give teacher a blank proforma
     print_heading_with_help(get_string("addaquestionpage", "lesson"), "overview", "lesson");
     ?>
-    <form name="form" method="post" action="lesson.php">
+    <form id="form" method="post" action="lesson.php">
     <input type="hidden" name="id" value="<?php echo $cm->id ?>" />
     <input type="hidden" name="action" value="insertpage" />
     <input type="hidden" name="pageid" value="<?php echo $pageid ?>" />
index 59ef293d428000816b2c17285afb7e47f591a45d..88746acfff8506be4483fb4b98427ade359a0989 100644 (file)
@@ -38,7 +38,7 @@
 
 <?php if (isset($USER->modattempts[$lesson->id])) { // User is modifying attempts - save button and some instructions ?>
 
-            <form name="endoflesson" method ="post" action="<?php echo $CFG->wwwroot ?>/mod/lesson/view.php">
+            <form id="endoflesson" method ="post" action="<?php echo $CFG->wwwroot ?>/mod/lesson/view.php">
             <input type="hidden" name="id" value="<?php echo $cm->id ?>" />
             <input type="hidden" name="pageid" value="<?php echo LESSON_EOL; ?>" />
     
@@ -60,7 +60,7 @@
 
 <?php if ($lesson->review && !$correctanswer && !$noanswer && !$isessayquestion) { // Review button back ?>
     
-            <form name="reviewback" method ="post" action="<?php echo $CFG->wwwroot ?>/mod/lesson/view.php">
+            <form id="reviewback" method ="post" action="<?php echo $CFG->wwwroot ?>/mod/lesson/view.php">
             <input type="hidden" name="id" value="<?php echo $cm->id ?>" />
             <input type="hidden" name="pageid" value="<?php echo $pageid; ?>" />
     
index 10efe0ef555401296e05c8722e87fd7a2e216e21..da4f303da080ca55e86e7ab2af2fb8d47c1da52d 100644 (file)
@@ -53,7 +53,7 @@
     }
     // give teacher a proforma
     ?>
-    <form name="editpage" method="post" action="lesson.php">
+    <form id="editpage" method="post" action="lesson.php">
     <input type="hidden" name="id" value="<?php echo $cm->id ?>" />
     <input type="hidden" name="action" value="updatepage" />
     <input type="hidden" name="pageid" value="<?php echo $pageid ?>" />
@@ -68,7 +68,7 @@
                 echo helpbutton("questiontypes", get_string("questiontype", "lesson"), "lesson")."<br />";
                 lesson_qtype_menu($LESSON_QUESTION_TYPE, $page->qtype, 
                                   "lesson.php?id=$cm->id&amp;action=editpage&amp;pageid=$page->id",
-                                  "document.editpage.redisplay.value=1;document.editpage.submit();");
+                                  "getElementById('editpage').redisplay.value=1;getElementById('editpage').submit();");
                 echo "<p><b><label for=\"qoption\">".get_string('multianswer', 'lesson').":</label></b> \n";
                 if ($page->qoption) {
                     echo "<input type=\"checkbox\" id=\"qoption\" name=\"qoption\" value=\"1\" checked=\"checked\" />";
@@ -83,7 +83,7 @@
                 echo helpbutton("questiontypes", get_string("questiontype", "lesson"), "lesson")."<br />";
                 lesson_qtype_menu($LESSON_QUESTION_TYPE, $page->qtype, 
                                   "lesson.php?id=$cm->id&amp;action=editpage&amp;pageid=$page->id",
-                                  "document.editpage.redisplay.value=1;document.editpage.submit();");
+                                  "getElementById('editpage').redisplay.value=1;getElementById('editpage').submit();");
                 echo "<p><b><label for=\"qoption\">".get_string('casesensitive', 'lesson').":</label></b> \n";
                 if ($page->qoption) {
                     echo "<input type=\"checkbox\" id=\"qoption\" name=\"qoption\" value=\"1\" checked=\"checked\" />";
                 echo helpbutton("questiontypes", get_string("questiontype", "lesson"), "lesson")."<br />";
                 lesson_qtype_menu($LESSON_QUESTION_TYPE, $page->qtype, 
                                   "lesson.php?id=$cm->id&amp;action=editpage&amp;pageid=$page->id",
-                                  "document.editpage.redisplay.value=1;document.editpage.submit();");
+                                  "getElementById('editpage').redisplay.value=1;getElementById('editpage').submit();");
                 break;
         }
     ?>
     ?>
     </table><br />
     <input type="button" value="<?php print_string("redisplaypage", "lesson") ?>" 
-        onClick="document.editpage.redisplay.value=1;document.editpage.submit();" />
+        onClick="getElementById('editpage').redisplay.value=1;getElementById('editpage').submit();" />
     <input type="submit" value="<?php  print_string("savepage", "lesson") ?>" />
     <input type="submit" name="cancel" value="<?php  print_string("cancel") ?>" />
     </center>
index 3a5235d24692963f8e44be09dbd74e9549166eaf..6cbbcb9c2ca0ecadd68a4da976efa65cc6b11096 100644 (file)
             // Expects the following to be set: $attemptid, $answer, $user, $page, $attempt
 
             echo '<div class="grade">
-                  <form name="essaygrade" method="post" action="'.$CFG->wwwroot.'/mod/lesson/essay.php">
+                  <form id="essaygrade" method="post" action="'.$CFG->wwwroot.'/mod/lesson/essay.php">
                   <input type="hidden" name="id" value="'.$cm->id.'" />
                   <input type="hidden" name="mode" value="update" />
                   <input type="hidden" name="attemptid" value="'.$attemptid.'" />
index 5a7c4e7ed6a0ea961d784552a03d3529c0e14266..fc85a604299f96fb409169166fa09ce9712a79d7 100644 (file)
         case 'add':
             print_simple_box_start('center');
             echo '<div align="center">
-                 <form name="nickname" method ="post" action="'.$CFG->wwwroot.'/mod/lesson/highscores.php">
+                 <form id="nickname" method ="post" action="'.$CFG->wwwroot.'/mod/lesson/highscores.php">
                  <input type="hidden" name="id" value="'.$cm->id.'" />
                  <input type="hidden" name="mode" value="save" />
                  <input type="hidden" name="sesskey" value="'.sesskey().'" />';
index 1cad858c561ae3d59837bc3fd2db84d0abe1ff12..bdc744eb03e2fc98076253b9733c6d286a2e2c89 100644 (file)
@@ -86,7 +86,7 @@
     print_heading_with_help($strimportppt, "importppt", "lesson");
 
     print_simple_box_start("center");
-    echo "<form name=\"theform\" enctype=\"multipart/form-data\" method=\"post\">";
+    echo "<form id=\"theform\" enctype=\"multipart/form-data\" method=\"post\">";
     echo "<input type=\"hidden\" name=\"id\" value=\"$cm->id\" />\n";
     echo "<input type=\"hidden\" name=\"pageid\" value=\"$pageid\" />\n";
     echo "<table cellpadding=\"5\">";
index e41b9b7a1c683ded2a1da5710130c418d5b7df03..0f3543af35a9d2a44d7c1804f7fc6d6a08984b1e 100644 (file)
         }
         // print it all out !
         if (has_capability('mod/lesson:edit', $context)) {
-            echo  "<form id=\"theform\" name=\"theform\" method=\"post\" action=\"report.php\">\n
+            echo  "<form id=\"theform\" method=\"post\" action=\"report.php\">\n
                    <input type=\"hidden\" name=\"sesskey\" value=\"".sesskey()."\" />\n
                    <input type=\"hidden\" name=\"id\" value=\"$cm->id\" />\n
                    <input type=\"hidden\" name=\"id\" value=\"$cm->id\" />\n";
index fe94dc6cabb7ce64d1f6701b1d1534e0dbd9e34d..217219b7975f3d9306a5088e9fdd1fc996e88d57 100644 (file)
@@ -61,7 +61,7 @@
                 lesson_print_header($cm, $course, $lesson);
                 echo "<div class=\"password-form\">\n";
                 print_simple_box_start('center');
-                echo '<form name="password" method="post" action="'.$CFG->wwwroot.'/mod/lesson/view.php">' . "\n";
+                echo '<form id="password" method="post" action="'.$CFG->wwwroot.'/mod/lesson/view.php">' . "\n";
                 echo '<input type="hidden" name="id" value="'. $cm->id .'" />' . "\n";
                 if (optional_param('userpassword', 0, PARAM_CLEAN)) {
                     notify(get_string('loginfail', 'lesson'));
         
         // get the answers in a set order, the id order
         if ($answers = get_records("lesson_answers", "pageid", $page->id, "id")) {
-            echo "<form name=\"answerform\" method =\"post\" action=\"lesson.php\">";
+            echo "<form id=\"answerform\" method =\"post\" action=\"lesson.php\">";
             echo "<input type=\"hidden\" name=\"id\" value=\"$cm->id\" />";
             echo "<input type=\"hidden\" name=\"action\" value=\"continue\" />";
             echo "<input type=\"hidden\" name=\"pageid\" value=\"$pageid\" />";
                             $class = 'standardbutton';
                         }
                         // Each button must have its own form inorder for it to work with JavaScript turned off
-                        $button  = "<form name=\"answerform$i\" method=\"post\" action=\"$CFG->wwwroot/mod/lesson/lesson.php\">\n".
+                        $button  = "<form id=\"answerform$i\" method=\"post\" action=\"$CFG->wwwroot/mod/lesson/lesson.php\">\n".
                                    "<input type=\"hidden\" name=\"id\" value=\"$cm->id\" />\n".
                                    "<input type=\"hidden\" name=\"action\" value=\"continue\" />\n".
                                    "<input type=\"hidden\" name=\"pageid\" value=\"$pageid\" />\n".
             echo "</form>\n"; 
         } else {
             // a page without answers - find the next (logical) page
-            echo "<form name=\"pageform\" method =\"post\" action=\"$CFG->wwwroot/mod/lesson/view.php\">\n";
+            echo "<form id=\"pageform\" method =\"post\" action=\"$CFG->wwwroot/mod/lesson/view.php\">\n";
             echo "<input type=\"hidden\" name=\"id\" value=\"$cm->id\" />\n";
             if ($lesson->nextpagedefault) {
                 // in Flash Card mode...
index d9c2966fb64e4f986e5a6792e203ebf2625c63ec..90a40bf0af65c6b0f9f0c7a5024ca2f1efe512e5 100644 (file)
             }
             echo "<br />\n";
 
-            echo "<form name=\"passwordform\" method=\"post\" action=\"attempt.php?id=$cm->id\" autocomplete=\"off\">\n";
+            echo "<form id=\"passwordform\" method=\"post\" action=\"attempt.php?id=$cm->id\" autocomplete=\"off\">\n";
             print_simple_box_start("center");
 
             echo "<div align=\"center\">\n";
         ?>
         <script type="text/javascript">
         //<![CDATA[
-            document.write("<form name=\"responseform\" id=\"responseform\" method=\"post\" action=\"attempt.php\" autocomplete=\"off\">\n");
+            document.write("<form id=\"responseform\" method=\"post\" action=\"attempt.php\" autocomplete=\"off\">\n");
         //]]>
         </script>
         <noscript>
         </noscript>
         <?php
     } else {
-        echo "<form name=\"responseform\" id=\"responseform\" method=\"post\" action=\"attempt.php\" autocomplete=\"off\">\n";
+        echo "<form id=\"responseform\" method=\"post\" action=\"attempt.php\" autocomplete=\"off\">\n";
     }
 
     // Add a hidden field with the quiz id
         <script type="text/javascript">
         //<![CDATA[
         function navigate(page) {
-            var ourForm = document.forms['responseform']
+            var ourForm = getElementById('responseform')
             ourForm.page.value=page;
             if (ourForm.onsubmit) {
                 ourForm.onsubmit();
index f4a406998030980d1365a37110d331bc5551bfb2..5cfc20dc10a9a2bf7a7e5334f58ed897acdef26d 100644 (file)
@@ -313,14 +313,14 @@ function quiz_print_question_list($quiz, $allowdelete=true, $showbreaks=true, $r
     echo "</form>\n";
 
 /// Form to choose to show pagebreaks and to repaginate quiz
-    echo '<form method="post" action="edit.php" name="showbreaks">';
+    echo '<form method="post" action="edit.php" id="showbreaks">';
     echo '<input type="hidden" name="sesskey" value="'.$USER->sesskey.'" />';
     echo '<input type="hidden" name="showbreaks" value="0" />';
     echo '<input type="checkbox" name="showbreaks" value="1"';
     if ($showbreaks) {
         echo ' checked="checked"';
     }
-    echo ' onchange="document.showbreaks.submit(); return true;" />';
+    echo ' onchange="getElementById(\'showbreaks\').submit(); return true;" />';
     print_string('showbreaks', 'quiz');
 
     if ($showbreaks) {
@@ -339,7 +339,7 @@ function quiz_print_question_list($quiz, $allowdelete=true, $showbreaks=true, $r
     if ($reordertool) {
         echo ' checked="checked"';
     }
-    echo ' onchange="document.showbreaks.submit(); return true;" />';
+    echo ' onchange="getElementById(\'showbreaks\').submit(); return true;" />';
     print_string('reordertool', 'quiz');
     echo ' ';
     helpbutton('reorderingtool', get_string('reorderingtool', 'quiz'), 'quiz');
index ffb6e2b50ed15b1956b8aa03a02d1f22fa27cd20..942fe8f7b955799a8677778f80193c03962b8658 100644 (file)
@@ -32,7 +32,7 @@ var ec_quiz_finish = ec_page_start + <?php echo ($timerstartvalue * 1000); ?>;
     </tr>
     <tr>
         <td id="QuizTimer" class="generaltablecell" align="center" width="100%">
-        <form name="clock"><input onfocus="blur()" type="text" name="time"
+        <form id="clock"><input onfocus="blur()" type="text" id="time"
         style="background-color: transparent; border: none; width: 70%; font-family: sans-serif; font-size: 14pt; font-weight: bold; text-align: center;" />
         </form>
         </td>
index be0b52d77167a6e2a5b946ebfd8c5a701a14b620..a093a3c15f9932f64e9fd9a449726f0be23b7670 100644 (file)
@@ -357,7 +357,7 @@ class quiz_report extends quiz_default_report {
     function print_options_form($quiz, $cm, $attempts, $lowlimit=0, $pagesize=10) {
         global $CFG, $USER;
         echo '<div class="controls">';
-        echo '<form id="options" name="options" action="report.php" method="post">';
+        echo '<form id="options" action="report.php" method="post">';
         echo '<p class="quiz-report-options">'.get_string('analysisoptions', 'quiz').': </p>';
         echo '<input type="hidden" name="id" value="'.$cm->id.'" />';
         echo '<input type="hidden" name="q" value="'.$quiz->id.'" />';
index 58e21fbcc38290c95a374dd15bed1ab4a7dc8d8b..777db51f7f3ff68287068216dffb5862ddc248aa 100644 (file)
@@ -562,7 +562,7 @@ class quiz_report extends quiz_default_report {
         }
         // Print display options
         echo '<div class="controls">';
-        echo '<form id="options" name="options" action="report.php" method="post">';
+        echo '<form id="options" action="report.php" method="post">';
         echo '<p>'.get_string('displayoptions', 'quiz').': </p>';
         echo '<input type="hidden" name="id" value="'.$cm->id.'" />';
         echo '<input type="hidden" name="q" value="'.$quiz->id.'" />';
index 423c52398c2d7279a04b693d1ba84d1130ea7600..4504904a5c741c2abc4bcb4924aa505adab85c6e 100755 (executable)
@@ -7,7 +7,7 @@
     }
 ?>
 
-<form method="post" action="module.php" name="form">
+<form method="post" action="module.php" id="form">
 <input type="hidden" name="sesskey" value="<?php echo $USER->sesskey ?>">
 
 <table cellpadding="9" cellspacing="0" >
index ba4eba024da3179aa1d9b291391dc970ba16c33f..3ff3bd3bf432417a0be61f7c9e669fd143117261 100755 (executable)
@@ -534,7 +534,7 @@ function scorm_view_display ($user, $scorm, $action, $cm, $boxwidth='') {
  ?>
             <div class='center'>
                 <?php print_string('organizations','scorm') ?>
-                <form name='changeorg' method='post' action='<?php echo $action ?>'>
+                <form id='changeorg' method='post' action='<?php echo $action ?>'>
                     <?php choose_from_menu($orgs, 'organization', "$organization", '','submit()') ?>
                 </form>
             </div>
@@ -561,7 +561,7 @@ function scorm_view_display ($user, $scorm, $action, $cm, $boxwidth='') {
     print_simple_box_end();
 ?>
             <div class="center">
-                <form name="theform" method="post" action="<?php echo $CFG->wwwroot ?>/mod/scorm/player.php?id=<?php echo $cm->id ?>"<?php echo $scorm->popup == 1?' target="newwin"':'' ?>>
+                <form id="theform" method="post" action="<?php echo $CFG->wwwroot ?>/mod/scorm/player.php?id=<?php echo $cm->id ?>"<?php echo $scorm->popup == 1?' target="newwin"':'' ?>>
               <?php
                   if ($scorm->hidebrowse == 0) {
                       print_string("mode","scorm");
index 94cb351a0c42b5d801883526e3f300943ba5d598..9fffc9efd84c3cc1274a59b7bd235fa6ae2c5f63 100644 (file)
@@ -11,7 +11,7 @@
     $nohtmleditorneeded = true;
 ?>
 
-<form name="form" method="post" action="../mod/survey/details.php">
+<form id="form" method="post" action="../mod/survey/details.php">
 <table cellpadding="5">
 <tr valign="top">
     <td align="right"><b><?php  print_string("surveyname", "survey") ?>:</b></td>
index f5ff99419e5bdaa729889610dc22fa4b9e40ee54..21f5056dc03b0a597c587d6ae966a58c5c3b105f 100644 (file)
          }
          echo "<hr noshade=\"noshade\" size=\"1\" />";
          echo "<center>";
-         echo "<form action=\"report.php\" method=\"post\" name=\"form\">";
+         echo "<form action=\"report.php\" method=\"post\">";
          echo "<h3>$strnotes:</h3>";
          echo "<blockquote>";
          echo "<textarea name=\"notes\" rows=\"10\" cols=\"60\">";
index cd0c93b58d0434afd233faa2ea6ea5039ae901db..910c6fc575663a1a17b743ed53ff4d3b982cce8e 100644 (file)
 //  Start the survey form
     add_to_log($course->id, "survey", "view form", "view.php?id=$cm->id", $survey->id, $cm->id);
 
-    echo "<form name=\"form\" method=\"post\" action=\"save.php\">";
+    echo "<form method=\"post\" action=\"save.php\">";
     echo "<input type=\"hidden\" name=\"id\" value=\"$id\" />";
 
     print_simple_box(format_text($survey->intro), 'center', '70%', '', 5, 'generalbox', 'intro');
index 5e5b7e2bca086f2f1186dc6ed264804656c3f20b..710baf935ed561ca802cd6298c5bb0051b581cd3 100644 (file)
         }
         echo '<tr><td colspan="2">';
 
-        echo '<form name="otherwikis" action="'.$CFG->wwwroot.'/mod/wiki/admin.php">';
+        echo '<form id="otherwikis" action="'.$CFG->wwwroot.'/mod/wiki/admin.php">';
         echo '<table border="0" cellpadding="0" cellspacing="0" width="100%"><tr>';
         echo '<td class="sideblockheading">&nbsp;'
             .$WIKI_TYPES[$wiki->wtype].' '
 
         echo '<td class="sideblockheading" align="right">'
             .get_string('otherwikis', 'wiki').':&nbsp;&nbsp;';
-        $script = 'self.location=document.otherwikis.wikiselect.options[document.otherwikis.wikiselect.selectedIndex].value';
+        $script = 'self.location=getElementById(\'otherwikis\').wikiselect.options[getElementById(\'otherwikis\').wikiselect.selectedIndex].value';
 
         /// Add Admin-Action
         reset($wiki_list);
index 6f54b6562cc69fb9451409eb295816af4311b6c3..5b0f3038420935180b4c63e1f57f552a73012df0 100644 (file)
@@ -1087,7 +1087,7 @@ function wiki_get_owner(&$wiki_entry) {
 function wiki_print_search_form($cmid, $search="", $userid, $groupid, $return=false) {
     global $CFG;
     # TODO: Add Group and User !!!
-    $output = "<form name=\"search\" action=\"$CFG->wwwroot/mod/wiki/view.php\">";
+    $output = "<form id=\"search\" action=\"$CFG->wwwroot/mod/wiki/view.php\">";
     $output .= "<font size=\"-1\">";
     $output .= "<input value=\"".get_string("searchwiki", "wiki").":\" type=\"submit\" />";
     $output .= "<input name=\"id\" type=\"hidden\" value=\"$cmid\" />";
index 55d049724aac962ee826bf01e5e99040758ea6b0..a9000ba34ff82e69d89e390e9991a5de6c67ca80 100644 (file)
@@ -60,7 +60,7 @@
     }
 ?>
 
-<form name="form" method="post" action="mod.php">
+<form id="form" method="post" action="mod.php">
 <center>
 <table cellpadding="5">
 <tr valign="top">
index ec49059fac4ba02507a09c120150d31d9a64e20a..0be2571796a851838a27ffa3639874e8fd609a80 100644 (file)
         }
         echo '<tr><td colspan="2">';
 
-        echo '<form name="otherwikis" action="'.$CFG->wwwroot.'/mod/wiki/view.php">';
+        echo '<form id="otherwikis" action="'.$CFG->wwwroot.'/mod/wiki/view.php">';
         echo '<table border="0" cellpadding="0" cellspacing="0" width="100%"><tr>';
         echo '<td class="sideblockheading">&nbsp;'
             .$WIKI_TYPES[$wiki->wtype].' '
 
         echo '<td class="sideblockheading" align="right">'
             .get_string('otherwikis', 'wiki').':&nbsp;&nbsp;';
-        $script = 'self.location=document.otherwikis.wikiselect.options[document.otherwikis.wikiselect.selectedIndex].value';
+        $script = 'self.location=getElementById(\'otherwikis\').wikiselect.options[getElementById(\'otherwikis\').wikiselect.selectedIndex].value';
         choose_from_menu($wiki_list, "wikiselect", $selected, "choose", $script);
         echo '</td>';
         echo '</tr></table>';
index dc9546fd6666f06615999eae29b20a799b24396a..b8d5f7e3d750bf626a3d90cca6ea9ba1a40295d6 100644 (file)
@@ -3,7 +3,7 @@
         $assessment->teachercomment = '';
     }
 ?>
-<form name="gradingform" action="assessments.php" method="post">
+<form id="gradingform" action="assessments.php" method="post">
   <input type="hidden" name="action" value="updategrading" />
   <input type="hidden" name="id" value="<?php echo $cm->id ?>" />
   <input type="hidden" name="redirect" value="<?php echo $redirect ?>" />
index 3bc78c23403609948e86747ec5c055738fc5a257..ca674fc5bac718d6d033aacd71215c44e2c5fd47 100644 (file)
@@ -93,7 +93,7 @@
             error("Submission not found");
         }
         ?>
-        <form name="commentform" action="assessments.php" method="post">
+        <form id="commentform" action="assessments.php" method="post">
         <input type="hidden" name="action" value="insertcomment" />
         <input type="hidden" name="id" value="<?php echo $cm->id ?>" />
         <input type="hidden" name="aid" value="<?php echo $aid ?>" />
index 4a9a134b9da1a8a16be93eb9a0dd6e6f676edfe6..f2cd55f03fdb040970143deff8ad4626c2dddcd7 100644 (file)
@@ -2048,7 +2048,7 @@ function workshop_print_assessment($workshop, $assessment = false, $allowchanges
     // now print the grading form with the grading grade 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" />
index 1fbedee61979e2f189e32be243a2cddeace93eee..0137ac879e18bdd33ed5392ff97d4c7910282574 100644 (file)
@@ -83,7 +83,7 @@
     }
 ?>
 
-<form name="form" method="post" action="mod.php">
+<form id="form" method="post" action="mod.php">
 <table cellpadding="5">
 <tr valign="top">
     <td align="right"><b><?php  print_string("title", "workshop") ?>:</b></td>
index cf842c9324921d88f627cd5ae28f360de1618f24..f324209a342bc09696fd141c3f3b0071f5637f9d 100644 (file)
@@ -73,7 +73,7 @@
         $submission = get_record("workshop_submissions", "id", $sid);
         print_heading(get_string("amendtitle", "workshop"));
         ?>
-        <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 ?>" />
index 42ea478b7a56c8ce7f60419220910a4c40a00806..57359e0469e3ab8c3d336c29fec9ea8e2b0a3500 100644 (file)
 
             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'])) {
index 6667201e90e33afb9bb6db968cb0b6121d0e4a29..a24db4c3fa8652e2443e9ee1d319136179d5eebd 100644 (file)
   }
 ?>
 
-<form name="query" method="get" action="query.php">
+<form id="query" method="get" action="query.php">
   <?php if (!$advanced) { ?>
     <input type="text" name="query_string" length="50" value="<?php print stripslashes(htmlentities($query_string)) ?>" />
     &nbsp;<input type="submit" value="Search" /> &nbsp;
index af4c20105ffe60471ae242da2b34281b45707b64..ef0d9b3145dfa580e585d91d737423427d9a1a9d 100644 (file)
@@ -12,7 +12,7 @@
     print_header();
     notify('Your session has expired. Please log in again.'); 
 ?>
-      <form action="login.php" method="post" name="login" id="login">
+      <form action="login.php" method="post" id="login">
         <table border="0" align="center">
         <tr>
           <td width="80%">
index 4b9fc4ae5676dcd9ab4e9bf192e3f23b35768e3c..b0679213f296dcab3e2be0df41782472650bc5d4 100644 (file)
@@ -22,7 +22,7 @@
     }
 ?>
 
-<form method="post" name="form" enctype="multipart/form-data" action="edit.php">
+<form method="post" name="editform" enctype="multipart/form-data" action="edit.php">
 <table class="formtable">
 <?php
 if (has_capability('moodle/user:update', get_context_instance(CONTEXT_SYSTEM, SITEID))) {
index e38fb92dcb6cf14ceac4661046ad665a781c3080..04df9fcd9377501180a76f6355444f5d081b1606 100644 (file)
             if (isset($authplugin->config->{$configvariable})) {
                 if ( $authplugin->config->{$configvariable} === 'locked'
                     or ($authplugin->config->{$configvariable} === 'unlockedifempty' and !empty($user->$field))) {
-                   echo "eval('document.form.$field.disabled=true');\n";
+                   echo "eval('getElementById('editform').$field.disabled=true');\n";
                 }
             }
         }
index 8aa604655552ff2b1741c1510c0421d84df527b9..304922264f36b67c7ff1791663e62fc997b3418c 100644 (file)
@@ -56,7 +56,7 @@ for ($i=1; $i<=365; $i++) {
 }
 
 print_heading(get_string('extendenrol'));
-echo "<form method=\"post\" action=\"extendenrol.php\" name=\"form\">\n";
+echo "<form method=\"post\" action=\"extendenrol.php\">\n";
 echo '<input type="hidden" name="id" value="'.$course->id.'" />';
 echo '<input type="hidden" name="sesskey" value="'.$USER->sesskey.'" />';
 $table->head  = array (get_string('fullname'), get_string('enrolmentstart'), get_string('enrolmentend'), get_string('extendperiod'));
index f37eccdf41e8d6b2d75977bdafe7cc828a720592..5b4487f969f23ecb5e2118a8ee27e020b988b006 100644 (file)
         //]]>
         </script>
             ';
-        echo '<form action="action_redir.php" method="post" name="participantsform" onSubmit="return checksubmit(this);">';
+        echo '<form action="action_redir.php" method="post" id="participantsform" onSubmit="return checksubmit(this);">';
         echo '<input type="hidden" name="returnto" value="'.$_SERVER['REQUEST_URI'].'" />';
         echo '<input type="hidden" name="sesskey" value="'.$USER->sesskey.'" />';
     }
index ca3619c12012f06643c5a6a8239f4e3f3fda98ba..b56eb4de088e6e92ad2334ea048f1dfe916e39ce 100644 (file)
@@ -1,4 +1,4 @@
-<form name="theform" method="post" action="messageselect.php">
+<form id="theform" method="post" action="messageselect.php">
 <input type="hidden" name="id" value="<?php p($id) ?>" />
 <input type="hidden" name="returnto" value="<?php p($returnto) ?>" />
 <input type="hidden" name="deluser" value="" />