misc: disable form (buttons) on submit (#13349)
This commit is contained in:
parent
21a87544b7
commit
59a6416ace
|
@ -239,6 +239,7 @@ class FormStatusPage(Directory):
|
|||
response.content_type = 'text/plain'
|
||||
return "Your browser should redirect you"
|
||||
|
||||
get_response().add_javascript(['jquery.js', 'qommon.forms.js'])
|
||||
self.html_top(self.formdef.name)
|
||||
context = {
|
||||
'view': self,
|
||||
|
@ -448,6 +449,7 @@ class FormStatusPage(Directory):
|
|||
return "Your browser should redirect you"
|
||||
|
||||
get_logger().info('form %s - id: %s - view status' % (self.formdef.name, self.filled.id))
|
||||
get_response().add_javascript(['jquery.js', 'qommon.forms.js'])
|
||||
self.html_top('%s - %s' % (self.formdef.name, self.filled.id))
|
||||
r = TemplateIO(html=True)
|
||||
|
||||
|
|
|
@ -46,4 +46,12 @@ $(function() {
|
|||
$(first_field_with_error)[0].focus();
|
||||
}
|
||||
}
|
||||
$(window).bind('pageshow', function(event) {
|
||||
$('form').removeClass('disabled-during-submit');
|
||||
});
|
||||
$('form').on('submit', function() {
|
||||
var $form = $(this);
|
||||
$form.addClass('disabled-during-submit');
|
||||
return true;
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue