Commit e443bdc360a0141ac9b943dbd9db1cab6b34ef09
1 parent
c4890c69
wyłączanie przycisku zapisu przy zapisywaniu - uzupełnienie
Showing
1 changed file
with
7 additions
and
1 deletions
dictionary/static/js/edit.js
... | ... | @@ -126,7 +126,13 @@ function toggle_excluded(select, value, enable) { |
126 | 126 | $(function() { |
127 | 127 | "use strict"; |
128 | 128 | $(document).on( |
129 | - 'submit', '#' + edit.form_id, edit.form_submit); | |
129 | + 'submit', '#' + edit.form_id, function() { | |
130 | + $(this).find('button[type=submit]').button('disable'); | |
131 | + var this_form = $(this); | |
132 | + var form_data = this_form.serializeArray(); | |
133 | + edit.form_submit(form_data); | |
134 | + return false; | |
135 | + }); | |
130 | 136 | $(document).on('click', '.' + edit.form_cancel_class, function () { |
131 | 137 | $.ajaxJSON({ |
132 | 138 | method: 'get', |
... | ... |