X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fview%2Fsvc_acct%2Fbasics.html;h=1b7d56b237d777af8ef92c16c7e6cac03c9b131c;hb=8c4fb61d3ab13ca97f9fe037555087506435d9da;hp=6a0ed92601c36c7a67d4886113f8184861a7b9e8;hpb=9f2280fbce022ab9bcfc46fe94483730b0aeb0f8;p=freeside.git diff --git a/httemplate/view/svc_acct/basics.html b/httemplate/view/svc_acct/basics.html index 6a0ed9260..1b7d56b23 100644 --- a/httemplate/view/svc_acct/basics.html +++ b/httemplate/view/svc_acct/basics.html @@ -1,6 +1,9 @@ <% &ntable("#cccccc") %><% &ntable("#cccccc",2) %> <& /view/elements/tr.html, label=>mt('Service'), value=>$part_svc->svc &> +% if ( $opt{cust_svc}->agent_svcid ) { + <& /view/elements/tr.html, label=>mt('Legacy ID'), value=>$opt{cust_svc}->agent_svcid &> +% } <& /view/elements/tr.html, label=>mt('Username'), value=>$svc_acct->username &> <& /view/elements/tr.html, label=>mt('Domain'), value=>$domain &> @@ -17,7 +20,7 @@ % if ( $password =~ /^\*\w+\* (.*)$/ ) { % $password = $1; % $show_pw .= '('. mt('login disabled') .') '; -% } +% } % if ( ! $password % && $svc_acct->_password_encryption ne 'plain' % && $svc_acct->_password @@ -25,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 &> @@ -42,6 +66,22 @@ <& /view/elements/tr.html, label=>mt('Access number'), value=>$svc_acct_pop->text &> % } +% if ( $svc_acct->sectornum && $conf->exists('svc_acct-tower_sector') ) { +% my $tower_sector = $svc_acct->tower_sector; +% my $link = $tower_sector->ip_addr +% ? '' +% : ''; + <& /view/elements/tr.html, + label => mt('Tower sector'), + value => $link. $tower_sector->description. ($link ? '' : ''), + &> +% } + +<& /view/elements/tr-svc_export_machine.html, + 'svc' => $svc_acct, + 'part_svc' => $part_svc, +&> + % if ($svc_acct->uid ne '') { <& /view/elements/tr.html, label=>mt('UID'), value=>$svc_acct->uid &> % } @@ -72,12 +112,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; +} + + % 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 + value=> slipip($svc_acct) &> % } @@ -100,7 +157,9 @@ % } <& /view/elements/tr.html, label=>mt('RADIUS groups'), - value=>join('
', $svc_acct->radius_groups('COMBINED')) &> + 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