diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2009-10-23 13:08:10 -0700 |
---|---|---|
committer | Tim Almdal <tnalmdal@shaw.ca> | 2009-10-23 13:08:10 -0700 |
commit | 6af697686ae10620f084559d366d0e658300c1b3 (patch) | |
tree | 7457892cffd98ace481f4cd62748b3892ace211c /lib/gallery.dialog.js | |
parent | aa85d27eab10b47f7c7cfc5bfeb26f41baed8753 (diff) |
Put logic into gallery.dialog.js so that when the form is submitted, the submit button is disabled and the user is no longer able to submit multiple clicks. This should fix tickets: #623, #790, #799
Diffstat (limited to 'lib/gallery.dialog.js')
-rw-r--r-- | lib/gallery.dialog.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/gallery.dialog.js b/lib/gallery.dialog.js index 89470519..a3715929 100644 --- a/lib/gallery.dialog.js +++ b/lib/gallery.dialog.js @@ -106,6 +106,12 @@ var self = this; $("#g-dialog form").ajaxForm({ dataType: "json", + beforeSubmit: function(formData, form, options) { + form.find(":submit") + .addClass("ui-state-disabled") + .attr("disabled", "disabled"); + return true; + }, success: function(data) { if (data.form) { $("#g-dialog form").replaceWith(data.form); |