[freeside-commits] branch FREESIDE_3_BRANCH updated. 8b463a63a9e9fa5ebe4dc3e958ddc837ff2074a4

Mark Wells mark at 420.am
Thu Sep 19 12:46:00 PDT 2013


The branch, FREESIDE_3_BRANCH has been updated
       via  8b463a63a9e9fa5ebe4dc3e958ddc837ff2074a4 (commit)
      from  138523083b9b3480cb789ce868c5a6968dbc4b4d (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 8b463a63a9e9fa5ebe4dc3e958ddc837ff2074a4
Author: Mark Wells <mark at freeside.biz>
Date:   Thu Sep 19 12:45:36 2013 -0700

    fix package dropdown when there are no package classes, #20686

diff --git a/httemplate/elements/tr-select-cust-part_pkg.html b/httemplate/elements/tr-select-cust-part_pkg.html
index 8431beb..696baff 100644
--- a/httemplate/elements/tr-select-cust-part_pkg.html
+++ b/httemplate/elements/tr-select-cust-part_pkg.html
@@ -1,5 +1,3 @@
-%if ( scalar(@pkg_class) > 1 && ! $conf->exists('disable-cust-pkg_class') ) {
-
   <& /elements/xmlhttp.html,
                 'url'  => $p.'misc/cust-part_pkg.cgi',
                 'subs' => [ 'get_part_pkg' ],
@@ -28,7 +26,7 @@
         discountnum.disabled = true; //disable discount dropdown
       }
 
-      classnum = what.options[what.selectedIndex].value;
+      classnum = what.value;
 
       function update_part_pkg(part_pkg) {
 
@@ -70,6 +68,7 @@
 
   </SCRIPT>
 
+% if ( scalar(@pkg_class) > 1 && ! $conf->exists('disable-cust-pkg_class') ) {
   <TR>
     <TH ALIGN="right"><% mt('Package Class') |h %></TH>
     <TD COLSPAN=7>
@@ -81,7 +80,9 @@
     </TD>
   </TR>
 
-%}
+% } else { # so that the rest of the page works correctly
+  <INPUT TYPE="hidden" ID="classnum" NAME="classnum" VALUE="-1`">
+% }
 
 <TR>
   <TH ALIGN="right"><% mt('Package') |h %></TH>

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

Summary of changes:
 httemplate/elements/tr-select-cust-part_pkg.html |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)




More information about the freeside-commits mailing list