also copy Name from the request on update and only show delete button if it has a name

This commit is contained in:
Isaac Connor 2016-05-29 11:32:18 -04:00
parent 101c93d422
commit 9f6f5100fe
1 changed files with 6 additions and 3 deletions

View File

@ -58,6 +58,7 @@ if ( isset( $_REQUEST['reload'] ) and ! $_REQUEST['reload'] ) {
$dbFilter['AutoUpload'] = isset( $_REQUEST['AutoUpload'] ); $dbFilter['AutoUpload'] = isset( $_REQUEST['AutoUpload'] );
$dbFilter['AutoVideo'] = isset( $_REQUEST['AutoVideo'] ); $dbFilter['AutoVideo'] = isset( $_REQUEST['AutoVideo'] );
$dbFilter['AutoDelete'] = isset( $_REQUEST['AutoDelete'] ); $dbFilter['AutoDelete'] = isset( $_REQUEST['AutoDelete'] );
$dbFilter['Name'] = $_REQUEST['filterName'];
} }
$conjunctionTypes = array( $conjunctionTypes = array(
@ -333,9 +334,11 @@ if ( ZM_OPT_MESSAGE )
<input type="submit" value="<?php echo translate('Submit') ?>" onclick="submitToEvents( this );"/> <input type="submit" value="<?php echo translate('Submit') ?>" onclick="submitToEvents( this );"/>
<input type="button" name="executeButton" id="executeButton" value="<?php echo translate('Execute') ?>" onclick="executeFilter( this );"/> <input type="button" name="executeButton" id="executeButton" value="<?php echo translate('Execute') ?>" onclick="executeFilter( this );"/>
<?php if ( canEdit( 'Events' ) ) { ?> <?php if ( canEdit( 'Events' ) ) { ?>
<input type="button" value="<?php echo translate('Save') ?>" onclick="saveFilter( this );"/><?php } ?> <input type="button" value="<?php echo translate('Save') ?>" onclick="saveFilter( this );"/>
<?php if ( canEdit( 'Events' ) && isset($dbFilter) ) { ?> <?php } ?>
<input type="button" value="<?php echo translate('Delete') ?>" onclick="deleteFilter( this, '<?php echo $dbFilter['Name'] ?>' );"/><?php } ?> <?php if ( canEdit( 'Events' ) && isset($dbFilter) && $dbFilter['Name'] ) { ?>
<input type="button" value="<?php echo translate('Delete') ?>" onclick="deleteFilter( this, '<?php echo $dbFilter['Name'] ?>' );"/>
<?php } ?>
<input type="button" value="<?php echo translate('Reset') ?>" onclick="submitToFilter( this, 1 );"/> <input type="button" value="<?php echo translate('Reset') ?>" onclick="submitToFilter( this, 1 );"/>
</div> </div>
</form> </form>