2 require 'format-lib.pl';
4 # acl_security_form(&options)
5 # Output HTML for editing security options for the format module
8 local @dlist = &list_disks();
10 map { $dcan{$_}++ } split(/\s+/, $_[0]->{'disks'});
11 print "<tr> <td valign=top><b>$text{'acl_disks'}</b></td> <td>\n";
12 printf "<input type=radio name=disks_def value=1 %s> %s\n",
13 $_[0]->{'disks'} eq '*' ? 'checked' : '', $text{'acl_dall'};
14 printf "<input type=radio name=disks_def value=0 %s> %s<br>\n",
15 $_[0]->{'disks'} eq '*' ? '' : 'checked', $text{'acl_dsel'};
16 print "<select name=disks size=4 multiple>\n";
18 $d->{'device'} =~ s/^.*\///;
19 printf "<option value='%s' %s>%s\n",
21 $dcan{$d->{'device'}} ? "selected" : "",
22 "$d->{'desc'} ($d->{'type'})";
24 print "</select></td> </tr>\n";
26 print "<tr> <td><b>$text{'acl_view'}</b></td>\n";
27 print "<td>",&ui_radio("view", $access{'view'},
28 [ [ 0, $text{'yes'} ], [ 1, $text{'no'} ] ]),"</td> </tr>\n";
31 # acl_security_save(&options)
32 # Parse the form for security options for the format module
35 if ($in{'disks_def'}) {
36 $_[0]->{'disks'} = "*";
39 $_[0]->{'disks'} = join(" ", split(/\0/, $in{'disks'}));
41 $_[0]->{'view'} = $in{'view'};