X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fsvc_acct.cgi;h=27ea3c5eabac5a594cb20247ede57ced5922352d;hb=20f03d52cc6c930f610c0b4466eeeeda54fdbb40;hp=2c694a8feec2ba190cd890a0977b960bf1d27da3;hpb=00de593a7e5b5b50aeec62c0ddb90db7bcd62f55;p=freeside.git diff --git a/httemplate/edit/svc_acct.cgi b/httemplate/edit/svc_acct.cgi index 2c694a8fe..27ea3c5ea 100755 --- a/httemplate/edit/svc_acct.cgi +++ b/httemplate/edit/svc_acct.cgi @@ -30,8 +30,9 @@ <% $part_svc->svc %> - - <% mt('Username') |h %> +<% include('/elements/tr-td-label.html', + 'label' => $part_svc->part_svc_column('username')->columnlabel || mt('Username'), + 'required' => $part_svc->part_svc_column('username')->required ) %> % if ( $svcnum && $conf->exists('svc_acct-no_edit_username') ) { <% $svc_acct->username() %> @@ -43,12 +44,18 @@ %if ( $part_svc->part_svc_column('_password')->columnflag ne 'F' ) { - % #XXX eventually should require "Edit Password" ACL - <% mt('Password') |h %> +<% include('/elements/tr-td-label.html', + 'label' => $part_svc->part_svc_column('_password')->columnlabel || mt('Password'), + 'required' => $part_svc->part_svc_column('_password')->required ) %> MAXLENGTH=<% $pmax %>> - <& /elements/random_pass.html, 'clear_password' &> + <& /elements/random_pass.html, 'clear_password' &>
+
+ <& '/elements/validate_password.html', + 'fieldid' => 'clear_password', + 'svcnum' => $svcnum + &> %}else{ @@ -60,8 +67,9 @@ %if ( $conf->exists('security_phrase') % && $part_svc->part_svc_column('sec_phrase')->columnflag ne 'F' ) { - - <% mt('Security phrase') |h %> +<% include('/elements/tr-td-label.html', + 'label' => $part_svc->part_svc_column('sec_phrase')->columnlabel || mt('Security phrase'), + 'required' => $part_svc->part_svc_column('sec_phrase')->required ) %> (<% mt('for forgotten passwords') |h %>) @@ -97,8 +105,9 @@ % ) % ); - - <% mt('Domain') |h %> +<% include('/elements/tr-td-label.html', + 'label' => $part_svc->part_svc_column('domsvc')->columnlabel || mt('Domain'), + 'required' => $part_svc->part_svc_column('domsvc')->required ) %> % } else { - - <% mt('Access number') |h %> +<% include('/elements/tr-td-label.html', + 'label' => $part_svc->part_svc_column('popnum')->columnlabel || mt('Access number'), + 'required' => $part_svc->part_svc_column('popnum')->required ) %> <% FS::svc_acct_pop::popselector($popnum) %> % } @@ -156,6 +167,8 @@ 'curr_value' => $svc_acct->sectornum, #'part_svc' => $part_svc, #'cust_pkg' => $cust_pkg, + 'required' => $part_svc->part_svc_column('sectornum')->required, + 'label' => $part_svc->part_svc_column('sectornum')->columnlabel || mt('Tower sector'), &> %} else { @@ -176,8 +189,11 @@ % % if ( length($svc_acct->$xid()) ) { - - <% uc($xid) %> +<% include('/elements/tr-td-label.html', + 'label' => $part_svc->part_svc_column($xid)->columnlabel || uc($xid), + 'required' => $part_svc->part_svc_column($xid)->required ) %> +%# +%# <% uc($xid) %> <% $svc_acct->$xid() %> @@ -187,8 +203,9 @@ % } else { - - <% uc($xid) %> +<% include('/elements/tr-td-label.html', + 'label' => $part_svc->part_svc_column($xid)->columnlabel || uc($xid), + 'required' => $part_svc->part_svc_column($xid)->required ) %> @@ -205,8 +222,9 @@ % } else { - - <% mt('Real Name') |h %> +<% include('/elements/tr-td-label.html', + 'label' => $part_svc->part_svc_column('finger')->columnlabel || mt('Real Name'), + 'required' => $part_svc->part_svc_column('finger')->required ) %> @@ -223,8 +241,9 @@ % } else { - - <% mt('Home directory') |h %> +<% include('/elements/tr-td-label.html', + 'label' => $part_svc->part_svc_column('dir')->columnlabel || mt('Home directory'), + 'required' => $part_svc->part_svc_column('dir')->required ) %> % } @@ -240,8 +259,9 @@ % } else { - - <% mt('Shell') |h %> +<% include('/elements/tr-td-label.html', + 'label' => $part_svc->part_svc_column('shell')->columnlabel || mt('Shell'), + 'required' => $part_svc->part_svc_column('shell')->required ) %> % } else { - - <% mt('IP') |h %> +<% include('/elements/tr-td-label.html', + 'label' => $part_svc->part_svc_column('slipip')->columnlabel || mt('IP'), + 'required' => $part_svc->part_svc_column('slipip')->required ) %> % } % } -% my %label = ( seconds => 'Time', -% upbytes => 'Upload bytes', -% downbytes => 'Download bytes', -% totalbytes => 'Total bytes', -% ); +% tie my %label, 'Tie::IxHash', seconds => 'Time', +% upbytes => 'Upload bytes', +% downbytes => 'Download bytes', +% totalbytes => 'Total bytes', +% ; % foreach my $uf (keys %label) { % my $tf = $uf . "_threshold"; % if ( $curuser->access_right('Edit usage') ) { @@ -324,8 +349,9 @@ % } - - <% mt('RADIUS groups') |h %> +<% include('/elements/tr-td-label.html', + 'label' => $part_svc->part_svc_column('usergroup')->columnlabel || mt('RADIUS groups'), + 'required' => $part_svc->part_svc_column('usergroup')->required ) %> % if ( $part_svc_usergroup->columnflag eq 'F' ) { <% join('
', @groupnames) %> % } else { @@ -531,7 +557,7 @@ my $ulen = : dbdef->table('svc_acct')->column('username')->length; my $ulen2 = $ulen+2; -my $pmax = max($conf->config('passwordmax') || 13); +my $pmax = max($conf->config('passwordmax') || 12); my $pmax2 = $pmax+2; my $p1 = popurl(1);