Commit ecb2a47917b172c992db250a7d5cfcc755429601
1 parent
cb340c2b
Exists in
master
and in
29 other branches
Disable submit button of shopping cart form to avoid users click more then once
(ActionItem2199)
Showing
1 changed file
with
7 additions
and
1 deletions
Show diff stats
plugins/shopping_cart/views/shopping_cart_plugin_profile/buy.html.erb
@@ -22,7 +22,13 @@ | @@ -22,7 +22,13 @@ | ||
22 | <script type="text/javascript"> | 22 | <script type="text/javascript"> |
23 | //<![CDATA[ | 23 | //<![CDATA[ |
24 | jQuery(document).ready(function(){ | 24 | jQuery(document).ready(function(){ |
25 | - jQuery("#cart-request-form").validate(); | 25 | + jQuery("#cart-request-form").validate({ |
26 | + submitHandler: function(form) { | ||
27 | + jQuery(form).find('input.submit').attr('disabled', true); | ||
28 | + jQuery('#cboxLoadingOverlay').show().addClass('loading'); | ||
29 | + jQuery('#cboxLoadingGraphic').show().addClass('loading'); | ||
30 | + } | ||
31 | + }); | ||
26 | }); | 32 | }); |
27 | //]]> | 33 | //]]> |
28 | </script> | 34 | </script> |