Spacing, remove some html4 stuff, clean up duplicated hidden form elements.

This commit is contained in:
Isaac Connor 2019-01-04 15:52:36 -05:00
parent dea64320f0
commit e72e4e7ce4
1 changed files with 12 additions and 13 deletions

View File

@ -36,7 +36,7 @@ if ( isset($_REQUEST['eid']) ) {
$sqlValues[] = $eid;
}
unset($eid);
$sql .= join( " or ", $sqlWhere );
$sql .= join(' OR ', $sqlWhere);
foreach( dbFetchAll( $sql, NULL, $sqlValues ) as $row ) {
if ( !isset($newEvent) ) {
$newEvent = $row;
@ -75,18 +75,15 @@ if ( $mode == 'single' ) {
</div>
<div id="content">
<form name="contentForm" id="contentForm" method="post" action="<?php echo $_SERVER['PHP_SELF'] ?>">
<input type="hidden" name="view" value="none"/>
<input type="hidden" name="action" value="eventdetail"/>
<input type="hidden" name="view" value="<?php echo $view ?>"/>
<?php
if ( $mode == 'single' ) {
?>
<input type="hidden" name="view" value="<?php echo $view ?>"/>
<input type="hidden" name="action" value="eventdetail"/>
<input type="hidden" name="eid" value="<?php echo $eid ?>"/>
<?php
} else if ( $mode = 'multi' ) {
?>
<input type="hidden" name="view" value="none"/>
<input type="hidden" name="action" value="eventdetail"/>
<?php
foreach ( $_REQUEST['eids'] as $eid ) {
?>
@ -95,7 +92,7 @@ if ( $mode == 'single' ) {
}
}
?>
<table id="contentTable" class="major" cellspacing="0">
<table id="contentTable" class="major">
<tbody>
<tr>
<th scope="row"><?php echo translate('Cause') ?></th>
@ -108,8 +105,10 @@ if ( $mode == 'single' ) {
</tbody>
</table>
<div id="contentButtons">
<input type="submit" value="<?php echo translate('Save') ?>"<?php if ( !canEdit( 'Events' ) ) { ?> disabled="disabled"<?php } ?>/>
<input type="button" value="<?php echo translate('Cancel') ?>" onclick="closeWindow()"/>
<button type="submit" value="Save" <?php echo !canEdit('Events') ? ' disabled="disabled"' : '' ?>>
<?php echo translate('Save') ?>
</button>
<button type="button" onclick="closeWindow()"><?php echo translate('Cancel') ?></button>
</div>
</form>
</div>