merge fix from master for filters not deleting
This commit is contained in:
parent
8061b4f71d
commit
e344141222
|
@ -506,16 +506,16 @@ if ( ZM_OPT_EMAIL ) {
|
|||
<button type="button" data-on-click-this="submitToEvents"><?php echo translate('ListMatches') ?></button>
|
||||
<button type="button" data-on-click-this="submitToMontageReview"><?php echo translate('ViewMatches') ?></button>
|
||||
<button type="button" data-on-click-this="submitToExport"><?php echo translate('ExportMatches') ?></button>
|
||||
<button type="submit" name="action" value="execute" id="executeButton"><?php echo translate('Execute') ?></button>
|
||||
<button type="button" data-on-click-this="submitAction" value="execute" id="executeButton"><?php echo translate('Execute') ?></button>
|
||||
<?php
|
||||
if ( canEdit('Events') ) {
|
||||
?>
|
||||
<button type="submit" name="action" value="Save" id="Save"><?php echo translate('Save') ?></button>
|
||||
<button type="submit" name="action" value="SaveAs" id="SaveAs"><?php echo translate('SaveAs') ?></button>
|
||||
<button type="button" data-on-click-this="submitAction" value="Save" id="Save"><?php echo translate('Save') ?></button>
|
||||
<button type="button" data-on-click-this="submitAction" value="SaveAs" id="SaveAs"><?php echo translate('SaveAs') ?></button>
|
||||
<?php
|
||||
if ( $filter->Id() ) {
|
||||
?>
|
||||
<button type="button" value="Delete" data-on-click-this="deleteFilter"><?php echo translate('Delete') ?></button>
|
||||
<button type="button" value="delete" data-on-click-this="deleteFilter"><?php echo translate('Delete') ?></button>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
|
|
|
@ -166,9 +166,17 @@ function submitToExport(element) {
|
|||
window.location.assign('?view=export&'+$j(form).serialize());
|
||||
}
|
||||
|
||||
function deleteFilter( element ) {
|
||||
function submitAction(button) {
|
||||
console.log(button.value);
|
||||
var form = button.form;
|
||||
form.elements['action'].value = button.value;
|
||||
form.submit();
|
||||
}
|
||||
|
||||
function deleteFilter(element) {
|
||||
var form = element.form;
|
||||
if ( confirm( deleteSavedFilterString+" '"+form.elements['filter[Name]'].value+"'?" ) ) {
|
||||
console.log(form);
|
||||
if (confirm(deleteSavedFilterString+" '"+form.elements['filter[Name]'].value+"'?")) {
|
||||
form.elements['action'].value = 'delete';
|
||||
form.submit();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue