X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fsvc_acct.cgi;h=0254ec186b30eabe594430dc36db8c5365da9c81;hb=259eacca8b815b2bf159e7ee14385e2ac28ed9ee;hp=58283ef54439815b9ff10ca0b36d94e1db1720be;hpb=5e05724a635a22776f1b973f5d7e77989da4e048;p=freeside.git diff --git a/httemplate/edit/svc_acct.cgi b/httemplate/edit/svc_acct.cgi index 58283ef54..0254ec186 100755 --- a/httemplate/edit/svc_acct.cgi +++ b/httemplate/edit/svc_acct.cgi @@ -9,6 +9,18 @@
% } +
@@ -35,13 +47,14 @@ Service # <% $svcnum ? "$svcnum" : " (NEW)" %>
Password - MAXLENGTH=<% $pmax %>> - (blank to generate) + MAXLENGTH=<% $pmax %>> + %}else{ - + %} + % %my $sec_phrase = $svc_acct->sec_phrase; %if ( $conf->exists('security_phrase') @@ -109,7 +122,14 @@ Service # <% $svcnum ? "$svcnum" : " (NEW)" %>
% } -% + +<% include('/elements/tr-select-svc_pbx.html', + 'curr_value' => $svc_acct->pbxsvc, + 'part_svc' => $part_svc, + 'cust_pkg' => $cust_pkg, + ) +%> + %#pop %my $popnum = $svc_acct->popnum || 0; %if ( $part_svc->part_svc_column('popnum')->columnflag eq 'F' ) { @@ -168,7 +188,7 @@ Service # <% $svcnum ? "$svcnum" : " (NEW)" %>
- GECOS + Real Name @@ -221,31 +241,89 @@ Service # <% $svcnum ? "$svcnum" : " (NEW)" %>
% } -% if ( $part_svc->part_svc_column('quota')->columnflag eq 'F' ) { - -% } else { +% if ( $communigate +% && $part_svc->part_svc_column('cgp_type')->columnflag ne 'F' ) +% { + + Mailbox type + + + + + +% } else { + +% } + + +% if ( $communigate +% && $part_svc->part_svc_column('cgp_accessmodes')->columnflag ne 'F' ) +% { - Quota: - + Enabled services + + <% include( '/elements/communigate_pro-accessmodes.html', + 'curr_value' => $svc_acct->cgp_accessmodes, + ) + %> + -% } -% if ( $part_svc->part_svc_column('slipip')->columnflag =~ /^[FA]$/ ) { +% } else { + +% } - -% } else { +% if ( $part_svc->part_svc_column('quota')->columnflag eq 'F' ) { + +% } else { +% my $quota_label = $communigate ? 'Mail storage limit' : 'Quota'; + + <% $quota_label %> + + +% } + +% tie my %cgp_label, 'Tie::IxHash', +% 'file_quota' => 'File storage limit', +% 'file_maxnum' => 'Number of files limit', +% 'file_maxsize' => 'File size limit', +% ; +% +% foreach my $key (keys %cgp_label) { +% +% if ( !$communigate || $part_svc->part_svc_column($key)->columnflag eq 'F' ){ + +% } else { + + + <% $cgp_label{$key} %> + + + +% } +% } + +% if ( $part_svc->part_svc_column('slipip')->columnflag =~ /^[FA]$/ ) { + +% } else { IP % } -% + % my %label = ( seconds => 'Time', % upbytes => 'Upload bytes', % downbytes => 'Download bytes', @@ -379,6 +457,9 @@ if ( $cgi->param('error') ) { } +my $communigate = scalar($part_svc->part_export('communigate_pro')); + # || scalar($part_svc->part_export('communigate_pro_singledomain')); + my( $cust_pkg, $cust_main ) = ( '', '' ); if ( $pkgnum ) { $cust_pkg = qsearchs('cust_pkg', { 'pkgnum' => $pkgnum } ); @@ -428,14 +509,21 @@ my $otaker = getotaker; my $username = $svc_acct->username; my $password; -if ( $svc_acct->_password ) { - if ( $conf->exists('showpasswords') || ! $svcnum ) { - $password = $svc_acct->_password; - } else { - $password = "*HIDDEN*"; +my $password_encryption = $svc_acct->_password_encryption; +my $password_encoding = $svc_acct->_password_encoding; + +if($svcnum) { + if($password = $svc_acct->get_cleartext_password) { + if (! $conf->exists('showpasswords')) { + $password = '*HIDDEN*'; + } + } + elsif($svc_acct->_password and $password_encryption ne 'plain') { + $password = "(".uc($password_encryption)." encrypted)"; + } + else { + $password = ''; } -} else { - $password = ''; } my $ulen = @@ -444,9 +532,13 @@ my $ulen = : dbdef->table('svc_acct')->column('username')->length; my $ulen2 = $ulen+2; -my $pmax = $conf->config('passwordmax') || 8; +my $pmax = max($conf->config('passwordmax') || 13); my $pmax2 = $pmax+2; my $p1 = popurl(1); +sub max { + (sort(@_))[-1] +} +