[freeside-commits] branch FREESIDE_4_BRANCH updated. f50abf757bb3ff6cd567906adcb2ae4375b278cb

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


The branch, FREESIDE_4_BRANCH has been updated
       via  f50abf757bb3ff6cd567906adcb2ae4375b278cb (commit)
      from  9ed21392289deb8f4f80bce4e501af66dd84ad8c (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 f50abf757bb3ff6cd567906adcb2ae4375b278cb
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Wed Dec 14 09:36:44 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