1 <% &ntable("#cccccc") %><TR><TD><% &ntable("#cccccc",2) %>
3 <% include('/view/elements/tr.html', label=>'Service', value=>$part_svc->svc) %>
4 <% include('/view/elements/tr.html', label=>'Username', value=>$svc_acct->username) %>
5 <% include('/view/elements/tr.html', label=>'Domain', value=>$domain) %>
7 % if ( $opt{'communigate'} ) {
8 <% include('/view/elements/tr.html', label=>'Aliases', value=>$svc_acct->cgp_aliases) %>
11 % if ( $svc_acct->pbxsvc ) {
12 <% include('/view/elements/tr.html', label=>'PBX', value=>$svc_acct->pbx_title) %>
16 % my $password = $svc_acct->get_cleartext_password;
17 % if ( $password =~ /^\*\w+\* (.*)$/ ) {
19 % $show_pw .= '<I>(login disabled)</I> ';
22 % && $svc_acct->_password_encryption ne 'plain'
23 % && $svc_acct->_password
26 % $show_pw .= '<I>('. uc($svc_acct->_password_encryption). ' encrypted)</I>';
27 % } elsif ( $conf->exists('showpasswords') ) {
28 % $show_pw .= '<PRE>'. encode_entities($password). '</PRE>';
30 % $show_pw .= '<I>(hidden)</I>';
33 <% include('/view/elements/tr.html', label=>'Password', value=>$show_pw) %>
36 % if ( $conf->exists('security_phrase') ) {
37 <%include('/view/elements/tr.html', label=>'Security phrase', value=>$svc_acct->sec_phrase)%>
40 % if ( $svc_acct->popnum ) {
41 % my $svc_acct_pop = qsearchs('svc_acct_pop',{'popnum'=>$svc_acct->popnum});
42 <% include('/view/elements/tr.html', label=>'Access number', value=>$svc_acct_pop->text) %>
45 % if ($svc_acct->uid ne '') {
46 <% include('/view/elements/tr.html', label=>'UID', value=>$svc_acct->uid) %>
49 % if ($svc_acct->gid ne '') {
50 <% include('/view/elements/tr.html', label=>'GID', value=>$svc_acct->gid) %>
53 % if ($svc_acct->finger ne '') {
54 <% include('/view/elements/tr.html', label=>'Real Name', value=>$svc_acct->finger) %>
57 % if ($svc_acct->dir ne '') {
58 <% include('/view/elements/tr.html', label=>'Home directory', value=>$svc_acct->dir) %>
61 % if ($svc_acct->shell ne '') {
62 <% include('/view/elements/tr.html', label=>'Shell', value=>$svc_acct->shell) %>
65 % if ($svc_acct->quota ne '' && ! $opt{'communigate'} ) {
67 <% include('/view/elements/tr.html', label=>'Quota', value=>$svc_acct->quota) %>
69 % } elsif ( $opt{'communigate'} ) {
73 <% include('/view/elements/tr.html', label=>'Mailbox type', value=>$svc_acct->cgp_type) %>
75 <% include('/view/elements/tr.html', label=>'Enabled services',
76 value=>$svc_acct->cgp_accessmodes ) %>
78 <% include('/view/elements/tr.html', label=>'Mail storage limit',
79 value=>$svc_acct->quota ) %>
81 <% include('/view/elements/tr.html', label=>'File storage limit',
82 value=>$svc_acct->file_quota ) %>
84 <% include('/view/elements/tr.html', label=>'Number of files limit',
85 value=>$svc_acct->file_maxnum ) %>
87 <% include('/view/elements/tr.html', label=>'File size limit',
88 value=>$svc_acct->file_maxsize ) %>
90 <% include('/view/elements/tr.html', label=>'Password recovery',
91 value=>$svc_acct->password_recover ? 'YES' : 'NO' ) %>
93 <% include('/view/elements/tr.html', label=>'Allowed mail rules',
94 value=>$svc_acct->cgp_rulesallowed || 'default (No)') %>
96 <% include('/view/elements/tr.html', label=>'RPOP modifications',
97 value=>$svc_acct->cgp_rpopallowed ? 'YES' : 'NO' ) %>
99 <% include('/view/elements/tr.html', label=>'Accepts mail to "all"',
100 value=>$svc_acct->cgp_mailtoall ? 'YES' : 'NO' ) %>
102 <% include('/view/elements/tr.html', label=>'Add trailer to sent mail',
103 value=>$svc_acct->cgp_addmailtrailer ? 'YES' : 'NO' ) %>
107 <% include('/view/elements/tr.html', label=>'Message delete method',
108 value=>$svc_acct->cgp_deletemode ) %>
110 <% include('/view/elements/tr.html', label=>'On logout remove trash',
111 value=>$svc_acct->cgp_emptytrash ) %>
113 %#XXX language, time zone, layout, printo style, send read receipts
114 %#XXX vacation message, redirect all mail, mail rules
118 % if ($svc_acct->slipip) {
119 <% include('/view/elements/tr.html',
121 value=> ( $svc_acct->slipip eq "0.0.0.0" || $svc_acct->slipip eq '0e0' )
128 <% include('usage.html',
129 'svc_acct' => $svc_acct,
133 % foreach my $attribute ( grep /^radius_/, $svc_acct->fields ) {
134 % $attribute =~ /^radius_(.*)$/;
135 % my $pattribute = $FS::raddb::attrib{$1};
136 <% include('/view/elements/tr.html', label=>"Radius (reply) $pattribute",
137 value=>$svc_acct->getfield($attribute)
142 % foreach my $attribute ( grep /^rc_/, $svc_acct->fields ) {
143 % $attribute =~ /^rc_(.*)$/;
144 % my $pattribute = $FS::raddb::attrib{$1};
145 <% include('/view/elements/tr.html', label=>"Radius (check) $pattribute",
146 value=>$svc_acct->getfield($attribute)
151 <% include('/view/elements/tr.html', label=>'RADIUS groups',
152 value=>join('<BR>', $svc_acct->radius_groups) ) %>
154 %# Can this be abstracted further? Maybe a library function like
155 %# widget('HTML', 'view', $svc_acct) ? It would definitely make UI
156 %# style management easier.
157 % foreach (sort { $a cmp $b } $svc_acct->virtual_fields) {
158 <% $svc_acct->pvf($_)->widget('HTML', 'view', $svc_acct->getfield($_)) %>
161 </TABLE></TD></TR></TABLE>
166 my $conf = new FS::Conf;
168 my $svc_acct = $opt{'svc_acct'};
169 my $part_svc = $opt{'part_svc'};
171 die 'Empty domsvc for svc_acct.svcnum '. $svc_acct->svcnum
172 unless $svc_acct->domsvc;
173 my $svc_domain = qsearchs('svc_domain', { 'svcnum' => $svc_acct->domsvc } );
174 die 'Unknown domain (domsvc '. $svc_acct->domsvc.
175 ' for svc_acct.svcnum '. $svc_acct->svcnum. ')'
177 my $domain = $svc_domain->domain;