Add types to buttons. Make save a submit button, and remove the javascript onclick event.
parent
9338732bd3
commit
5fef98ce6f
|
@ -71,18 +71,6 @@ function initPage() {
|
|||
window.location.reload(true);
|
||||
});
|
||||
|
||||
// Manage the EDIT button
|
||||
$j('#saveBtn').prop('disabled', !(canEdit.Events || (snapshot.CreatedBy == user.Id) ));
|
||||
bindButton('#saveBtn', 'click', null, function onSaveClick(evt) {
|
||||
/*
|
||||
if ( ! canEdit.Events ) {
|
||||
enoperm();
|
||||
return;
|
||||
}
|
||||
*/
|
||||
evt.target.form.submit();
|
||||
});
|
||||
|
||||
// Manage the EXPORT button
|
||||
$j('#downloadBtn').prop('disabled', !canView.Snapshots);
|
||||
bindButton('#downloadBtn', 'click', null, function onDownloadClick(evt) {
|
||||
|
|
|
@ -49,19 +49,18 @@ if ( !$snapshot->Id() ) {
|
|||
?>
|
||||
<!-- BEGIN HEADER -->
|
||||
<form action="?view=snapshot&id=<?php echo $snapshot->Id() ?>" method="post">
|
||||
<input type="hidden" name="action" value="save"/>
|
||||
<div class="d-flex flex-row justify-content-between px-3 py-1">
|
||||
<div id="toolbar">
|
||||
<button id="backBtn" class="btn btn-normal" data-toggle="tooltip" data-placement="top" title="<?php echo translate('Back') ?>" disabled><i class="fa fa-arrow-left"></i></button>
|
||||
<button id="refreshBtn" class="btn btn-normal" data-toggle="tooltip" data-placement="top" title="<?php echo translate('Refresh') ?>" ><i class="fa fa-refresh"></i></button>
|
||||
<button type="button" id="backBtn" class="btn btn-normal" data-toggle="tooltip" data-placement="top" title="<?php echo translate('Back') ?>" disabled><i class="fa fa-arrow-left"></i></button>
|
||||
<button type="button" id="refreshBtn" class="btn btn-normal" data-toggle="tooltip" data-placement="top" title="<?php echo translate('Refresh') ?>" ><i class="fa fa-refresh"></i></button>
|
||||
<?php if ( $snapshot->Id() ) { ?>
|
||||
<!--
|
||||
<button id="editBtn" class="btn btn-normal" data-toggle="tooltip" data-placement="top" title="<?php echo translate('Edit') ?>" disabled><i class="fa fa-pencil"></i></button>
|
||||
-->
|
||||
<button id="saveBtn" class="btn btn-normal" data-toggle="tooltip" data-placement="top" title="<?php echo translate('Save') ?>"><i class="fa fa-save"></i></button>
|
||||
<button id="exportBtn" class="btn btn-normal" data-toggle="tooltip" data-placement="top" title="<?php echo translate('Export') ?>"><i class="fa fa-external-link"></i></button>
|
||||
<button id="downloadBtn" class="btn btn-normal" data-toggle="tooltip" data-placement="top" title="<?php echo translate('Download') ?>" disabled><i class="fa fa-download"></i></button>
|
||||
<button id="deleteBtn" class="btn btn-danger" data-toggle="tooltip" data-placement="top" title="<?php echo translate('Delete') ?>"><i class="fa fa-trash"></i></button>
|
||||
<button type="submit" name="action" value="save" id="saveBtn" class="btn btn-normal" data-toggle="tooltip" data-placement="top" title="<?php echo translate('Save') ?>"><i class="fa fa-save"></i></button>
|
||||
<button type="button" id="exportBtn" class="btn btn-normal" data-toggle="tooltip" data-placement="top" title="<?php echo translate('Export') ?>"><i class="fa fa-external-link"></i></button>
|
||||
<button type="button" id="downloadBtn" class="btn btn-normal" data-toggle="tooltip" data-placement="top" title="<?php echo translate('Download') ?>" disabled><i class="fa fa-download"></i></button>
|
||||
<button type="button" id="deleteBtn" class="btn btn-danger" data-toggle="tooltip" data-placement="top" title="<?php echo translate('Delete') ?>"><i class="fa fa-trash"></i></button>
|
||||
<?php } // end if snapshot->Id ?>
|
||||
</div>
|
||||
|
||||
|
|
Loading…
Reference in New Issue