summaryrefslogtreecommitdiff
path: root/httemplate/edit
diff options
context:
space:
mode:
authorMitch Jackson <mitch@freeside.biz>2018-06-15 21:14:44 -0500
committerMitch Jackson <mitch@freeside.biz>2018-07-18 18:08:44 +0000
commitea2858e409d074c635288824300de542c7615862 (patch)
treefb0c68a46c6b73f80ae58fb12ccc1c21cf01e307 /httemplate/edit
parent7ca76f46076f7be7ed43453b88ca558b325e13e5 (diff)
RT# 32234 Show unmask widget only if a value exists to unmask
Diffstat (limited to 'httemplate/edit')
-rw-r--r--httemplate/edit/cust_main/name.html3
-rw-r--r--httemplate/edit/cust_main/stateid.html2
2 files changed, 3 insertions, 2 deletions
diff --git a/httemplate/edit/cust_main/name.html b/httemplate/edit/cust_main/name.html
index c1078d46a..120475b92 100644
--- a/httemplate/edit/cust_main/name.html
+++ b/httemplate/edit/cust_main/name.html
@@ -3,7 +3,8 @@
<DIV STYLE="display: inline-block" ID="<% $field %>_input">
<INPUT TYPE="text" NAME="<% $field %>" VALUE="<% $value |h %>" <%$extra%>>
% if (
-% ref $unmask_field
+% $value
+% && ref $unmask_field
% && !$unmask_field->{unmask_ss}
% && $FS::CurrentUser::CurrentUser->access_right( $unmask_field->{access_right} )
% ) {
diff --git a/httemplate/edit/cust_main/stateid.html b/httemplate/edit/cust_main/stateid.html
index cc0890fe1..0f288099b 100644
--- a/httemplate/edit/cust_main/stateid.html
+++ b/httemplate/edit/cust_main/stateid.html
@@ -3,7 +3,7 @@
<TH ALIGN="right"><% $stateid_label %></TH>
<TD>
<INPUT TYPE="text" NAME="stateid" VALUE="<% $stateid %>" SIZE=12 ID="stateid">
-% if ( $FS::CurrentUser::CurrentUser->access_right( 'Unmask customer DL' )) {
+% if ( $stateid && $FS::CurrentUser::CurrentUser->access_right( 'Unmask customer DL' )) {
<& /elements/link-replace_element_text.html, {target_id => 'stateid', replace_text => $cust_main->stateid} &>
% }
</TD>