diff options
author | ivan <ivan> | 2011-03-14 03:53:29 +0000 |
---|---|---|
committer | ivan <ivan> | 2011-03-14 03:53:29 +0000 |
commit | eddffe5c35507f37ed83c2529626c9be5f81a516 (patch) | |
tree | c00ca21c1f9f006b5c6175fd6b0980982cf497bb /httemplate/elements | |
parent | 781e700c645d6c468d9f2755b81d555477359ff1 (diff) |
qualification address handling changes, RT#7111
Diffstat (limited to 'httemplate/elements')
-rw-r--r-- | httemplate/elements/location.html | 6 | ||||
-rw-r--r-- | httemplate/elements/tr-select-cust_location.html | 7 |
2 files changed, 8 insertions, 5 deletions
diff --git a/httemplate/elements/location.html b/httemplate/elements/location.html index f36f2c4cd..0ff119009 100644 --- a/httemplate/elements/location.html +++ b/httemplate/elements/location.html @@ -27,7 +27,7 @@ Example: '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 @@ Example: '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 @@ my %select_hash = ( 'prefix' => $pre, 'onchange' => $onchange, 'disabled' => $disabled, - 'style' => \@style, + #'style' => \@style, ); my $th = $opt{'no_bold'} ? 'TD' : 'TH'; diff --git a/httemplate/elements/tr-select-cust_location.html b/httemplate/elements/tr-select-cust_location.html index d17e4dfee..d7566262e 100644 --- a/httemplate/elements/tr-select-cust_location.html +++ b/httemplate/elements/tr-select-cust_location.html @@ -11,6 +11,7 @@ Example: #optional 'empty_label' => '(default service address)', + 'disable_empty' => 0, #1 to disable ) </%doc> @@ -159,7 +160,7 @@ Example: <<%$th%> ALIGN="right"><% $opt{'label'} || 'Service 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 @@ push @cust_location, $cust_location 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'; |