X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fsvc_acct.cgi;h=2845c830161c91fada6be784f0e6171fbb643f75;hb=d0221fabd4656b3a04251ca6168cc45f54d23574;hp=58283ef54439815b9ff10ca0b36d94e1db1720be;hpb=c648976f0b7975f2328ebd7ba8c711fad0ca4195;p=freeside.git diff --git a/httemplate/edit/svc_acct.cgi b/httemplate/edit/svc_acct.cgi index 58283ef54..2845c8301 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 @@ -428,14 +448,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 +471,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] +} +