[freeside-commits] branch master updated. 7bf6dafb0da4a525388a6f145dd0a904eddcec14

Mitch Jackson mitch at freeside.biz
Fri Jun 15 19:17:10 PDT 2018


The branch, master has been updated
       via  7bf6dafb0da4a525388a6f145dd0a904eddcec14 (commit)
      from  ca8a483f90e0c9ee4a1d2e65ddee07278ff48a9d (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 7bf6dafb0da4a525388a6f145dd0a904eddcec14
Author: Mitch Jackson <mitch at freeside.biz>
Date:   Fri Jun 15 21:14:44 2018 -0500

    RT# 32233 Show unmask widget only if a value exists to unmask

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>
diff --git a/httemplate/view/cust_main/contacts.html b/httemplate/view/cust_main/contacts.html
index 367659293..11efcd568 100644
--- a/httemplate/view/cust_main/contacts.html
+++ b/httemplate/view/cust_main/contacts.html
@@ -34,7 +34,11 @@
       <% $conf->exists('unmask_ss')
            ? $cust_main->ss
            : $cust_main->masked('ss') || ' ' %>
-%   if ( !$conf->exists('unmask_ss') && $FS::CurrentUser::CurrentUser->access_right('Unmask customer SSN')) {
+%   if (
+%         $cust_main->ss
+%         && !$conf->exists('unmask_ss')
+%         && $FS::CurrentUser::CurrentUser->access_right('Unmask customer SSN')
+%   ) {
       <& /elements/link-replace_element_text.html, {
            target_id    => 'ss_span',
            replace_text => $cust_main->ss,
@@ -186,7 +190,10 @@
     <TD>
       <span id="stateid_span" style="white-space:nowrap;">
       <% $cust_main->masked('stateid') || '&nbsp' %>
-%   if ( $FS::CurrentUser::CurrentUser->access_right('Unmask customer DL')) {
+%   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,

-----------------------------------------------------------------------

Summary of changes:
 httemplate/edit/cust_main/name.html     |  3 ++-
 httemplate/edit/cust_main/stateid.html  |  2 +-
 httemplate/view/cust_main/contacts.html | 11 +++++++++--
 3 files changed, 12 insertions(+), 4 deletions(-)




More information about the freeside-commits mailing list