X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fcust_main%2Fname.html;h=0319cf0276002fc820ad964a172fe4d76c5c17db;hb=4639e25a658d9a0bf295415642fae8e8cdad846a;hp=9c6a24b568814a70337f0675f51444e1bb6fd840;hpb=067302fb06457b79308c1f2333b9d64d59c4a45c;p=freeside.git
diff --git a/httemplate/edit/cust_main/name.html b/httemplate/edit/cust_main/name.html
index 9c6a24b56..0319cf027 100644
--- a/httemplate/edit/cust_main/name.html
+++ b/httemplate/edit/cust_main/name.html
@@ -1,8 +1,18 @@
<%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>
@@ -13,7 +23,11 @@
<& .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 {
% }
@@ -47,7 +61,7 @@ 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');