Handle hostnames with upper-case letters
[webmin.git] / mount / acl_security.pl
1
2 require 'mount-lib.pl';
3
4 # acl_security_form(&options)
5 # Output HTML for editing security options for the mount module
6 sub acl_security_form
7 {
8 print "<tr> <td><b>$text{'acl_fs'}</b></td>\n";
9 print "<td colspan=3>",&ui_opt_textbox("fs", $_[0]->{'fs'}, 40,
10                 $text{'acl_all'}, $text{'acl_list'}),"</td> </tr>\n";
11
12 print "<tr> <td><b>$text{'acl_types'}</b></td>\n";
13 print "<td colspan=3>",&ui_opt_textbox("types", $_[0]->{'types'}, 30,
14                 $text{'acl_all'}, $text{'acl_fslist'}),"</td> </tr>\n";
15
16 print "<tr> <td><b>$text{'acl_create'}</b></td>\n";
17 print "<td>",&ui_radio("create", $_[0]->{'create'},
18                [ [ 1, $text{'yes'} ], [ 0, $text{'no'} ] ]),"</td>\n";
19
20 print "<td><b>$text{'acl_only'}</b></td>\n";
21 print "<td>",&ui_radio("only", $_[0]->{'only'},
22                [ [ 1, $text{'yes'} ], [ 0, $text{'no'} ] ]),"</td> </tr>\n";
23
24 print "<tr> <td><b>$text{'acl_user'}</b></td>\n";
25 print "<td>",&ui_radio("user", $_[0]->{'user'},
26                [ [ 1, $text{'yes'} ], [ 0, $text{'no'} ] ]),"</td>\n";
27
28 print "<td><b>$text{'acl_hide'}</b></td>\n";
29 print "<td>",&ui_radio("hide", $_[0]->{'hide'},
30                [ [ 1, $text{'yes'} ], [ 0, $text{'no'} ] ]),"</td> </tr>\n";
31
32 print "<tr> <td><b>$text{'acl_simple'}</b></td>\n";
33 print "<td>",&ui_radio("simple", $_[0]->{'simple'},
34                [ [ 1, $text{'yes'} ], [ 0, $text{'no'} ] ]),"</td>\n";
35
36 print "<td><b>$text{'acl_simopts'}</b></td>\n";
37 print "<td>",&ui_radio("simopts", $_[0]->{'simopts'},
38                [ [ 1, $text{'yes'} ], [ 0, $text{'no'} ] ]),"</td> </tr>\n";
39
40 print "<tr> <td><b>$text{'acl_browse'}</b></td>\n";
41 print "<td>",&ui_radio("browse", $_[0]->{'browse'},
42                [ [ 1, $text{'yes'} ], [ 0, $text{'no'} ] ]),"</td>\n";
43
44 print "</tr>\n";
45 }
46
47 # acl_security_save(&options)
48 # Parse the form for security options for the mount module
49 sub acl_security_save
50 {
51 $_[0]->{'fs'} = $in{'fs_def'} ? undef : $in{'fs'};
52 $_[0]->{'types'} = $in{'types_def'} ? undef : $in{'types'};
53 $_[0]->{'only'} = $in{'only'};
54 $_[0]->{'create'} = $in{'create'};
55 $_[0]->{'user'} = $in{'user'};
56 $_[0]->{'hide'} = $in{'hide'};
57 $_[0]->{'simple'} = $in{'simple'};
58 $_[0]->{'simopts'} = $in{'simopts'};
59 $_[0]->{'browse'} = $in{'browse'};
60 }
61