diff options
author | ivan <ivan> | 2002-10-21 15:14:07 +0000 |
---|---|---|
committer | ivan <ivan> | 2002-10-21 15:14:07 +0000 |
commit | f076e082da5f5ec892e2ff6919e478baa1fd2274 (patch) | |
tree | 3160859732413bdfb90845509522a8c4eb665d73 /httemplate/edit/part_svc.cgi | |
parent | d927a8b53105cb9b715f6d6f430e3bfee3fcfd95 (diff) |
Prevent a fixed or default username or password from being defined
Diffstat (limited to 'httemplate/edit/part_svc.cgi')
-rwxr-xr-x | httemplate/edit/part_svc.cgi | 29 |
1 files changed, 20 insertions, 9 deletions
diff --git a/httemplate/edit/part_svc.cgi b/httemplate/edit/part_svc.cgi index b2862f5a3..f1d42f341 100755 --- a/httemplate/edit/part_svc.cgi +++ b/httemplate/edit/part_svc.cgi @@ -80,7 +80,10 @@ my %defs = ( select_key => 'popnum', select_label => 'city', }, - 'username' => 'Username', + 'username' => { + desc => 'Username', + type => 'disabled', + }, 'quota' => '', '_password' => 'Password', 'gid' => 'GID (when blank, defaults to UID)', @@ -188,15 +191,20 @@ my %defs = ( $html .= "<TR><TD>$field"; $html .= "- <FONT SIZE=-1>$desc</FONT>" if $desc; $html .= "</TD>"; - $html .= - qq!<TD><INPUT TYPE="radio" NAME="${layer}__${field}_flag" VALUE=""!. - ' CHECKED'x($flag eq ''). ">Off</TD>". - qq!<TD><INPUT TYPE="radio" NAME="${layer}__${field}_flag" VALUE="D"!. - ' CHECKED'x($flag eq 'D'). ">Default ". - qq!<INPUT TYPE="radio" NAME="${layer}__${field}_flag" VALUE="F"!. - ' CHECKED'x($flag eq 'F'). ">Fixed ". - '<BR>'; if ( ref($def) ) { + $flag = '' if $def->{type} eq 'disabled'; + $html .= + qq!<TD><INPUT TYPE="radio" NAME="${layer}__${field}_flag" VALUE=""!. + ' CHECKED'x($flag eq ''). ">Off</TD>". + '<TD>'; + unless ( $def->{type} eq 'disabled' ) { + $html .= + qq!<INPUT TYPE="radio" NAME="${layer}__${field}_flag" VALUE="D"!. + ' CHECKED'x($flag eq 'D'). ">Default ". + qq!<INPUT TYPE="radio" NAME="${layer}__${field}_flag" VALUE="F"!. + ' CHECKED'x($flag eq 'F'). ">Fixed ". + '<BR>'; + } if ( $def->{type} eq 'select' ) { $html .= qq!<SELECT NAME="${layer}__${field}">!; $html .= '<OPTION> </OPTION>' unless $value; @@ -210,6 +218,9 @@ my %defs = ( } elsif ( $def->{type} eq 'radius_usergroup_selector' ) { $html .= FS::svc_acct::radius_usergroup_selector( [ split(',', $value) ], "${layer}__${field}" ); + } elsif ( $def->{type} eq 'disabled' ) { + $html .= + qq!<INPUT TYPE="hidden" NAME="${layer}__${field}" VALUE="">!; } else { $html .= '<font color="#ff0000">unknown type'. $def->{type}; } |