Fix up all the various little forms to have submit buttons, fieldset legends, etc etc.

This commit is contained in:
Bharat Mediratta
2009-01-06 09:22:29 +00:00
parent db4164520a
commit fa1ccbd86d
5 changed files with 23 additions and 18 deletions

View File

@@ -65,6 +65,7 @@ class group_Core {
$form = new Forge("admin/groups/edit/$group->id");
$form_group = $form->group("edit_group")->label(_("Edit Group"));
$form_group->input("name")->label(_("Name"))->id("gName")->value($group->name);
$form_group->submit(_("Save"));
$form->add_rules_from($group);
return $form;
}
@@ -73,14 +74,17 @@ class group_Core {
$form = new Forge("admin/groups/add");
$form_group = $form->group("add_group")->label(_("Add Group"));
$form_group->input("name")->label(_("Name"))->id("gName");
$form_group->submit(_("Add Group"));
$group = ORM::factory("group");
$form->add_rules_from($group);
return $form;
}
public static function get_delete_form_admin($group) {
$form = new Forge("admin/groups/delete/$group->id",
sprintf(_("Are you sure you want to delete %s"), $group->name));
print $form;
$form = new Forge("admin/groups/delete/$group->id", "", "post");
$form_group = $form->group("delete_group")->label(
sprintf(_("Are you sure you want to delete group %s?"), $group->name));
$form_group->submit(_("Delete"));
return $form;
}
}