RT#41671 Fix double click prevention for all legacy buttons [worked previously, renam...
authorJonathan Prykop <jonathan@freeside.biz>
Thu, 14 Apr 2016 13:21:26 +0000 (08:21 -0500)
committerJonathan Prykop <jonathan@freeside.biz>
Thu, 14 Apr 2016 13:21:26 +0000 (08:21 -0500)
httemplate/edit/cust_tax_adjustment.html
httemplate/edit/prepay_credit.cgi
httemplate/edit/quick-charge.html
httemplate/edit/rate.cgi
httemplate/edit/reg_code.cgi
httemplate/misc/batch-cust_pay.html
httemplate/misc/email-quotation.html

index 9d4afbc..a013da6 100644 (file)
@@ -7,9 +7,9 @@
 function enable_tax_adjustment () {
   if (    document.TaxAdjustmentForm.amount.value
        && document.TaxAdjustmentForm.taxname.selectedIndex > 0  ) {
-    document.TaxAdjustmentForm.submit.disabled = false;
+    document.TaxAdjustmentForm.submitButton.disabled = false;
   } else {
-    document.TaxAdjustmentForm.submit.disabled = true;
+    document.TaxAdjustmentForm.submitButton.disabled = true;
   }
 }
 
@@ -34,7 +34,7 @@ function validate_tax_adjustment () {
 
 </SCRIPT>
 
-<FORM ACTION="process/cust_tax_adjustment.html" NAME="TaxAdjustmentForm" ID="TaxAdjustmentForm" METHOD="POST" onsubmit="document.TaxAdjustmentForm.submit.disabled=true;return validate_tax_adjustment();">
+<FORM ACTION="process/cust_tax_adjustment.html" NAME="TaxAdjustmentForm" ID="TaxAdjustmentForm" METHOD="POST" onsubmit="document.TaxAdjustmentForm.submitButton.disabled=true;return validate_tax_adjustment();">
 
 <INPUT TYPE="hidden" NAME="custnum" VALUE="<% $custnum %>">
 
@@ -69,7 +69,7 @@ function validate_tax_adjustment () {
 </TABLE>
 
 <BR>
-<INPUT TYPE="submit" ID="submit" NAME="submit" VALUE="Add tax adjustment" <% $cgi->param('error') ? '' :' DISABLED' %>>
+<INPUT TYPE="submit" ID="submit" NAME="submitButton" VALUE="Add tax adjustment" <% $cgi->param('error') ? '' :' DISABLED' %>>
 
 </FORM>
 
index 3f0d6ba..01a54fc 100644 (file)
@@ -2,7 +2,7 @@
 
 <% include('/elements/error.html') %>
 
-<FORM ACTION="<%popurl(1)%>process/prepay_credit.cgi" METHOD="POST" NAME="OneTrueForm" onSubmit="document.OneTrueForm.submit.disabled=true">
+<FORM ACTION="<%popurl(1)%>process/prepay_credit.cgi" METHOD="POST" NAME="OneTrueForm" onSubmit="document.OneTrueForm.submitButton.disabled=true">
 
 Generate
 <INPUT TYPE="text" NAME="num" VALUE="<% $cgi->param('num') || '(quantity)' |h %>" SIZE=10 MAXLENGTH=10 onFocus="if ( this.value == '(quantity)' ) { this.value = ''; }">
@@ -74,7 +74,7 @@ $<INPUT TYPE="text" NAME="amount" SIZE=8 MAXLENGTH=7 VALUE="<% $cgi->param('amou
 </TD></TR>
 </TABLE>
 <BR><BR>
-<INPUT TYPE="submit" NAME="submit" VALUE="Generate" onSubmit="this.disabled = true">
+<INPUT TYPE="submit" NAME="submitButton" VALUE="Generate" onSubmit="this.disabled = true">
 
 </FORM>
 
index 14c3f51..1ff7000 100644 (file)
@@ -15,9 +15,9 @@ function enable_quick_charge (e) {
 
   if (    document.QuickChargeForm.amount.value
        && document.QuickChargeForm.pkg.value    ) {
-    document.QuickChargeForm.submit.disabled = false;
+    document.QuickChargeForm.submitButton.disabled = false;
   } else {
-    document.QuickChargeForm.submit.disabled = true;
+    document.QuickChargeForm.submitButton.disabled = true;
   }
 
 % if ( $curuser->option('disable_enter_submit_onetimecharge') ) {
@@ -97,7 +97,7 @@ function bill_now_changed (what) {
       NAME     = "QuickChargeForm"
       ID       = "QuickChargeForm"
       METHOD   = "POST"
-      onSubmit = "document.QuickChargeForm.submit.disabled=true; return validate_quick_charge();"
+      onSubmit = "document.QuickChargeForm.submitButton.disabled=true; return validate_quick_charge();"
 >
 
 <INPUT TYPE="hidden" NAME="custnum"     VALUE="<% $cust_main ? $cust_main->custnum : '' %>">
@@ -362,7 +362,7 @@ function bill_now_changed (what) {
 % my $label = $cust_pkg
 %             ? emt('Modify one-time charge')
 %             : emt('Add one-time charge');
-<INPUT TYPE="submit" ID="submit" NAME="submit" VALUE="<% $label %>" \
+<INPUT TYPE="submit" ID="submit" NAME="submitButton" VALUE="<% $label %>" \
 <% ($cgi->param('error') || $cust_pkg) ? '' :' DISABLED' %>>
 
 </FORM>
index 5bfc108..57a472e 100644 (file)
@@ -31,9 +31,9 @@
 </TABLE>
 <BR>
 
-<INPUT NAME="submit" TYPE="button" VALUE="<% 
+<INPUT NAME="submitButton" TYPE="button" VALUE="<% 
   $rate->ratenum ? "Apply changes" : "Add rate plan"
-%>" onClick="document.OneTrueForm.submit.disabled=true; process();">
+%>" onClick="document.OneTrueForm.submitButton.disabled=true; process();">
 </FORM>
 
 % if($rate->ratenum) {
index 76790ab..e8e08cd 100644 (file)
@@ -2,7 +2,7 @@
 
 <% include('/elements/error.html') %>
 
-<FORM ACTION="<%popurl(1)%>process/reg_code.cgi" METHOD="POST" NAME="OneTrueForm" onSubmit="document.OneTrueForm.submit.disabled=true">
+<FORM ACTION="<%popurl(1)%>process/reg_code.cgi" METHOD="POST" NAME="OneTrueForm" onSubmit="document.OneTrueForm.submitButton.disabled=true">
 <INPUT TYPE="hidden" NAME="agentnum" VALUE="<% $agent->agentnum %>">
 
 Generate
@@ -25,7 +25,7 @@ registration codes for <B><% $agent->agent %></B> allowing the following package
 
 
 <BR>
-<INPUT TYPE="submit" NAME="submit" VALUE="Generate">
+<INPUT TYPE="submit" NAME="submitButton" VALUE="Generate">
 
 </FORM>
 
index 197ade1..d785904 100644 (file)
@@ -17,7 +17,7 @@
 <SCRIPT TYPE="text/javascript">
 function warnUnload() {
   if(document.getElementById("OneTrueTable").rows.length > 3 &&
-     !document.OneTrueForm.btnsubmit.disabled) {
+     !document.OneTrueForm.submitButton.disabled) {
     return "The current batch will be lost.";
   }
   else {
@@ -421,7 +421,7 @@ function preload() {
            )
 %>
 
-<FORM ACTION="process/batch-cust_pay.cgi" NAME="OneTrueForm" METHOD="POST" onsubmit="document.OneTrueForm.btnsubmit.disabled=true;window.onbeforeunload = null;">
+<FORM ACTION="process/batch-cust_pay.cgi" NAME="OneTrueForm" METHOD="POST" onsubmit="document.OneTrueForm.submitButton.disabled=true;window.onbeforeunload = null;">
 
 <!-- <B>Batch</B> <INPUT TYPE="text" NAME="paybatch"><BR><BR> -->
 <& /elements/xmlhttp.html,
@@ -448,7 +448,7 @@ function preload() {
 &>
 
 <BR>
-<INPUT TYPE="button" VALUE="Post payment batch" name="btnsubmit" onclick="window.onbeforeunload = null; document.OneTrueForm.submit(); this.disabled = true;">
+<INPUT TYPE="button" VALUE="Post payment batch" name="submitButton" onclick="window.onbeforeunload = null; document.OneTrueForm.submit(); this.disabled = true;">
 
 </FORM>
 
index 64e3691..bfc64b6 100644 (file)
@@ -2,7 +2,7 @@
 
 <% include('/elements/error.html') %>
 
-<FORM NAME="OneTrueForm" METHOD="POST" ACTION="process/email-quotation.html" onSubmit="document.OneTrueForm.submit.disabled=true; document.OneTrueForm.submit.style.display='none'; document.getElementById('emailingwait').style.display='';">
+<FORM NAME="OneTrueForm" METHOD="POST" ACTION="process/email-quotation.html" onSubmit="document.OneTrueForm.submitButton.disabled=true; document.OneTrueForm.submitButton.style.display='none'; document.getElementById('emailingwait').style.display='';">
 <INPUT TYPE="hidden" NAME="quotationnum" VALUE="<% $quotationnum %>">
 
 <% ntable("#cccccc", 2) %>
@@ -46,7 +46,7 @@
 
 <CENTER>
 % if ( $emails ) {
-  <BUTTON TYPE="submit" NAME="submit" ID="submit">Email quotation</BUTTON>
+  <BUTTON TYPE="submit" NAME="submitButton" ID="submit">Email quotation</BUTTON>
   <DIV ID="emailingwait" STYLE="display:none">
     <IMG SRC="<%$p%>images/wait-orange.gif"> <B>Sending...</B>
   </DIV>