summaryrefslogtreecommitdiff
path: root/httemplate/elements/location.html
diff options
context:
space:
mode:
Diffstat (limited to 'httemplate/elements/location.html')
-rw-r--r--httemplate/elements/location.html18
1 files changed, 7 insertions, 11 deletions
diff --git a/httemplate/elements/location.html b/httemplate/elements/location.html
index 0b91add52..f36f2c4cd 100644
--- a/httemplate/elements/location.html
+++ b/httemplate/elements/location.html
@@ -20,7 +20,7 @@ Example:
% if ( $opt{'alt_format'} ) {
<TR>
- <<%$th%> ALIGN="right">Location kind</<%$th%>>
+ <<%$th%> ALIGN="right">Location&nbsp;kind</<%$th%>>
<TD>
<% include('/elements/select.html',
'cgi' => $cgi,
@@ -79,7 +79,7 @@ Example:
>
<TR>
- <<%$th%> ALIGN="right">Unit type and #</<%$th%>>
+ <<%$th%> ALIGN="right">Unit&nbsp;type&nbsp;and&nbsp;#</<%$th%>>
<TD COLSPAN=7>
% my $location_type = scalar($cgi->param('location_type'))
@@ -136,15 +136,9 @@ Example:
<% $style %>
>
-% if ( $object->get($pre.'address2') ) {
-
-% #XXX try to parse first
-% if ( 0 ) {
-% } else { #XXX i don't work so well when the dropdown is changed :/ i probably need to be triggered by "default service address"
- Can't parse unit type and number from <B><% $object->get($pre.'address2') |h %></B>
-% }
-
-% }
+% #XXX i don't work so well when the dropdown is changed :/ i probably need to be triggered by "default service address"
+% $alt_err =~ s/(ship_)?address2/'<B>'.encode_entities($object->get($1.'address2')).'<\/B>'/e;
+ <% $alt_err %>
</TD>
@@ -219,6 +213,8 @@ $object->set($pre.'state', $statedefault )
unless $object->get($pre.'state')
|| $object->get($pre.'country') ne $countrydefault;
+my $alt_err = ($opt{'alt_format'} && !$disabled) ? $object->alternize : '';
+
my @style = ();
push @style, 'background-color: #dddddd' if $disabled;