Use new UI library
This commit is contained in:
+34
-32
@@ -5,37 +5,38 @@ require 'mount-lib.pl';
|
||||
# Output HTML for editing security options for the mount module
|
||||
sub acl_security_form
|
||||
{
|
||||
print "<tr> <td><b>$text{'acl_fs'}</b></td>\n";
|
||||
print "<td colspan=3>",&ui_opt_textbox("fs", $_[0]->{'fs'}, 40,
|
||||
$text{'acl_all'}, $text{'acl_list'}),"</td> </tr>\n";
|
||||
my ($o) = @_;
|
||||
print &ui_table_row($text{'acl_fs'},
|
||||
&ui_opt_textbox("fs", $o->{'fs'}, 40,
|
||||
$text{'acl_all'}, $text{'acl_list'}), 3);
|
||||
|
||||
print "<tr> <td><b>$text{'acl_types'}</b></td>\n";
|
||||
print "<td colspan=3>",&ui_opt_textbox("types", $_[0]->{'types'}, 30,
|
||||
$text{'acl_all'}, $text{'acl_fslist'}),"</td> </tr>\n";
|
||||
print &ui_table_row($text{'acl_types'},
|
||||
&ui_opt_textbox("types", $o->{'types'}, 30,
|
||||
$text{'acl_all'}, $text{'acl_fslist'}), 3);
|
||||
|
||||
print "<tr> <td><b>$text{'acl_create'}</b></td>\n";
|
||||
print "<td>",&ui_radio("create", $_[0]->{'create'},
|
||||
[ [ 1, $text{'yes'} ], [ 0, $text{'no'} ] ]),"</td>\n";
|
||||
print &ui_table_row($text{'acl_create'},
|
||||
&ui_radio("create", $o->{'create'},
|
||||
[ [ 1, $text{'yes'} ], [ 0, $text{'no'} ] ]));
|
||||
|
||||
print "<td><b>$text{'acl_only'}</b></td>\n";
|
||||
print "<td>",&ui_radio("only", $_[0]->{'only'},
|
||||
[ [ 1, $text{'yes'} ], [ 0, $text{'no'} ] ]),"</td> </tr>\n";
|
||||
print &ui_table_row($text{'acl_only'},
|
||||
&ui_radio("only", $o->{'only'},
|
||||
[ [ 1, $text{'yes'} ], [ 0, $text{'no'} ] ]));
|
||||
|
||||
print "<tr> <td><b>$text{'acl_user'}</b></td>\n";
|
||||
print "<td>",&ui_radio("user", $_[0]->{'user'},
|
||||
[ [ 1, $text{'yes'} ], [ 0, $text{'no'} ] ]),"</td>\n";
|
||||
print &ui_table_row($text{'acl_user'},
|
||||
&ui_radio("user", $o->{'user'},
|
||||
[ [ 1, $text{'yes'} ], [ 0, $text{'no'} ] ]));
|
||||
|
||||
print "<td><b>$text{'acl_hide'}</b></td>\n";
|
||||
print "<td>",&ui_radio("hide", $_[0]->{'hide'},
|
||||
[ [ 1, $text{'yes'} ], [ 0, $text{'no'} ] ]),"</td> </tr>\n";
|
||||
print &ui_table_row($text{'acl_hide'},
|
||||
&ui_radio("hide", $o->{'hide'},
|
||||
[ [ 1, $text{'yes'} ], [ 0, $text{'no'} ] ]));
|
||||
|
||||
print "<tr> <td><b>$text{'acl_browse'}</b></td>\n";
|
||||
print "<td>",&ui_radio("browse", $_[0]->{'browse'},
|
||||
[ [ 1, $text{'yes'} ], [ 0, $text{'no'} ] ]),"</td>\n";
|
||||
print &ui_table_row($text{'acl_browse'},
|
||||
&ui_radio("browse", $o->{'browse'},
|
||||
[ [ 1, $text{'yes'} ], [ 0, $text{'no'} ] ]));
|
||||
|
||||
print "<td><b>$text{'acl_sysinfo'}</b></td>\n";
|
||||
print "<td>",&ui_radio("sysinfo", $_[0]->{'sysinfo'},
|
||||
[ [ 1, $text{'yes'} ], [ 0, $text{'no'} ] ]),"</td> </tr>\n";
|
||||
print &ui_table_row($text{'acl_sysinfo'},
|
||||
&ui_radio("sysinfo", $o->{'sysinfo'},
|
||||
[ [ 1, $text{'yes'} ], [ 0, $text{'no'} ] ]));
|
||||
|
||||
}
|
||||
|
||||
@@ -43,13 +44,14 @@ print "<td>",&ui_radio("sysinfo", $_[0]->{'sysinfo'},
|
||||
# Parse the form for security options for the mount module
|
||||
sub acl_security_save
|
||||
{
|
||||
$_[0]->{'fs'} = $in{'fs_def'} ? undef : $in{'fs'};
|
||||
$_[0]->{'types'} = $in{'types_def'} ? undef : $in{'types'};
|
||||
$_[0]->{'only'} = $in{'only'};
|
||||
$_[0]->{'create'} = $in{'create'};
|
||||
$_[0]->{'user'} = $in{'user'};
|
||||
$_[0]->{'hide'} = $in{'hide'};
|
||||
$_[0]->{'browse'} = $in{'browse'};
|
||||
$_[0]->{'sysinfo'} = $in{'sysinfo'};
|
||||
my ($o) = @_;
|
||||
$o->{'fs'} = $in{'fs_def'} ? undef : $in{'fs'};
|
||||
$o->{'types'} = $in{'types_def'} ? undef : $in{'types'};
|
||||
$o->{'only'} = $in{'only'};
|
||||
$o->{'create'} = $in{'create'};
|
||||
$o->{'user'} = $in{'user'};
|
||||
$o->{'hide'} = $in{'hide'};
|
||||
$o->{'browse'} = $in{'browse'};
|
||||
$o->{'sysinfo'} = $in{'sysinfo'};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user