This commit was generated by cvs2svn to compensate for changes in r6255,
[freeside.git] / httemplate / edit / cust_main / contact.html
index 6efad44..21c6b29 100644 (file)
   </TD>
 </TR>
 
+% my $address2_label_style =
+%   ( $disabled
+%     || ! $conf->exists('cust_main-require_address2')
+%     || ( !$pre && !$opt{'same_checked'} )
+%   )
+%     ? 'visibility:hidden'
+%     : '';
+
 <TR>
-  <TD ALIGN="right">&nbsp;</TD>
+  <TD ALIGN="right"><FONT ID="<% $pre %>address2_required" color="#ff0000" STYLE="<% $address2_label_style %>">*</FONT>&nbsp;<FONT ID="<% $pre %>address2_label" STYLE="<% $address2_label_style %>"><B>Unit&nbsp;#</B></FONT></TD>
   <TD COLSPAN=7>
     <INPUT TYPE="text" NAME="<%$pre%>address2" VALUE="<% $cust_main->get($pre.'address2') %>" SIZE=70 onChange="<% $onchange %>" <%$disabled%>>
   </TD>
 
 <%init>
 
-my( $cust_main, $pre, $onchange, $disabled, %opt ) = @_;
+#my( $cust_main, $pre, $onchange, $disabled, %opt ) = @_;
+my %opt = @_;
+my $cust_main = $opt{'cust_main'};
+my $pre       = $opt{'pre'};
+my $onchange  = $opt{'onchange'};
+my $disabled  = $opt{'disabled'};
+
 my $conf = new FS::Conf;
 
 foreach (qw(ss stateid)) {
@@ -151,10 +165,18 @@ my @counties = counties( $cust_main->get($pre.'state'),
                        );
 my $county_style = scalar(@counties) > 1 ? '' : 'STYLE="visibility:hidden"';
 
-my $daytime_label = FS::Msgcat::_gettext('daytime') || 'Day Phone';
-my $night_label = FS::Msgcat::_gettext('night') || 'Night Phone';
-my $stateid_label = FS::Msgcat::_gettext('stateid') || 'Driver&rsquo;s License';
-my $stateid_state_label = FS::Msgcat::_gettext('stateid_state') || 'Driver&rsquo;s License State';
+my $daytime_label = FS::Msgcat::_gettext('daytime') =~ /^(daytime)?$/
+                  ? 'Day Phone'
+                  : FS::Msgcat::_gettext('daytime');
+my $night_label = FS::Msgcat::_gettext('night') =~/^(night)?$/
+                ? 'Night Phone'
+                : FS::Msgcat::_gettext('night') || 'Night Phone';
+my $stateid_label = FS::Msgcat::_gettext('stateid') =~ /^(stateid)?$/
+                  ? 'Driver&rsquo;s License'
+                  : FS::Msgcat::_gettext('stateid') || 'Driver&rsquo;s License';
+my $stateid_state_label = FS::Msgcat::_gettext('stateid_state') =~ /^(stateid_state)?$/
+                        ? 'Driver&rsquo;s License State'
+                        : FS::Msgcat::_gettext('stateid_state') || 'Driver&rsquo;s License State';
 
 my $r = qq!<font color="#ff0000">*</font>&nbsp;!;