must specify type=button or else some browsers treat it as a submit button

This commit is contained in:
Isaac 2018-05-18 16:07:58 +02:00
parent 337db8bb18
commit 77b144a13e
1 changed files with 6 additions and 10 deletions

View File

@ -53,16 +53,12 @@ xhtmlHeaders(__FILE__, translate('Export') );
<div id="content"> <div id="content">
<form name="contentForm" id="contentForm" method="post" action="<?php echo $_SERVER['PHP_SELF'] ?>"> <form name="contentForm" id="contentForm" method="post" action="<?php echo $_SERVER['PHP_SELF'] ?>">
<?php <?php
if ( !empty($_REQUEST['eid']) ) if ( !empty($_REQUEST['eid']) ) {
{
?> ?>
<input type="hidden" name="id" value="<?php echo validInt($_REQUEST['eid']) ?>"/> <input type="hidden" name="id" value="<?php echo validInt($_REQUEST['eid']) ?>"/>
<?php <?php
} } elseif ( !empty($_REQUEST['eids']) ) {
elseif ( !empty($_REQUEST['eids']) ) foreach ( $_REQUEST['eids'] as $eid ) {
{
foreach ( $_REQUEST['eids'] as $eid )
{
?> ?>
<input type="hidden" name="eids[]" value="<?php echo validInt($eid) ?>"/> <input type="hidden" name="eids[]" value="<?php echo validInt($eid) ?>"/>
<?php <?php
@ -70,7 +66,7 @@ elseif ( !empty($_REQUEST['eids']) )
unset( $eid ); unset( $eid );
} }
?> ?>
<table id="contentTable" class="minor" cellspacing="0"> <table id="contentTable" class="minor">
<tbody> <tbody>
<tr> <tr>
<th scope="row"><?php echo translate('ExportDetails') ?></th> <th scope="row"><?php echo translate('ExportDetails') ?></th>
@ -101,7 +97,7 @@ elseif ( !empty($_REQUEST['eids']) )
</tr> </tr>
</tbody> </tbody>
</table> </table>
<button id="exportButton" name="exportButton" value="Export" onclick="exportEvent(this.form);" disabled="disabled"><?php echo translate('Export') ?></button> <button type="button" id="exportButton" name="exportButton" value="Export" onclick="exportEvent(this.form);" disabled="disabled"><?php echo translate('Export') ?></button>
</form> </form>
</div> </div>
<?php <?php