\n";
+# Start of form
+print &ui_form_start("save_group.cgi", "post");
+print &ui_hidden("new", $in{'new'});
+print &ui_hidden("dn", $in{'dn'});
+print &ui_table_start($text{'gedit_details'}, "width=100%", 4);
+# Current DN and classes
if (!$in{'new'}) {
- print " | $text{'gedit_dn'} | \n";
- print "$in{'dn'} | \n";
+ print &ui_table_row($text{'gedit_dn'},
+ "$in{'dn'}", 3);
- print " | $text{'uedit_classes'} | \n";
- print "",join(" , ", map { "$_" }
- $ginfo->get_value('objectClass'))," | \n";
+ print &ui_table_row($text{'uedit_classes'},
+ join(" , ", map { "$_" }
+ $ginfo->get_value('objectClass')), 3);
}
-print " | $text{'gedit_group'} | \n";
-print " | \n";
+# Group name
+print &ui_table_row($text{'gedit_group'},
+ &ui_textbox("group", $group, 20));
-print "$text{'gedit_gid'} | \n";
+# Group ID
if ($in{'new'}) {
# Next GID comes from LDAP only
$newgid = $mconfig{'base_gid'};
while(&check_gid_used($ldap, $newgid)) {
$newgid++;
}
- print " | \n";
+ $gidfield = &ui_textbox("gid", $newgid, 10);
}
else {
- print " | \n";
+ $gidfield = &ui_textbox("gid", $gid, 10);
}
-print " \n";
+print &ui_table_row($text{'gedit_gid'},
+ $gidfield);
-print " | $text{'pass'} | \n";
-printf " $text{'none2'} \n",
- $pass eq "" ? "checked" : "";
-printf " $text{'encrypted'}\n",
- $pass eq "" ? "" : "checked";
-print " \n";
-print " $text{'clear'}\n";
-print " | \n";
+# Group password (rarely used, but..)
+print &ui_table_row($text{'pass'},
+ &ui_radio_table("passmode", $pass eq "" ? 0 : 1,
+ [ [ 0, $text{'none2'} ],
+ [ 1, $text{'encrypted'},
+ &ui_textbox("encpass", $pass, 20) ],
+ [ 2, $text{'clear'},
+ &ui_textbox("pass", undef, 15) ] ]));
-print "$text{'gedit_members'} | \n";
-print " | \n";
-print "",&user_chooser_button("members", 1),
- " |
| \n";
-print " |