Refactor all Buefy form submit buttons, per Chrome behavior
ugh, what a pain. and turns out i'd previously ran into this same issue for
jQuery, per commit e945ebe325
This commit is contained in:
parent
43a210cac4
commit
a4b27115ac
17 changed files with 517 additions and 319 deletions
tailbone/templates/datasync/changes
|
@ -5,12 +5,17 @@
|
|||
${parent.grid_tools()}
|
||||
|
||||
% if request.has_perm('datasync.restart'):
|
||||
${h.form(url('datasync.restart'), name='restart-datasync', class_='autodisable control')}
|
||||
% if use_buefy:
|
||||
${h.form(url('datasync.restart'), name='restart-datasync', class_='control', **{'@submit': 'submitRestartDatasyncForm'})}
|
||||
% else:
|
||||
${h.form(url('datasync.restart'), name='restart-datasync', class_='autodisable')}
|
||||
% endif
|
||||
${h.csrf_token(request)}
|
||||
% if use_buefy:
|
||||
<once-button native-type="submit"
|
||||
text="Restart DataSync">
|
||||
</once-button>
|
||||
<b-button native-type="submit"
|
||||
:disabled="restartDatasyncFormSubmitting">
|
||||
{{ restartDatasyncFormButtonText }}
|
||||
</b-button>
|
||||
% else:
|
||||
${h.submit('submit', "Restart DataSync", data_working_label="Restarting DataSync", class_='button')}
|
||||
% endif
|
||||
|
@ -18,12 +23,49 @@
|
|||
% endif
|
||||
|
||||
% if allow_filemon_restart and request.has_perm('filemon.restart'):
|
||||
${h.form(url('filemon.restart'), name='restart-filemon', class_='autodisable control')}
|
||||
% if use_buefy:
|
||||
${h.form(url('filemon.restart'), name='restart-filemon', class_='control', **{'@submit': 'submitRestartFilemonForm'})}
|
||||
% else:
|
||||
${h.form(url('filemon.restart'), name='restart-filemon', class_='autodisable')}
|
||||
% endif
|
||||
${h.csrf_token(request)}
|
||||
% if use_buefy:
|
||||
<b-button native-type="submit"
|
||||
:disabled="restartFilemonFormSubmitting">
|
||||
{{ restartFilemonFormButtonText }}
|
||||
</b-button>
|
||||
% else:
|
||||
${h.submit('submit', "Restart FileMon", data_working_label="Restarting FileMon", class_='button')}
|
||||
% endif
|
||||
${h.end_form()}
|
||||
% endif
|
||||
|
||||
</%def>
|
||||
|
||||
<%def name="modify_tailbone_grid()">
|
||||
${parent.modify_tailbone_grid()}
|
||||
<script type="text/javascript">
|
||||
|
||||
% if request.has_perm('datasync.restart'):
|
||||
TailboneGridData.restartDatasyncFormSubmitting = false
|
||||
TailboneGridData.restartDatasyncFormButtonText = "Restart Datasync"
|
||||
TailboneGrid.methods.submitRestartDatasyncForm = function() {
|
||||
this.restartDatasyncFormSubmitting = true
|
||||
this.restartDatasyncFormButtonText = "Restarting Datasync..."
|
||||
}
|
||||
% endif
|
||||
|
||||
% if allow_filemon_restart and request.has_perm('filemon.restart'):
|
||||
TailboneGridData.restartFilemonFormSubmitting = false
|
||||
TailboneGridData.restartFilemonFormButtonText = "Restart Filemon"
|
||||
TailboneGrid.methods.submitRestartFilemonForm = function() {
|
||||
this.restartFilemonFormSubmitting = true
|
||||
this.restartFilemonFormButtonText = "Restarting Filemon..."
|
||||
}
|
||||
% endif
|
||||
|
||||
</script>
|
||||
</%def>
|
||||
|
||||
|
||||
${parent.body()}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue