[freeside-commits] freeside/httemplate/elements tr-select-cust_location.html, 1.15, 1.16 location.html, 1.16, 1.17

Ivan,,, ivan at wavetail.420.am
Sun Mar 13 20:53:31 PDT 2011


Update of /home/cvs/cvsroot/freeside/httemplate/elements
In directory wavetail.420.am:/tmp/cvs-serv10350/httemplate/elements

Modified Files:
	tr-select-cust_location.html location.html 
Log Message:
qualification address handling changes, RT#7111

Index: tr-select-cust_location.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/elements/tr-select-cust_location.html,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -w -d -r1.15 -r1.16
--- tr-select-cust_location.html	13 Mar 2011 18:56:02 -0000	1.15
+++ tr-select-cust_location.html	14 Mar 2011 03:53:29 -0000	1.16
@@ -11,6 +11,7 @@
 
             #optional
             'empty_label'   => '(default service address)',
+            'disable_empty' => 0, #1 to disable
          )
 
 </%doc>
@@ -159,7 +160,7 @@
   <<%$th%> ALIGN="right"><% $opt{'label'} || 'Service&nbsp;location' %></<%$th%>>
   <TD COLSPAN=7>
     <SELECT NAME="locationnum" onChange="locationnum_changed(this);">
-% if ( !$prospect_main ) {
+% if ( !$prospect_main && !$opt{'disable_empty'} ) {
       <OPTION VALUE=""><% $opt{'empty_label'} || '(default service address)' |h %>
 % }
 % if ( $opt{'is_optional'} ) {
@@ -267,7 +268,9 @@
 my $disabled =
   ( $locationnum < 0
     || ( $editable && $locationnum )
-    || ( $prospect_main && !$opt{'is_optional'} && !@cust_location && $addnew )
+    || ( ( $prospect_main || $opt{'disable_empty'} )
+         && !$opt{'is_optional'} && !@cust_location && $addnew
+       )
   )
     ? ''
     : 'DISABLED';

Index: location.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/elements/location.html,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -w -d -r1.16 -r1.17
--- location.html	13 Mar 2011 18:56:02 -0000	1.16
+++ location.html	14 Mar 2011 03:53:29 -0000	1.17
@@ -27,7 +27,7 @@
                  'field'      => 'location_kind',
                  'id'         => 'location_kind',
                  'disabled'   => $disabled,
-                 'style'      => \@style,
+                 #'style'      => \@style,
                  'options'    => \@location_kind_options,
                  'labels'     => $location_kind_labels,
                  'curr_value' => scalar($cgi->param('location_kind'))
@@ -98,7 +98,7 @@
                      'field'      => 'location_type',
                      'id'         => 'location_type',
                      'disabled'   => $disabled,
-                     'style'      => \@style,
+                     #'style'      => \@style,
                      'options'    => [ keys %location_types ],
                      'labels'     => \%location_types,
                      'curr_value' => $location_type,
@@ -252,7 +252,7 @@
   'prefix'   => $pre,
   'onchange' => $onchange,
   'disabled' => $disabled,
-  'style'    => \@style,
+  #'style'    => \@style,
 );
 
 my $th = $opt{'no_bold'} ? 'TD' : 'TH';



More information about the freeside-commits mailing list