mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
MDL-8062 Remove name attribute from <form> and related javascript code cleanup (tested with FF, IE, Konq and Opera)
This commit is contained in:
parent
ee7f231d08
commit
d2ce367fb9
38 changed files with 135 additions and 125 deletions
|
@ -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" >
|
||||
|
|
|
@ -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="type" value="<?php p($form->type) ?>" />
|
||||
<input type="hidden" name="course" value="<?php p($form->course) ?>" />
|
||||
|
|
|
@ -36,10 +36,10 @@
|
|||
|
||||
<br />
|
||||
<div align="center" class="form">
|
||||
<form name="myform">
|
||||
<form id="myform">
|
||||
<input type="file" size="60" name="myfile"><br />
|
||||
<input type="button" value="<?php print_string('localfileselect','resource') ?>"
|
||||
onClick="return set_value(document.myform.myfile.value)">
|
||||
onClick="return set_value(getElementById('myform').myfile.value)">
|
||||
<input type="button" value="<?php print_string('cancel') ?>"
|
||||
onClick="window.close()">
|
||||
</form>
|
||||
|
|
|
@ -32,20 +32,20 @@
|
|||
} else if (txt.indexOf('\\') > -1) {
|
||||
txt = txt.substring(0,txt.lastIndexOf('\\'));
|
||||
}
|
||||
document.myform.pathname.value = txt;
|
||||
document.myform.submit();
|
||||
getElementById('myform').pathname.value = txt;
|
||||
getElementById('myform').submit();
|
||||
}
|
||||
//]]>
|
||||
</script>
|
||||
|
||||
<br />
|
||||
<div align="center" class="form">
|
||||
<form name="myform" action="localpath.php" method="post">
|
||||
<form id="myform" action="localpath.php" method="post">
|
||||
<input type="hidden" name="sesskey" value="<?php echo sesskey(); ?>">
|
||||
<input type="hidden" name="pathname" value="">
|
||||
<input type="file" size="60" name="myfile"><br />
|
||||
<input type="button" value="<?php print_string('localfileselect','resource') ?>"
|
||||
onClick="return set_value(document.myform.myfile.value)">
|
||||
onClick="return set_value(getElementById('myform').myfile.value)">
|
||||
<input type="button" value="<?php print_string('cancel') ?>"
|
||||
onClick="window.close()">
|
||||
</form>
|
||||
|
|
|
@ -40,7 +40,7 @@ $query .= '&HIVE_SESSION='.$SESSION->HIVE_SESSION;
|
|||
/***********8
|
||||
notify('Opening HarvestRoad Hive. Please wait. Contacting '. $CFG->hivehost );
|
||||
|
||||
echo '<form name="OPEN_HIVE_FORM" action="'. $CFG->hiveprotocol .'://'. $CFG->hivehost .':'. $CFG->hiveport .''. $CFG->hivepath .'" method="post">';
|
||||
echo '<form id="OPEN_HIVE_FORM" action="'. $CFG->hiveprotocol .'://'. $CFG->hivehost .':'. $CFG->hiveport .''. $CFG->hivepath .'" method="post">';
|
||||
|
||||
echo '<input type="hidden" name="HISTORY" value="">';
|
||||
echo '<input type="hidden" name="hiveLanguage" value="en_AU">';
|
||||
|
@ -62,7 +62,7 @@ $query .= '&HIVE_SESSION='.$SESSION->HIVE_SESSION;
|
|||
echo '</form>';
|
||||
echo '<script type="text/javascript"/>';
|
||||
echo "\n//<![CDATA[\n";
|
||||
echo 'document.OPEN_HIVE_FORM.submit();';
|
||||
echo 'getElementById(\'OPEN_HIVE_FORM\').submit();';
|
||||
echo "\n//]]>\n";
|
||||
echo '</script>';
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue