X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fview%2Fsvc_acct%2Fbasics.html;h=441c20add35d17bfd67952bb50a0387a39fbd116;hb=6d34c5060a4e5e9338ebc0d04459861a5c45e812;hp=1cdf7761547fdd7679abe48ae6efa0de7409e61a;hpb=0af38652da3b3be7da2d35b048285ef6f2194e1a;p=freeside.git
diff --git a/httemplate/view/svc_acct/basics.html b/httemplate/view/svc_acct/basics.html
index 1cdf77615..441c20add 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,27 @@
% {
% $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 &>
-
+% }
+
+ <% 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) )
+% {
+ <& /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 &>
@@ -91,15 +105,29 @@
% }
+<%perl>
+# minor false laziness w/ view/svc_broadband.cgi
+sub slipip {
+ my $svc_acct = shift;
+ my $out = $svc_acct->slipip or return '';
+ if ( $out eq '0.0.0.0' or $out eq '0e0' ) {
+ return '('.mt('Dynamic').'';
+ }
+ $out .= ' ('.
+ include('/elements/popup_link-ping.html', ip => $svc_acct->slipip).
+ ')';
+ if ( my $addr_block = $svc_acct->addr_block ) {
+ $out .= '
Netmask: ' . $addr_block->NetAddr->mask .
+ '
Gateway: ' . $addr_block->ip_gateway;
+ }
+ $out;
+}
+%perl>
+
% if ($svc_acct->slipip) {
<& /view/elements/tr.html,
label=>mt('IP address'),
- value=> ( $svc_acct->slipip eq "0.0.0.0" || $svc_acct->slipip eq '0e0' )
- ? "(".mt('Dynamic').")"
- : $svc_acct->slipip. ' '.
- include('/elements/popup_link-ping.html',
- 'ip'=>$svc_acct->slipip,
- )
+ value=> slipip($svc_acct)
&>
% }
@@ -124,6 +152,8 @@
<& /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.