[freeside-commits] branch master updated. d65927fb45aa1c47d7f593db0142d14799b0fabf

Jonathan Prykop jonathan at 420.am
Thu Apr 14 06:39:26 PDT 2016


The branch, master has been updated
       via  d65927fb45aa1c47d7f593db0142d14799b0fabf (commit)
       via  55daa3803103f841d0fb2b559040115908724da8 (commit)
       via  497739310211650a12becc4ca7954c2b055499c8 (commit)
      from  ccd822eb8751deae96b57df4ce6abc56a195b9c4 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit d65927fb45aa1c47d7f593db0142d14799b0fabf
Author: Jonathan Prykop <jonathan at freeside.biz>
Date:   Thu Apr 14 08:38:54 2016 -0500

    RT#41671 Fix double click prevention for all legacy buttons [renamed all from submit to submitButton]

diff --git a/httemplate/browse/addr_block.cgi b/httemplate/browse/addr_block.cgi
index ba40bfd..536a4f7 100644
--- a/httemplate/browse/addr_block.cgi
+++ b/httemplate/browse/addr_block.cgi
@@ -111,7 +111,7 @@ $html_foot .= include( '/elements/select-agent.html',
                          'agent_null_right' => 'Broadband global configuration',
                      );
 $html_foot .= qq(
-  <INPUT TYPE="submit" NAME="submit" VALUE="Add">
+  <INPUT TYPE="submit" NAME="submitButton" VALUE="Add">
   </FORM>
 );
 
diff --git a/httemplate/edit/cust_main_attach.cgi b/httemplate/edit/cust_main_attach.cgi
index 0880c76..ba40b30 100755
--- a/httemplate/edit/cust_main_attach.cgi
+++ b/httemplate/edit/cust_main_attach.cgi
@@ -31,7 +31,7 @@
 </TABLE>
 <BR>
 % if(! $disabled) {
-<INPUT TYPE="submit" NAME="submit" 
+<INPUT TYPE="submit" NAME="submitButton" 
     VALUE="<% $attachnum ? emt("Apply changes") : emt("Upload File") %>">
 % }
 % if(defined $attach and $curuser->access_right('Delete attachment')) {
diff --git a/httemplate/edit/cust_pkg_detail.html b/httemplate/edit/cust_pkg_detail.html
index a1a6db6..37a8013 100644
--- a/httemplate/edit/cust_pkg_detail.html
+++ b/httemplate/edit/cust_pkg_detail.html
@@ -43,7 +43,7 @@
 </TABLE>
 
 <BR>
-<INPUT TYPE="submit" ID="submit" NAME="submit" VALUE="<% $title %>">
+<INPUT TYPE="submit" ID="submit" NAME="submitButton" VALUE="<% $title %>">
 
 </FORM>
 
diff --git a/httemplate/edit/cust_pkg_discount.html b/httemplate/edit/cust_pkg_discount.html
index e1e3dae..5aece57 100755
--- a/httemplate/edit/cust_pkg_discount.html
+++ b/httemplate/edit/cust_pkg_discount.html
@@ -23,7 +23,7 @@
 </TABLE>
 
 <BR>
-<INPUT NAME="submit" TYPE="submit" VALUE="Discount package">
+<INPUT NAME="submitButton" TYPE="submit" VALUE="Discount package">
 
 </FORM>
 </BODY>
diff --git a/httemplate/edit/cust_pkg_quantity.html b/httemplate/edit/cust_pkg_quantity.html
index ec47ed6..eadd1b5 100755
--- a/httemplate/edit/cust_pkg_quantity.html
+++ b/httemplate/edit/cust_pkg_quantity.html
@@ -21,7 +21,7 @@
 </TABLE>
 
 <BR>
-<INPUT NAME="submit" TYPE="submit" VALUE="Change">
+<INPUT NAME="submitButton" TYPE="submit" VALUE="Change">
 
 </FORM>
 </BODY>
diff --git a/httemplate/edit/cust_pkg_salesnum.html b/httemplate/edit/cust_pkg_salesnum.html
index dba2a90..da6c0e8 100755
--- a/httemplate/edit/cust_pkg_salesnum.html
+++ b/httemplate/edit/cust_pkg_salesnum.html
@@ -21,7 +21,7 @@
 </TABLE>
 
 <BR>
-<INPUT NAME="submit" TYPE="submit" VALUE="Change">
+<INPUT NAME="submitButton" TYPE="submit" VALUE="Change">
 
 </FORM>
 </BODY>
diff --git a/httemplate/edit/elements/ApplicationCommon.html b/httemplate/edit/elements/ApplicationCommon.html
index a531eaa..9c068c1 100644
--- a/httemplate/edit/elements/ApplicationCommon.html
+++ b/httemplate/edit/elements/ApplicationCommon.html
@@ -103,7 +103,7 @@ function changed(what) {
   dst = what.options[what.selectedIndex].value;
 
   if ( dst == '' ) {
-    what.form.submit.disabled=true;
+    what.form.submitButton.disabled=true;
 %if ($use_sub_dst_thing && $src_pkey eq 'crednum') {
     what.form.tax_button.disabled=true;
     what.form.clear_button.disabled=true;
@@ -111,7 +111,7 @@ function changed(what) {
     return true;
   }
 
-  what.form.submit.disabled=false;
+  what.form.submitButton.disabled=false;
 %if ($use_sub_dst_thing && $src_pkey eq 'crednum') {
   what.form.tax_button.disabled=false;
   what.form.clear_button.disabled=false;
@@ -373,7 +373,7 @@ function src_amount_changed () {
 <BR>
 <CENTER><INPUT TYPE="submit"
                VALUE="Apply"
-               NAME="submit"
+               NAME="submitButton"
                ID="submit"
 % if ($use_sub_dst_thing && $can_change_credit) {
                onClick="src_amount_changed()"
diff --git a/httemplate/edit/elements/part_svc_column.html b/httemplate/edit/elements/part_svc_column.html
index bc679e5..1944e5f 100644
--- a/httemplate/edit/elements/part_svc_column.html
+++ b/httemplate/edit/elements/part_svc_column.html
@@ -273,7 +273,7 @@ my %communigate_fields = (
 &>
 % $svcpart = '' if $opt{clone};
 <BR>
-<INPUT NAME="submit"
+<INPUT NAME="submitButton"
        TYPE="button"
        VALUE="<% emt($svcpart ? 'Apply changes' : 'Add service') %>"
        onclick="fixup_submit('<%$svcdb%>')"
diff --git a/httemplate/edit/invoice_logo.html b/httemplate/edit/invoice_logo.html
index e1c6149..f0064e2 100644
--- a/httemplate/edit/invoice_logo.html
+++ b/httemplate/edit/invoice_logo.html
@@ -54,7 +54,7 @@
 % if ( $mode eq 'upload' ) {
 
     Upload new logo (.<%uc($type)%> format): <INPUT TYPE="file" NAME="new_logo">
-    <BR><INPUT TYPE="submit" NAME="submit" VALUE="Upload">
+    <BR><INPUT TYPE="submit" NAME="submitButton" VALUE="Upload">
 
 % } elsif ( $mode eq 'preview' ) {
 
@@ -71,7 +71,7 @@
 
 % if ( $mode eq 'preview' ) {
   <BR>
-  <INPUT TYPE="submit" NAME="submit" VALUE="Change logo">
+  <INPUT TYPE="submit" NAME="submitButton" VALUE="Change logo">
 % }
 
 </FORM>
diff --git a/httemplate/edit/part_svc.cgi b/httemplate/edit/part_svc.cgi
index a07fc60..fa5a81a 100755
--- a/httemplate/edit/part_svc.cgi
+++ b/httemplate/edit/part_svc.cgi
@@ -37,7 +37,7 @@
 </STYLE>
 <SCRIPT TYPE="text/javascript">
 function fixup_submit(layer) {
-  document.forms[layer].submit.disabled = true;
+  document.forms[layer].submitButton.disabled = true;
   fixup(document.forms[layer]);
   window[layer+'process'].call();
 }
diff --git a/httemplate/edit/prospect_main-upload.html b/httemplate/edit/prospect_main-upload.html
index 24b1caa..733e5c2 100644
--- a/httemplate/edit/prospect_main-upload.html
+++ b/httemplate/edit/prospect_main-upload.html
@@ -2,6 +2,6 @@
 
   <FORM ACTION="prospect_main-ocr.html" METHOD="POST" ENCTYPE="multipart/form-data">
   <INPUT TYPE="file" NAME="card">
-  <BR><INPUT TYPE="submit" NAME="submit" VALUE="Upload">
+  <BR><INPUT TYPE="submit" NAME="submitButton" VALUE="Upload">
 
 <% include('/elements/footer.html') %>
diff --git a/httemplate/edit/quotation_pkg_detail.html b/httemplate/edit/quotation_pkg_detail.html
index 036bffd..10d5af0 100644
--- a/httemplate/edit/quotation_pkg_detail.html
+++ b/httemplate/edit/quotation_pkg_detail.html
@@ -39,7 +39,7 @@
 </TABLE>
 
 <BR>
-<INPUT TYPE="submit" ID="submit" NAME="submit" VALUE="<% $title %>">
+<INPUT TYPE="submit" ID="submit" NAME="submitButton" VALUE="<% $title %>">
 
 </FORM>
 
diff --git a/httemplate/elements/progress-init.html b/httemplate/elements/progress-init.html
index e38dde6..ba2e6be 100644
--- a/httemplate/elements/progress-init.html
+++ b/httemplate/elements/progress-init.html
@@ -92,8 +92,8 @@ function <%$key%>process () {
 
   //alert('<%$key%>process for form <%$formname%>');
 
-  if ( document.<%$formname%>.submit.disabled == false ) {
-    document.<%$formname%>.submit.disabled=true;
+  if ( document.<%$formname%>.submitButton.disabled == false ) {
+    document.<%$formname%>.submitButton.disabled=true;
   }
 
   overlib( 'Submitting job to server...', WIDTH, 444, HEIGHT, 168, CAPTION, 'Please wait...', STICKY, AUTOSTATUSCAP, CLOSETEXT, '', CLOSECLICK, MIDX, 0, MIDY, 0 );
diff --git a/httemplate/misc/cancel_cust.html b/httemplate/misc/cancel_cust.html
index 8536702..d3da6fe 100644
--- a/httemplate/misc/cancel_cust.html
+++ b/httemplate/misc/cancel_cust.html
@@ -55,7 +55,7 @@ toggle(false);
 
 <BR>
 <P ALIGN="CENTER">
-<INPUT TYPE="submit" NAME="submit" ID="confirm_cancel_cust_button" VALUE="<% mt('Cancel customer') |h %>" DISABLED> 
+<INPUT TYPE="submit" NAME="submitButton" ID="confirm_cancel_cust_button" VALUE="<% mt('Cancel customer') |h %>" DISABLED> 
         
 <INPUT TYPE="BUTTON" VALUE="<% mt("Don't cancel") |h %>" onClick="parent.cClick();"> 
 
diff --git a/httemplate/misc/cancel_pkg.html b/httemplate/misc/cancel_pkg.html
index c80b2b2..bee206a 100755
--- a/httemplate/misc/cancel_pkg.html
+++ b/httemplate/misc/cancel_pkg.html
@@ -91,7 +91,7 @@
 </TABLE>
 
 <BR>
-<INPUT TYPE="submit" NAME="submit" ID="confirm_cancel_pkg_button" 
+<INPUT TYPE="submit" NAME="submitButton" ID="confirm_cancel_pkg_button" 
   VALUE="<% mt($submit) |h %>"
   <% $method !~ /^(resume|uncancel)$/ ? 'DISABLED' : '' %>>
 
diff --git a/httemplate/misc/change_pkg_start.html b/httemplate/misc/change_pkg_start.html
index 5a890c8..25a3c24 100755
--- a/httemplate/misc/change_pkg_start.html
+++ b/httemplate/misc/change_pkg_start.html
@@ -47,7 +47,7 @@
 &>
 </LI>
 </UL>
-<INPUT TYPE="submit" NAME="submit" VALUE="<% emt('Set start date') %>">
+<INPUT TYPE="submit" NAME="submitButton" VALUE="<% emt('Set start date') %>">
 
 </FORM>
 </BODY>
diff --git a/httemplate/misc/cust_bill-promised_date.html b/httemplate/misc/cust_bill-promised_date.html
index 7b7b960..0e417a2 100644
--- a/httemplate/misc/cust_bill-promised_date.html
+++ b/httemplate/misc/cust_bill-promised_date.html
@@ -9,7 +9,7 @@
   emt('Promised date'),
 &>
 </TABLE>
-<INPUT TYPE="submit" NAME="submit" VALUE="<% emt('Set date') %>">
+<INPUT TYPE="submit" NAME="submitButton" VALUE="<% emt('Set date') %>">
 </FORM>
 <& /elements/footer.html &>
 <%init>
diff --git a/httemplate/misc/cust_main_note-import.cgi b/httemplate/misc/cust_main_note-import.cgi
index 2e7dc8b..12d6c36 100644
--- a/httemplate/misc/cust_main_note-import.cgi
+++ b/httemplate/misc/cust_main_note-import.cgi
@@ -190,7 +190,7 @@
 %      $row++;
 %    }
      </TABLE>
-     <INPUT TYPE="submit" NAME="submit" ID="importsubmit" VALUE="Import notes">
+     <INPUT TYPE="submit" NAME="submitButton" ID="importsubmit" VALUE="Import notes">
      <INPUT TYPE="checkbox" NAME="preview" onchange="previewChanged(this);">
      Preview mode
 %  } else {
diff --git a/httemplate/misc/delay_susp_pkg.html b/httemplate/misc/delay_susp_pkg.html
index 02f8824..6167509 100755
--- a/httemplate/misc/delay_susp_pkg.html
+++ b/httemplate/misc/delay_susp_pkg.html
@@ -36,7 +36,7 @@
 </TABLE>
 
 <BR>
-<INPUT TYPE="submit" NAME="submit" VALUE="<% $submit %>">
+<INPUT TYPE="submit" NAME="submitButton" VALUE="<% $submit %>">
 
 </FORM>
 </BODY>
diff --git a/httemplate/misc/nms-add_iface.html b/httemplate/misc/nms-add_iface.html
index 11456f2..74e1d83 100644
--- a/httemplate/misc/nms-add_iface.html
+++ b/httemplate/misc/nms-add_iface.html
@@ -10,7 +10,7 @@ Torrus Service Id
 	  )
 %>
 <BR>
-<INPUT TYPE="submit" NAME="submit" ID="submit_nms-add_iface" VALUE="Add Interface">
+<INPUT TYPE="submit" NAME="submitButton" ID="submit_nms-add_iface" VALUE="Add Interface">
 </FORM>
 
 <%init>
diff --git a/httemplate/misc/nms-add_router.html b/httemplate/misc/nms-add_router.html
index c32ceb8..3a8a150 100644
--- a/httemplate/misc/nms-add_router.html
+++ b/httemplate/misc/nms-add_router.html
@@ -14,7 +14,7 @@ SNMP Community String (optional)
 %>
 <BR>
 <BR>
-<INPUT TYPE="submit" NAME="submit" ID="submit_nms-add_router" VALUE="Add Router">
+<INPUT TYPE="submit" NAME="submitButton" ID="submit_nms-add_router" VALUE="Add Router">
 </FORM>
 </BODY></HTML>
 <%init>
diff --git a/httemplate/misc/progress-popup.html b/httemplate/misc/progress-popup.html
index 8e2d676..66fe9a8 100644
--- a/httemplate/misc/progress-popup.html
+++ b/httemplate/misc/progress-popup.html
@@ -58,8 +58,8 @@ function updateStatus( status_statustext ) {
     document.getElementById("progress_jobnum").innerHTML = '';
 
 %   unless ( $url ) {
-        if ( parent.document.<%$formname%>.submit.disabled == true ) {
-          parent.document.<%$formname%>.submit.disabled=false;
+        if ( parent.document.<%$formname%>.submitButton.disabled == true ) {
+          parent.document.<%$formname%>.submitButton.disabled=false;
         }
 %   }
 
@@ -93,8 +93,8 @@ function updateStatus( status_statustext ) {
     document.getElementById("progress_bar").innerHTML = '';
     document.getElementById("progress_percent").innerHTML = '<INPUT TYPE="button" VALUE="OK" onClick="<% $onClick %>">';
     document.getElementById("progress_jobnum").innerHTML = '';
-    if ( parent.document.<%$formname%>.submit.disabled == true ) {
-      parent.document.<%$formname%>.submit.disabled=false;
+    if ( parent.document.<%$formname%>.submitButton.disabled == true ) {
+      parent.document.<%$formname%>.submitButton.disabled=false;
     }
   } else {
     alert('XXX unknown status returned from server: ' + status);
diff --git a/httemplate/misc/recharge_svc.html b/httemplate/misc/recharge_svc.html
index a1732fc..593c0fa 100755
--- a/httemplate/misc/recharge_svc.html
+++ b/httemplate/misc/recharge_svc.html
@@ -37,7 +37,7 @@
 </TABLE>
 
 <BR>
-<INPUT TYPE="submit" NAME="submit" VALUE="Recharge">
+<INPUT TYPE="submit" NAME="submitButton" VALUE="Recharge">
 
 </FORM>
 
diff --git a/httemplate/misc/suspend_cust.html b/httemplate/misc/suspend_cust.html
index 83d9743..7d2c5f6 100644
--- a/httemplate/misc/suspend_cust.html
+++ b/httemplate/misc/suspend_cust.html
@@ -47,7 +47,7 @@ toggle(false);
 
 <BR>
 <P ALIGN="CENTER">
-<INPUT TYPE="submit" NAME="submit" ID="confirm_suspend_cust_button" VALUE="<% mt('Suspend customer') |h %>" DISABLED> 
+<INPUT TYPE="submit" NAME="submitButton" ID="confirm_suspend_cust_button" VALUE="<% mt('Suspend customer') |h %>" DISABLED> 
         
 <INPUT TYPE="BUTTON" VALUE="<% mt("Don't suspend") |h %>" onClick="parent.cClick();"> 
 
diff --git a/httemplate/misc/timeworked.html b/httemplate/misc/timeworked.html
index a0cf743..b24e313 100755
--- a/httemplate/misc/timeworked.html
+++ b/httemplate/misc/timeworked.html
@@ -86,7 +86,7 @@
 <INPUT TYPE="hidden" NAME="end"      VALUE="<% $cgi->param('end')      |h %>">
 <INPUT TYPE="hidden" NAME="category" VALUE="<% $cgi->param('category') |h %>">
 
-<INPUT TYPE="submit" NAME="submit" VALUE="<% $title %>">
+<INPUT TYPE="submit" NAME="submitButton" VALUE="<% $title %>">
 </FORM>
 
 <% include('/elements/footer.html') %>
diff --git a/httemplate/misc/unhold_pkg.html b/httemplate/misc/unhold_pkg.html
index 0c110b4..40b55c6 100755
--- a/httemplate/misc/unhold_pkg.html
+++ b/httemplate/misc/unhold_pkg.html
@@ -47,7 +47,7 @@
 &>
 </LI>
 </UL>
-<INPUT TYPE="submit" NAME="submit" VALUE="<% emt('Start billing') %>">
+<INPUT TYPE="submit" NAME="submitButton" VALUE="<% emt('Start billing') %>">
 
 </FORM>
 </BODY>
diff --git a/httemplate/misc/unsuspend_cust.html b/httemplate/misc/unsuspend_cust.html
index 4555a58..6c2c707 100644
--- a/httemplate/misc/unsuspend_cust.html
+++ b/httemplate/misc/unsuspend_cust.html
@@ -52,7 +52,7 @@ toggle(false);
 
 <BR>
 <P ALIGN="CENTER">
-<INPUT TYPE="submit" NAME="submit" ID="confirm_unsuspend_cust_button" VALUE="<% mt('Unsuspend customer') |h %>"> 
+<INPUT TYPE="submit" NAME="submitButton" ID="confirm_unsuspend_cust_button" VALUE="<% mt('Unsuspend customer') |h %>"> 
         
 <INPUT TYPE="BUTTON" VALUE="<% mt("Don't unsuspend") |h %>" onClick="parent.cClick();"> 
 
diff --git a/httemplate/search/cust_pkg_svc.html b/httemplate/search/cust_pkg_svc.html
index cdc7035..8a3c870 100644
--- a/httemplate/search/cust_pkg_svc.html
+++ b/httemplate/search/cust_pkg_svc.html
@@ -109,7 +109,7 @@ my $areboxes = 0;
 
 my $html_foot = qq!
 <BR>
-<INPUT TYPE="submit" NAME="submit" VALUE="Unprovision selected">
+<INPUT TYPE="submit" NAME="submitButton" VALUE="Unprovision selected">
 <INPUT TYPE="hidden" NAME="pkgnum" VALUE=$pkgnum>
 <INPUT TYPE="hidden" NAME="svcpart" VALUE=$svcpart>
 </FORM>!;
diff --git a/httemplate/view/svc_acct/change_svc.html b/httemplate/view/svc_acct/change_svc.html
index ed4aadd..0456214 100644
--- a/httemplate/view/svc_acct/change_svc.html
+++ b/httemplate/view/svc_acct/change_svc.html
@@ -9,7 +9,7 @@
 % } 
 
   </SELECT>
-  <INPUT NAME="submit" TYPE="submit" VALUE="<% mt('Change') |h %>" disabled>
+  <INPUT NAME="submitButton" TYPE="submit" VALUE="<% mt('Change') |h %>" disabled>
 
 % } 
 
diff --git a/httemplate/view/svc_acct/change_svc_form.html b/httemplate/view/svc_acct/change_svc_form.html
index 4f10922..7e2ef02 100644
--- a/httemplate/view/svc_acct/change_svc_form.html
+++ b/httemplate/view/svc_acct/change_svc_form.html
@@ -2,9 +2,9 @@
     <SCRIPT TYPE="text/javascript">
       function enable_change () {
         if ( document.OneTrueForm.svcpart.selectedIndex > 1 ) {
-          document.OneTrueForm.submit.disabled = false;
+          document.OneTrueForm.submitButton.disabled = false;
         } else {
-          document.OneTrueForm.submit.disabled = true;
+          document.OneTrueForm.submitButton.disabled = true;
         }
       }
     </SCRIPT>

commit 55daa3803103f841d0fb2b559040115908724da8
Author: Jonathan Prykop <jonathan at freeside.biz>
Date:   Thu Apr 14 08:21:26 2016 -0500

    RT#41671 Fix double click prevention for all legacy buttons [worked previously, renamed button, still work]

diff --git a/httemplate/edit/cust_tax_adjustment.html b/httemplate/edit/cust_tax_adjustment.html
index 9d4afbc..a013da6 100644
--- a/httemplate/edit/cust_tax_adjustment.html
+++ b/httemplate/edit/cust_tax_adjustment.html
@@ -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>
 
diff --git a/httemplate/edit/prepay_credit.cgi b/httemplate/edit/prepay_credit.cgi
index 3f0d6ba..01a54fc 100644
--- a/httemplate/edit/prepay_credit.cgi
+++ b/httemplate/edit/prepay_credit.cgi
@@ -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>
 
diff --git a/httemplate/edit/quick-charge.html b/httemplate/edit/quick-charge.html
index 14c3f51..1ff7000 100644
--- a/httemplate/edit/quick-charge.html
+++ b/httemplate/edit/quick-charge.html
@@ -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>
diff --git a/httemplate/edit/rate.cgi b/httemplate/edit/rate.cgi
index 5bfc108..57a472e 100644
--- a/httemplate/edit/rate.cgi
+++ b/httemplate/edit/rate.cgi
@@ -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) {
diff --git a/httemplate/edit/reg_code.cgi b/httemplate/edit/reg_code.cgi
index 76790ab..e8e08cd 100644
--- a/httemplate/edit/reg_code.cgi
+++ b/httemplate/edit/reg_code.cgi
@@ -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>
 
diff --git a/httemplate/misc/batch-cust_pay.html b/httemplate/misc/batch-cust_pay.html
index 197ade1..d785904 100644
--- a/httemplate/misc/batch-cust_pay.html
+++ b/httemplate/misc/batch-cust_pay.html
@@ -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>
 
diff --git a/httemplate/misc/email-quotation.html b/httemplate/misc/email-quotation.html
index 64e3691..bfc64b6 100644
--- a/httemplate/misc/email-quotation.html
+++ b/httemplate/misc/email-quotation.html
@@ -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>

commit 497739310211650a12becc4ca7954c2b055499c8
Author: Jonathan Prykop <jonathan at freeside.biz>
Date:   Thu Apr 14 08:10:48 2016 -0500

    RT#41671 Fix double click prevention for all legacy buttons [full-on fixes]

diff --git a/httemplate/edit/cust_refund.cgi b/httemplate/edit/cust_refund.cgi
index bfcbfe7..32da454 100755
--- a/httemplate/edit/cust_refund.cgi
+++ b/httemplate/edit/cust_refund.cgi
@@ -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 %>">
@@ -116,7 +116,7 @@
 </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>
 
diff --git a/httemplate/misc/tax-fetch_and_import.cgi b/httemplate/misc/tax-fetch_and_import.cgi
index 33a6c9b..970d47c 100644
--- a/httemplate/misc/tax-fetch_and_import.cgi
+++ b/httemplate/misc/tax-fetch_and_import.cgi
@@ -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>
diff --git a/httemplate/misc/tax-fetch_and_replace.cgi b/httemplate/misc/tax-fetch_and_replace.cgi
index 3290a3c..ff64e63 100644
--- a/httemplate/misc/tax-fetch_and_replace.cgi
+++ b/httemplate/misc/tax-fetch_and_replace.cgi
@@ -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>
diff --git a/httemplate/search/elements/cust_pay_or_refund.html b/httemplate/search/elements/cust_pay_or_refund.html
index 7d7fb73..b07f5e9 100755
--- a/httemplate/search/elements/cust_pay_or_refund.html
+++ b/httemplate/search/elements/cust_pay_or_refund.html
@@ -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,
 &>

-----------------------------------------------------------------------

Summary of changes:
 httemplate/browse/addr_block.cgi                   |    2 +-
 httemplate/edit/cust_main_attach.cgi               |    2 +-
 httemplate/edit/cust_pkg_detail.html               |    2 +-
 httemplate/edit/cust_pkg_discount.html             |    2 +-
 httemplate/edit/cust_pkg_quantity.html             |    2 +-
 httemplate/edit/cust_pkg_salesnum.html             |    2 +-
 httemplate/edit/cust_refund.cgi                    |    4 ++--
 httemplate/edit/cust_tax_adjustment.html           |    8 ++++----
 httemplate/edit/elements/ApplicationCommon.html    |    6 +++---
 httemplate/edit/elements/part_svc_column.html      |    2 +-
 httemplate/edit/invoice_logo.html                  |    4 ++--
 httemplate/edit/part_svc.cgi                       |    2 +-
 httemplate/edit/prepay_credit.cgi                  |    4 ++--
 httemplate/edit/prospect_main-upload.html          |    2 +-
 httemplate/edit/quick-charge.html                  |    8 ++++----
 httemplate/edit/quotation_pkg_detail.html          |    2 +-
 httemplate/edit/rate.cgi                           |    4 ++--
 httemplate/edit/reg_code.cgi                       |    4 ++--
 httemplate/elements/progress-init.html             |    4 ++--
 httemplate/misc/batch-cust_pay.html                |    6 +++---
 httemplate/misc/cancel_cust.html                   |    2 +-
 httemplate/misc/cancel_pkg.html                    |    2 +-
 httemplate/misc/change_pkg_start.html              |    2 +-
 httemplate/misc/cust_bill-promised_date.html       |    2 +-
 httemplate/misc/cust_main_note-import.cgi          |    2 +-
 httemplate/misc/delay_susp_pkg.html                |    2 +-
 httemplate/misc/email-quotation.html               |    4 ++--
 httemplate/misc/nms-add_iface.html                 |    2 +-
 httemplate/misc/nms-add_router.html                |    2 +-
 httemplate/misc/progress-popup.html                |    8 ++++----
 httemplate/misc/recharge_svc.html                  |    2 +-
 httemplate/misc/suspend_cust.html                  |    2 +-
 httemplate/misc/tax-fetch_and_import.cgi           |    3 ++-
 httemplate/misc/tax-fetch_and_replace.cgi          |    3 ++-
 httemplate/misc/timeworked.html                    |    2 +-
 httemplate/misc/unhold_pkg.html                    |    2 +-
 httemplate/misc/unsuspend_cust.html                |    2 +-
 httemplate/search/cust_pkg_svc.html                |    2 +-
 httemplate/search/elements/cust_pay_or_refund.html |    2 +-
 httemplate/view/svc_acct/change_svc.html           |    2 +-
 httemplate/view/svc_acct/change_svc_form.html      |    4 ++--
 41 files changed, 64 insertions(+), 62 deletions(-)




More information about the freeside-commits mailing list