Handle hostnames with upper-case letters
[webmin.git] / rbac / edit_prof.cgi
1 #!/usr/local/bin/perl
2 # Show one RBAC profile
3
4 require './rbac-lib.pl';
5 &ReadParse();
6 $access{'profs'} == 1 || &error($text{'profs_ecannot'});
7 if ($in{'new'}) {
8         &ui_print_header(undef, $text{'prof_title1'}, "");
9         }
10 else {
11         &ui_print_header(undef, $text{'prof_title2'}, "");
12         $profs = &list_prof_attrs();
13         $prof = $profs->[$in{'idx'}];
14         }
15
16 print &ui_form_start("save_prof.cgi", "post");
17 print &ui_hidden("idx", $in{'idx'}),"\n";
18 print &ui_hidden("new", $in{'new'}),"\n";
19 print &ui_table_start($text{'prof_header'}, "width=100%", 2);
20
21 print &ui_table_row($text{'prof_name'},
22                     &ui_textbox("name", $prof->{'name'}, 20));
23
24 print &ui_table_row($text{'prof_desc'},
25                     &ui_textbox("desc", $prof->{'desc'}, 40));
26
27 print &ui_table_row($text{'prof_auths'},
28                     &auths_input("auths", $prof->{'attr'}->{'auths'}));
29
30 print &ui_table_row($text{'prof_profiles'},
31                     &profiles_input("profiles", $prof->{'attr'}->{'profs'}, 1));
32
33 print &ui_table_end();
34 if ($in{'new'}) {
35         print &ui_form_end([ [ "create", $text{'create'} ] ]);
36         }
37 else {
38         print &ui_form_end([ [ "save", $text{'save'} ],
39                              [ "delete", $text{'delete'} ] ]);
40         }
41
42 &ui_print_footer("list_profs.cgi", $text{'profs_return'});
43