[freeside-commits] branch master updated. 9d5f61a78f7cddeb65f6943f3e58326f47cc0c0b

Ivan ivan at 420.am
Wed Dec 14 09:36:40 PST 2016


The branch, master has been updated
       via  9d5f61a78f7cddeb65f6943f3e58326f47cc0c0b (commit)
      from  0af87aaed13a3e878946517f86ef11efb66c5c70 (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 9d5f61a78f7cddeb65f6943f3e58326f47cc0c0b
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Wed Dec 14 09:36:37 2016 -0800

    add double-click prevention to discount popup/form, RT#73799, and clarify labels

diff --git a/httemplate/edit/cust_pkg_discount.html b/httemplate/edit/cust_pkg_discount.html
index e1e3dae..79c3478 100755
--- a/httemplate/edit/cust_pkg_discount.html
+++ b/httemplate/edit/cust_pkg_discount.html
@@ -1,13 +1,17 @@
 <& /elements/header-popup.html, "Discount Package" &>
 <& /elements/error.html &>
 
-<FORM NAME="DiscountPkgForm" ACTION="<% $p %>edit/process/cust_pkg_discount.html" METHOD=POST>
+<FORM NAME     = "DiscountPkgForm"
+      ACTION   = "<% $p %>edit/process/cust_pkg_discount.html"
+      METHOD   = POST
+      onSubmit = "document.DiscountPkgForm.submit.disabled=true;"
+>
 <INPUT TYPE="hidden" NAME="pkgnum" VALUE="<% $pkgnum %>">
 
 <% ntable('#cccccc') %>
 
   <TR>
-    <TH ALIGN="right">Current package </TH>
+    <TH ALIGN="right">Package </TH>
     <TD COLSPAN=7>
       <% $curuser->option('show_pkgnum') ? $cust_pkg->pkgnum.': ' : '' %><B><% $part_pkg->pkg |h %></B> - <% $part_pkg->comment |h %>
     </TD>
@@ -18,6 +22,8 @@
   curr_value_recur  => $recur_discountnum,
   disable_setup     => $disable_setup,
   disable_recur     => $disable_recur,
+  setup_label       => emt('Setup fee discount'),
+  recur_label       => emt('Recurring fee discount'),
 &>
   
 </TABLE>
diff --git a/httemplate/elements/tr-select-pkg-discount.html b/httemplate/elements/tr-select-pkg-discount.html
index dc38cff..0c57fd8 100644
--- a/httemplate/elements/tr-select-pkg-discount.html
+++ b/httemplate/elements/tr-select-pkg-discount.html
@@ -34,7 +34,7 @@ description if curr_value_setup is set. Likewise "disable_recur".
 %   if ( $curuser->access_right('Waive setup fee') ) {
 %     push @$pre_options, -2 => 'Waive setup fee';
 %   }
-<& tr-td-label.html, label => emt('Setup fee') &>
+<& tr-td-label.html, label => $opt{setup_label} || emt('Setup fee') &>
   <td>
     <& select-discount.html,
       field       => 'setup_discountnum',
@@ -97,7 +97,7 @@ description if curr_value_setup is set. Likewise "disable_recur".
 % if ( $curuser->access_right('Discount customer package')
 %      and !$opt{disable_recur} ) {
 
-<& tr-td-label.html, label => emt('Recurring fee') &>
+<& tr-td-label.html, label => $opt{recur_label} || emt('Recurring fee') &>
   <td>
     <& select-discount.html,
       field       => 'recur_discountnum',

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

Summary of changes:
 httemplate/edit/cust_pkg_discount.html          |   10 ++++++++--
 httemplate/elements/tr-select-pkg-discount.html |    4 ++--
 2 files changed, 10 insertions(+), 4 deletions(-)




More information about the freeside-commits mailing list