reconfig controlcap cancel button

This commit is contained in:
Andrew Bauer 2020-09-26 16:39:31 -05:00
parent 2d8349073d
commit 935f73ad33
2 changed files with 7 additions and 1 deletions

View File

@ -488,7 +488,7 @@ switch ( $tab ) {
</table>
<div id="contentButtons">
<button type="submit" value="Save"<?php if ( !canEdit( 'Control' ) ) { ?> disabled="disabled"<?php } ?>><?php echo translate('Save') ?></button>
<button type="button" data-on-click="closeWindow"><?php echo translate('Cancel') ?></button>
<button type="button" id="cancelBtn"><?php echo translate('Cancel') ?></button>
</div>
</form>
</div>

View File

@ -123,6 +123,12 @@ function initPage() {
evt.preventDefault();
window.location.reload(true);
});
// Manage the CANCEL Button
document.getElementById("cancelBtn").addEventListener("click", function onCancelClick(evt) {
evt.preventDefault();
window.location.assign('?view=controlcaps');
});
}
$j(document).ready(function() {