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 0b2d3f7..2dba551 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 47e2516..578ca0c 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 6d07cdd..3f6cfb2 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 925546c..f69e7d5 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 83a4e06..8d1b842 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 25ff92d..d6d2ebf 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 5c4b7fa..f671df4 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 4303686..046159f 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 9bb7a36..a7e2bd7 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 a7c8785..7286706 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 7748d8f..7401712 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 02c37ee..f630aa5 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 b03224f..8a9800b 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 f33028e..c68ef13 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 43d6ac6..9279b97 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 7bcf6ce..3b6482c 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 71e0b04..bd83361 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 5e7a5e7..4aaaf8b 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 68812de..24d3163 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 24bf590..300f192 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 0cc529d..78ee639 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 af5e194..225ff65 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 534eac4..354c524 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 50094b1..87baf98 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 df7ce8c..4a3c7f3 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 decfe2c..2db70ce 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 f06d6c9..365ad2f 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 95fc363..ef22674 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 6383d50..8ebe69f 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 3a33f0b..8e612ed 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 92cda13..47af568 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 e25a174..b4e52c0 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 3cfc177..d667bf3 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 913d0b0..46ec51f 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 b7005b2..6d43f92 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 e866417..ab35b54 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 d8682e3..a49fd17 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 8ff237f..429ce91 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 59b6d95..0b6f90c 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 8670c07..e6c21eb 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 6c6203e..5f60042 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 1cf7e15..e17e026 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 f8d92a5..c405e5a 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 60b9506..9505364 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 a3fc8cf..044f28f 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 1c359f7..fee7c25 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 2407dc9..b6fb8ca 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 4016c76..99984df 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 08fa0c2..d863357 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 4f3a555..89e7d35 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 30feace..494f433 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 881d083..68e1574 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 757ece9..72dd02a 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 95e85ad..1e7ed57 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 e0a3118..f37fd95 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 4da717a..989925d 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 c2aad9f..1c0ddce 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 54bd74f..f239c8a 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 ed2edba..65f75ad 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 bb15b6e..5ef072f 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 8d262c1..b37b7af 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 5ef4bb8..208e635 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 265d64a..491d9fa 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 baca72f..090d6e5 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 3a5ea41..a4669b4 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 1d478d4..5bda765 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 6c773f1..f6e2d2a 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 c9471cf..86d846d 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 e5933f9..738eb59 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 93d2fdb..28e5fcc 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 da09e93..383b3a9 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 9417bbe..3eb59d1 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 9c53942..76ab503 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 60efd60..fc55d27 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 a81114d..ff8e38c 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 7820f16..8033ac1 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 bbd5202..b3864e3 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 e8dea13..88aac4f 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 a783402..eb8189e 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 e540b9b..462207a 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 a2bcee5..f0e87b8 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 7ca9bc0..8eb89e2 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 024dcf4..3f2bc1f 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 435f86c..d2177fc 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 3f3fe13..9319783 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 3f7ba74..a5d6ec9 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 59ef293..88746ac 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 10efe0e..da4f303 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 3a5235d..6cbbcb9 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 5a7c4e7..fc85a60 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 1cad858..bdc744e 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 e41b9b7..0f3543a 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 fe94dc6..217219b 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 d9c2966..90a40bf 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 f4a4069..5cfc20d 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 ffb6e2b..942fe8f 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 be0b52d..a093a3c 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 58e21fb..777db51 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 423c523..4504904 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 ba4eba0..3ff3bd3 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 94cb351..9fffc9e 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 f5ff994..21f5056 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 cd0c93b..910c6fc 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 5e5b7e2..710baf9 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 6f54b65..5b0f303 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 55d0497..a9000ba 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 ec49059..0be2571 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 dc9546f..b8d5f7e 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 3bc78c2..ca674fc 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 4a9a134..f2cd55f 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 1fbedee..0137ac8 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 cf842c9..f324209 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 42ea478..57359e0 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 6667201..a24db4c 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 af4c201..ef0d9b3 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 4b9fc4a..b067921 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 e38fb92..04df9fc 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 8aa6046..3049222 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 f37eccd..5b4487f 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 ca3619c..b56eb4d 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="" />