diff options
author | Mitch Jackson <mitch@freeside.biz> | 2018-06-13 02:25:09 -0500 |
---|---|---|
committer | Mitch Jackson <mitch@freeside.biz> | 2018-06-13 02:27:23 -0500 |
commit | 381992561d7b1a88e05d49d3e474a2fad25873c7 (patch) | |
tree | a54cb4f63da0a40f666ad8f62439e7621591d61b /httemplate/edit/cust_main | |
parent | 360f89789c45e1fd7cb84b1442d2f0c8353066d9 (diff) |
RT# 32234 Allow unmask of SSN/DL#
Diffstat (limited to 'httemplate/edit/cust_main')
-rw-r--r-- | httemplate/edit/cust_main/name.html | 19 | ||||
-rw-r--r-- | httemplate/edit/cust_main/stateid.html | 7 |
2 files changed, 23 insertions, 3 deletions
diff --git a/httemplate/edit/cust_main/name.html b/httemplate/edit/cust_main/name.html index 713f54cdb..c1078d46a 100644 --- a/httemplate/edit/cust_main/name.html +++ b/httemplate/edit/cust_main/name.html @@ -1,7 +1,17 @@ <%def .namepart> -% my ($field, $value, $label, $extra) = @_; +% my ($field, $value, $label, $extra, $unmask_field) = @_; <DIV STYLE="display: inline-block" ID="<% $field %>_input"> <INPUT TYPE="text" NAME="<% $field %>" VALUE="<% $value |h %>" <%$extra%>> +% if ( +% ref $unmask_field +% && !$unmask_field->{unmask_ss} +% && $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}, + } &> +% } <BR><FONT SIZE="-1" COLOR="#333333"><% emt($label) %></FONT> </DIV> </%def> @@ -13,7 +23,12 @@ <& .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', + unmask_ss => $conf->exists('unmask_ss'), + } &> % } else { <INPUT TYPE="hidden" NAME="ss" VALUE="<% $ss %>"> % } diff --git a/httemplate/edit/cust_main/stateid.html b/httemplate/edit/cust_main/stateid.html index 3500d631c..cc0890fe1 100644 --- a/httemplate/edit/cust_main/stateid.html +++ b/httemplate/edit/cust_main/stateid.html @@ -1,7 +1,12 @@ % if ( $conf->exists('show_stateid') ) { <TR> <TH ALIGN="right"><% $stateid_label %></TH> - <TD><INPUT TYPE="text" NAME="stateid" VALUE="<% $stateid %>" SIZE=12></TD> + <TD> + <INPUT TYPE="text" NAME="stateid" VALUE="<% $stateid %>" SIZE=12 ID="stateid"> +% if ( $FS::CurrentUser::CurrentUser->access_right( 'Unmask customer DL' )) { + <& /elements/link-replace_element_text.html, {target_id => 'stateid', replace_text => $cust_main->stateid} &> +% } + </TD> <TD><& /elements/select-state.html, state => $cust_main->stateid_state, country => $cust_main->country, # how does this work on new customer? |