Commit ecb2a47917b172c992db250a7d5cfcc755429601

Authored by Joenio Costa
1 parent cb340c2b

Disable submit button of shopping cart form to avoid users click more then once

(ActionItem2199)
plugins/shopping_cart/views/shopping_cart_plugin_profile/buy.html.erb
... ... @@ -22,7 +22,13 @@
22 22 <script type="text/javascript">
23 23 //<![CDATA[
24 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 34 </script>
... ...