1 <% &ntable("#cccccc") %><TR><TD><% &ntable("#cccccc",2) %>
3 <& /view/elements/tr.html, label=>mt('Service'), value=>$part_svc->svc &>
4 % if ( $opt{cust_svc}->agent_svcid ) {
5 <& /view/elements/tr.html, label=>mt('Legacy ID'), value=>$opt{cust_svc}->agent_svcid &>
7 <& /view/elements/tr.html, label=>mt('Username'), value=>$svc_acct->username &>
8 <& /view/elements/tr.html, label=>mt('Domain'), value=>$domain &>
10 % if ( $opt{'communigate'} ) {
11 <& /view/elements/tr.html, label=>mt('Aliases'), value=>$svc_acct->cgp_aliases &>
14 % if ( $svc_acct->pbxsvc ) {
15 <& /view/elements/tr.html, label=>mt('PBX'), value=>$svc_acct->pbx_title &>
19 % my $password = $svc_acct->get_cleartext_password;
20 % if ( $password =~ /^\*\w+\* (.*)$/ ) {
22 % $show_pw .= '<I>('. mt('login disabled') .')</I> ';
25 % && $svc_acct->_password_encryption ne 'plain'
26 % && $svc_acct->_password
29 % $show_pw .= '<I>('. uc($svc_acct->_password_encryption). ' '.mt('encrypted').')</I>';
30 % } elsif ( $conf->exists('showpasswords') ) {
31 % $show_pw .= '<PRE>'. encode_entities($password). '</PRE>';
33 % $show_pw .= '<I>('. mt('hidden') .')</I>';
36 <& /view/elements/tr.html, label=>mt('Password'), value=>$show_pw &>
39 % if ( $conf->exists('security_phrase') ) {
40 <& /view/elements/tr.html, label=>mt('Security phrase'), value=>$svc_acct->sec_phrase &>
43 % if ( $svc_acct->popnum ) {
44 % my $svc_acct_pop = qsearchs('svc_acct_pop',{'popnum'=>$svc_acct->popnum});
45 <& /view/elements/tr.html, label=>mt('Access number'), value=>$svc_acct_pop->text &>
48 % if ( $svc_acct->sectornum && $conf->exists('svc_acct-tower_sector') ) {
49 % my $tower_sector = $svc_acct->tower_sector;
50 % my $link = $tower_sector->ip_addr
51 % ? '<A HREF="http://'. $tower_sector->ip_addr. '">'
53 <& /view/elements/tr.html,
54 label => mt('Tower sector'),
55 value => $link. $tower_sector->description. ($link ? '</A>' : ''),
59 % if ($svc_acct->uid ne '') {
60 <& /view/elements/tr.html, label=>mt('UID'), value=>$svc_acct->uid &>
63 % if ($svc_acct->gid ne '') {
64 <& /view/elements/tr.html, label=>mt('GID'), value=>$svc_acct->gid &>
67 % if ($svc_acct->finger ne '') {
68 <& /view/elements/tr.html, label=>mt('Real Name'), value=>$svc_acct->finger &>
71 % if ($svc_acct->dir ne '') {
72 <& /view/elements/tr.html, label=>mt('Home directory'), value=>$svc_acct->dir &>
75 % if ($svc_acct->shell ne '') {
76 <& /view/elements/tr.html, label=>mt('Shell'), value=>$svc_acct->shell &>
79 % if ($svc_acct->quota ne '' && ! $opt{'communigate'} ) {
81 <& /view/elements/tr.html, label=>mt('Quota'), value=>$svc_acct->quota &>
83 % } elsif ( $opt{'communigate'} ) {
85 <& communigate.html, %opt &>
89 % if ($svc_acct->slipip) {
90 <& /view/elements/tr.html,
91 label=>mt('IP address'),
92 value=> ( $svc_acct->slipip eq "0.0.0.0" || $svc_acct->slipip eq '0e0' )
93 ? "<I>(".mt('Dynamic').")</I>"
94 : $svc_acct->slipip. ' '.
95 include('/elements/popup_link-ping.html',
96 'ip'=>$svc_acct->slipip,
101 <& usage.html, 'svc_acct' => $svc_acct &>
103 % foreach my $attribute ( grep /^radius_/, $svc_acct->fields ) {
104 % $attribute =~ /^radius_(.*)$/;
105 % my $pattribute = $FS::raddb::attrib{$1};
106 <& /view/elements/tr.html, label=>mt("Radius (reply) [_1]",$pattribute),
107 value=>$svc_acct->getfield($attribute)
111 % foreach my $attribute ( grep /^rc_/, $svc_acct->fields ) {
112 % $attribute =~ /^rc_(.*)$/;
113 % my $pattribute = $FS::raddb::attrib{$1};
114 <& /view/elements/tr.html, label=>mt("Radius (check) [_1]",$pattribute),
115 value=>$svc_acct->getfield($attribute)
119 <& /view/elements/tr.html, label=>mt('RADIUS groups'),
120 value=>join('<BR>', $svc_acct->radius_groups('long_description')) &>
122 %# Can this be abstracted further? Maybe a library function like
123 %# widget('HTML', 'view', $svc_acct) ? It would definitely make UI
124 %# style management easier.
125 % foreach (sort { $a cmp $b } $svc_acct->virtual_fields) {
126 <% $svc_acct->pvf($_)->widget('HTML', 'view', $svc_acct->getfield($_)) %>
129 </TABLE></TD></TR></TABLE>
134 my $conf = new FS::Conf;
136 my $svc_acct = $opt{'svc_acct'};
137 my $part_svc = $opt{'part_svc'};
139 die 'Empty domsvc for svc_acct.svcnum '. $svc_acct->svcnum
140 unless $svc_acct->domsvc;
141 my $svc_domain = qsearchs('svc_domain', { 'svcnum' => $svc_acct->domsvc } );
142 die 'Unknown domain (domsvc '. $svc_acct->domsvc.
143 ' for svc_acct.svcnum '. $svc_acct->svcnum. ')'
145 my $domain = $svc_domain->domain;