RT# 32234 unmask_ss deprecated - drop from templates
[freeside.git] / httemplate / view / cust_main / contacts.html
index 3feff2f..efcf48e 100644 (file)
@@ -10,7 +10,7 @@
 %   if ( $this eq 'ship' and 
 %       $cust_main->bill_locationnum == $cust_main->ship_locationnum )
 %   {
- (<% mt('same as billing') %>)
+ (<% emt('same as billing') %>)
 %   }
 </FONT>
 %   if (
     <TD COLSPAN=5><% $cust_main->contact |h %></TD>
 %   if ( $conf->exists('show_ss') ) {
     <TH ALIGN="right"><% mt('SS#') |h %></TH>
-    <TD><% $conf->exists('unmask_ss')
-                              ? $cust_main->ss
-                              : $cust_main->masked('ss') || '&nbsp;' %></TD>
+    <TD>
+      <span id="ss_span" style="white-space:nowrap;">
+      <% $cust_main->masked('ss') || '&nbsp;' %>
+%   if (
+%         $cust_main->ss
+%         && $FS::CurrentUser::CurrentUser->access_right('Unmask customer SSN')
+%   ) {
+      <& /elements/link-replace_element_text.html, {
+           target_id    => 'ss_span',
+           replace_text => $cust_main->ss,
+           element_type => 'span'
+      } &>
+%   }
+      </span>
+    </TD>
 %   }
   </TR>
 %   if ( $conf->exists('cust_main-enable_spouse') and
@@ -82,7 +94,7 @@
 % } elsif ( $this eq 'ship' ) {
 %   if ( $cust_main->ship_company ) { # mostly obsolete these days...
   <TR>
-    <TD ALIGN="right"><% mt('Company') |h %></TD>
+    <TH ALIGN="right"><% mt('Company') |h %></TH>
     <TD COLSPAN=7><% $cust_main->ship_company |h %></TD>
   </TR>
 %   }
 
 %   if ( $location->locationname ) {
       <TR>
-        <TD ALIGN="right"><% mt('Location ID') |h %></TD>
+        <TH ALIGN="right"><% mt('Location ID') |h %></TH>
         <TD COLSPAN=7><% $location->locationname |h %></TD>
       </TR>
 %   }
 %   if ( $cust_main->get('fax') ) {
 
   <TR>
-    <TD ALIGN="right"><% mt('Fax') |h %></TD>
+    <TH ALIGN="right"><% mt('Fax') |h %></TH>
     <TD COLSPAN=3>
       <% $cust_main->get('fax') || '&nbsp;' %>
     </TD>
 %   if ( $conf->exists('show_stateid') ) { 
 
 <TR>
-    <TD ALIGN="right"><% $stateid_label %></TD>
-    <TD><% $cust_main->masked('stateid') || '&nbsp' %></TD>
-    <TD ALIGN="right"><% $stateid_state_label %></TD>
+    <TH ALIGN="right"><% $stateid_label %></TH>
+    <TD>
+      <span id="stateid_span" style="white-space:nowrap;">
+      <% $cust_main->masked('stateid') || '&nbsp' %>
+%   if (
+%         $cust_main->stateid
+%         && $FS::CurrentUser::CurrentUser->access_right('Unmask customer DL')
+%   ) {
+      <& /elements/link-replace_element_text.html, {
+           target_id => 'stateid_span',
+           replace_text => $cust_main->stateid,
+           element_type => 'span'
+      } &>
+%   }
+      </span>
+    </TD>
+    <TH ALIGN="right"><% $stateid_state_label %></TH>
     <TD><% $cust_main->stateid_state || '&nbsp' %></TD>
   </TR>