X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fsvc_acct.cgi;h=d147a16836beb20035276fe01a307aaf68d8fe1c;hb=412e2892a324cdd838f4a790102359adcc9b7400;hp=4bc81c9fdb82bd5ebaeceebae439eca7ec94b4e5;hpb=0b0f8fb76939a617b142595672cc15e034ab7336;p=freeside.git diff --git a/httemplate/edit/svc_acct.cgi b/httemplate/edit/svc_acct.cgi index 4bc81c9fd..d147a1683 100755 --- a/httemplate/edit/svc_acct.cgi +++ b/httemplate/edit/svc_acct.cgi @@ -47,9 +47,11 @@ if ( $cgi->param('error') ) { my($cust_pkg)=qsearchs('cust_pkg',{'pkgnum'=>$pkgnum}); if ($cust_pkg) { my($cust_main)=qsearchs('cust_main',{'custnum'=> $cust_pkg->custnum } ); - $svc_acct->setfield('finger', - $cust_main->getfield('first') . " " . $cust_main->getfield('last') - ) ; + unless ( $part_svc->part_svc_column('uid')->columnflag eq 'F' ) { + $svc_acct->setfield('finger', + $cust_main->getfield('first') . " " . $cust_main->getfield('last') + ); + } } #set fixed and default fields from part_svc @@ -81,7 +83,8 @@ if ( $svc_acct->_password ) { $password = ''; } -my $ulen = $svc_acct->dbdef_table->column('username')->length; +my $ulen = $conf->config('usernamemax') + || $svc_acct->dbdef_table->column('username')->length; my $ulen2 = $ulen+2; my $pmax = $conf->config('passwordmax') || 8; @@ -103,8 +106,7 @@ print 'Service # '. ( $svcnum ? "$svcnum" : " (NEW)" ). '
'. END -print &itable("#cccccc",2), < +print &ntable("#cccccc",2), <Username Password @@ -187,12 +189,20 @@ my($uid,$gid,$finger,$dir)=( print < -GECOS - END +if ( !$finger && $part_svc->part_svc_column('uid')->columnflag eq 'F' ) { + print ''; +} else { + print 'GECOS'. + qq!!; +} +print qq!!; + my $shell = $svc_acct->shell; -if ( $part_svc->part_svc_column('shell')->columnflag eq "F" ) { +if ( $part_svc->part_svc_column('shell')->columnflag eq "F" + || ( !$shell && $part_svc->part_svc_column('uid')->columnflag eq 'F' ) + ) { print qq!!; } else { print qq!Shell