Disable save button when creating new object
This commit is contained in:
parent
ad2724fd2f
commit
73fcf84d59
|
@ -3,6 +3,23 @@
|
|||
|
||||
<%def name="title()">New ${model_title}</%def>
|
||||
|
||||
<%def name="head_tags()">
|
||||
${parent.head_tags()}
|
||||
<script type="text/javascript">
|
||||
|
||||
$(function() {
|
||||
|
||||
$('form').submit(function() {
|
||||
var submit = $(this).find('input[type="submit"]');
|
||||
if (submit.length) {
|
||||
submit.button('disable').button('option', 'label', "Saving, please wait...");
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
</%def>
|
||||
|
||||
<%def name="context_menu_items()">
|
||||
% if request.has_perm('{}.list'.format(permission_prefix)):
|
||||
<li>${h.link_to("Back to {}".format(model_title_plural), index_url)}</li>
|
||||
|
|
Loading…
Reference in a new issue