X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=httemplate%2Fview%2Fsvc_acct%2Fbasics.html;h=1b7d56b237d777af8ef92c16c7e6cac03c9b131c;hb=6f471946b3ae36061cb595ba0657a5b43e7bfd5d;hp=2d9953fcc15f1ab2e7c34f9a768b2dadb8cea6ab;hpb=87f255507af9f14dfbccd37eefd71a148f9af344;p=freeside.git diff --git a/httemplate/view/svc_acct/basics.html b/httemplate/view/svc_acct/basics.html index 2d9953fcc..1b7d56b23 100644 --- a/httemplate/view/svc_acct/basics.html +++ b/httemplate/view/svc_acct/basics.html @@ -20,7 +20,7 @@ % if ( $password =~ /^\*\w+\* (.*)$/ ) { % $password = $1; % $show_pw .= '('. mt('login disabled') .') '; -% } +% } % if ( ! $password % && $svc_acct->_password_encryption ne 'plain' % && $svc_acct->_password @@ -28,13 +28,34 @@ % { % $show_pw .= '('. uc($svc_acct->_password_encryption). ' '.mt('encrypted').')'; % } elsif ( $conf->exists('showpasswords') ) { -% $show_pw .= '
'. encode_entities($password). '
'; +% $show_pw .= ''. encode_entities($password). ''; % } else { +% $password = ''; % $show_pw .= '('. mt('hidden') .')'; -% } -% $password = ''; -<& /view/elements/tr.html, label=>mt('Password'), value=>$show_pw &> - +% } +% my $psc = $part_svc->part_svc_column('_password'); +% if ( $psc->columnflag eq 'F' and $psc->columnvalue eq '' ) { +% # show nothing +% } else { + + <% mt('Password') %> + + <% $show_pw %> +% my $curuser = $FS::CurrentUser::CurrentUser; +% if ( $curuser->access_right('Provision customer service') or +% ($curuser->access_right('Edit password') and +% ! $part_svc->restrict_edit_password) +% and $psc->columnflag ne 'F' +% ) +% { + <& /elements/change_password.html, + 'svc_acct' => $svc_acct, + 'curr_value' => $password, + &> +% } + + +% } % if ( $conf->exists('security_phrase') ) { <& /view/elements/tr.html, label=>mt('Security phrase'), value=>$svc_acct->sec_phrase &> @@ -138,6 +159,8 @@ sub slipip { <& /view/elements/tr.html, label=>mt('RADIUS groups'), value=>join('
', $svc_acct->radius_groups('long_description')) &> +<& router.html, 'svc_acct' => $svc_acct &> + %# Can this be abstracted further? Maybe a library function like %# widget('HTML', 'view', $svc_acct) ? It would definitely make UI %# style management easier.