RT#41671 Fix double click prevention for all legacy buttons [full-on fixes]
authorJonathan Prykop <jonathan@freeside.biz>
Thu, 14 Apr 2016 13:10:48 +0000 (08:10 -0500)
committerJonathan Prykop <jonathan@freeside.biz>
Thu, 14 Apr 2016 13:48:09 +0000 (08:48 -0500)
httemplate/edit/cust_refund.cgi
httemplate/misc/tax-fetch_and_import.cgi
httemplate/misc/tax-fetch_and_replace.cgi
httemplate/search/elements/cust_pay_or_refund.html

index bfcbfe7..32da454 100755 (executable)
@@ -10,7 +10,7 @@
     <% small_custview($custnum, $conf->config('countrydefault')) %>
 % } 
 
-<FORM NAME="RefundForm" ACTION="<% $p1 %>process/cust_refund.cgi" METHOD=POST onSubmit="document.RefundForm.submit.disabled=true">
+<FORM NAME="RefundForm" ACTION="<% $p1 %>process/cust_refund.cgi" METHOD=POST onSubmit="document.RefundForm.submitButton.disabled=true">
 <INPUT TYPE="hidden" NAME="popup" VALUE="<% $link %>">
 <INPUT TYPE="hidden" NAME="refundnum" VALUE="">
 <INPUT TYPE="hidden" NAME="custnum" VALUE="<% $custnum %>">
 </TABLE>
 
 <BR>
-<INPUT TYPE="submit" ID="confirm_refund_button" VALUE="<% mt('Post refund') |h %>" DISABLED>
+<INPUT TYPE="submit" NAME="submitButton" ID="confirm_refund_button" VALUE="<% mt('Post refund') |h %>" DISABLED>
 
 </FORM>
 
index 33a6c9b..970d47c 100644 (file)
@@ -29,8 +29,9 @@ Import a tax data update.
   <TR>
     <TD COLSPAN=2 ALIGN="center" STYLE="padding-top:6px">
       <INPUT TYPE    = "submit"
+             NAME    = "submitButton"
              VALUE   = "Download and Import"
-             onClick = "document.TaxRateImport.submit.disabled=true; process();"
+             onClick = "document.TaxRateImport.submitButton.disabled=true; process();"
       >
     </TD>
   </TR>
index 3290a3c..ff64e63 100644 (file)
@@ -29,8 +29,9 @@ Replace tax data.
   <TR>
     <TD COLSPAN=2 ALIGN="center" STYLE="padding-top:6px">
       <INPUT TYPE    = "submit"
+             NAME    = "submitButton"
              VALUE   = "Download and Import"
-             onClick = "document.TaxRateImport.submit.disabled=true; process();"
+             onClick = "document.TaxRateImport.submitButton.disabled=true; process();"
       >
     </TD>
   </TR>
index 7d7fb73..b07f5e9 100755 (executable)
@@ -63,7 +63,7 @@ Examples:
                                       sub { sprintf($money, $_[0]->$amount_field) },
                                     ],
                 'total_row'      => [ '<B>Total</B>',
-                                      sub { warn Dumper @_; sprintf("<B>$money</B>", $_[0]->$amount_field) },
+                                      sub { sprintf("<B>$money</B>", $_[0]->$amount_field) },
                                     ],
                 'show_combined'  => 1,
 &>