X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=httemplate%2Fedit%2Fcust_main%2Fname.html;h=0319cf0276002fc820ad964a172fe4d76c5c17db;hb=e8740b7c8f772508c0a393d3c0de2b3c8531280d;hp=74b2a7b5b78105b4a0043224559b7bbc7036eee7;hpb=63720c224b0c21f33f25b66bed80d280a66328a3;p=freeside.git
diff --git a/httemplate/edit/cust_main/name.html b/httemplate/edit/cust_main/name.html
index 74b2a7b5b..0319cf027 100644
--- a/httemplate/edit/cust_main/name.html
+++ b/httemplate/edit/cust_main/name.html
@@ -1,19 +1,33 @@
<%def .namepart>
-% my ($field, $value, $label, $extra) = @_;
-
+% my ($field, $value, $label, $extra, $unmask_field) = @_;
+
>
-
<% mt($label) %>
+% if (
+% $value
+% && ref $unmask_field
+% && $FS::CurrentUser::CurrentUser->access_right( $unmask_field->{access_right} )
+% ) {
+ <& /elements/link-replace_element_text.html, {
+ target_id => $unmask_field->{target_id},
+ replace_text => $unmask_field->{replace_text},
+ } &>
+% }
+
<% emt($label) %>
%def>
- <% mt('Contact name') |h %> |
+ <% mt('Contact name') |h %>
|
<& .namepart, 'last', $cust_main->last, 'Last', ',' &>
<& .namepart, 'first', $cust_main->first, 'First' &>
% if ( $conf->exists('show_ss') ) {
- <& .namepart, 'ss', $ss, 'SS#', "SIZE=11" &>
+ <& .namepart, 'ss', $ss, 'SS#', "SIZE=11 ID='ss'", {
+ target_id => 'ss',
+ replace_text => $cust_main->ss,
+ access_right => 'Unmask customer SSN',
+ } &>
% } else {
% }
@@ -21,7 +35,7 @@
|
% if ( $conf->exists('cust_main-enable_spouse') ) {
- <% mt('Spouse\'s name') |h %> |
+ <% mt('Spouse\'s name') |h %>
|
<& .namepart, 'spouse_last', $cust_main->spouse_last, 'Last', ',' &>
<& .namepart, 'spouse_first', $cust_main->spouse_first, 'First' &>
@@ -29,26 +43,25 @@
|
% }
-% if ( $conf->exists('cust-email-high-visibility') ) {
-
+ Email address(es)
- |
-
- ">Email address(es)
+
+ |
+
|
-% }
<%init>
my $cust_main = shift;
my $agentnum = $cust_main->agentnum if $cust_main->custnum;
my $conf = FS::Conf->new;
my $ss;
-if ( $cgi->param('error') or $conf->exists('unmask_ss') ) {
+if ( $cgi->param('error') ) {
$ss = $cust_main->ss;
} else {
$ss = $cust_main->masked('ss');