Handle hostnames with upper-case letters
[webmin.git] / rbac / edit_auth.cgi
1 #!/usr/local/bin/perl
2 # Show one RBAC authorization
3
4 require './rbac-lib.pl';
5 $access{'auths'} || &error($text{'auths_ecannot'});
6 &ReadParse();
7 if ($in{'new'}) {
8         &ui_print_header(undef, $text{'auth_title1'}, "");
9         }
10 else {
11         &ui_print_header(undef, $text{'auth_title2'}, "");
12         $auths = &list_auth_attrs();
13         $auth = $auths->[$in{'idx'}];
14         }
15
16 print &ui_form_start("save_auth.cgi", "post");
17 print &ui_hidden("idx", $in{'idx'}),"\n";
18 print &ui_hidden("new", $in{'new'}),"\n";
19 print &ui_table_start($text{'auth_header'}, "width=100%", 2);
20
21 print &ui_table_row($text{'auth_name'},
22                     &ui_textbox("name", $auth->{'name'}, 20));
23
24 print &ui_table_row($text{'auth_short'},
25                     &ui_textbox("short", $auth->{'short'}, 40));
26
27 print &ui_table_row($text{'auth_desc'},
28                     &ui_textbox("desc", $auth->{'desc'}, 60));
29
30 print &ui_table_end();
31 if ($in{'new'}) {
32         print &ui_form_end([ [ "create", $text{'create'} ] ]);
33         }
34 else {
35         print &ui_form_end([ [ "save", $text{'save'} ],
36                              [ "delete", $text{'delete'} ] ]);
37         }
38
39 &ui_print_footer("list_auths.cgi", $text{'auths_return'});
40