ui
[freeside.git] / httemplate / edit / svc_acct.cgi
index 681d8b5..e42745c 100755 (executable)
@@ -1,4 +1,4 @@
-<!-- $Id: svc_acct.cgi,v 1.14 2002-01-30 14:18:08 ivan Exp $ -->
+<!-- mason kludge -->
 <%
 
 my $conf = new FS::Conf;
@@ -72,7 +72,7 @@ my $otaker = getotaker;
 my $username = $svc_acct->username;
 my $password;
 if ( $svc_acct->_password ) {
-  if ( $conf->exists('showpasswords') ) {
+  if ( $conf->exists('showpasswords') || ! $svcnum ) {
     $password = $svc_acct->_password;
   } else {
     $password = "*HIDDEN*";
@@ -81,7 +81,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,7 +104,7 @@ print 'Service # '. ( $svcnum ? "<B>$svcnum</B>" : " (NEW)" ). '<BR>'.
       <INPUT TYPE="hidden" NAME="svcpart" VALUE="$svcpart">
 END
 
-print &itable("#cccccc",2), <<END;
+print &ntable("#cccccc",2), <<END;
 <TR><TD>
 <TR><TD ALIGN="right">Username</TD>
 <TD><INPUT TYPE="text" NAME="username" VALUE="$username" SIZE=$ulen2 MAXLENGTH=$ulen></TD></TR>