summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/helpers/photo.php10
-rw-r--r--core/views/form.html.php3
2 files changed, 7 insertions, 6 deletions
diff --git a/core/helpers/photo.php b/core/helpers/photo.php
index 2edd8a4f..da4ab0ac 100644
--- a/core/helpers/photo.php
+++ b/core/helpers/photo.php
@@ -93,11 +93,11 @@ class photo_Core {
static function get_add_form($parent) {
$form = new Forge("albums/{$parent->id}", "", "post",
array("id" => "gAddPhotoForm", "enctype" => "multipart/form-data"));
- $group = $form->group(sprintf(_("Add Photo to %s"), $parent->title));
- $group->input("name")->label(true);
- $group->input("title")->label(true);
- $group->textarea("description")->label(true)->rules("length[0, 255");
- $group->upload("file")->label(true)->rules("allow[jpg,png,gif,tiff]");
+ $group = $form->group("add_photo")->label(sprintf(_("Add Photo to %s"), $parent->title));
+ $group->input("name")->label(_("Name"));
+ $group->input("title")->label(_("Title"));
+ $group->textarea("description")->label(_("Description"))->rules("length[0, 255");
+ $group->upload("file")->label(_("File"))->rules("allow[jpg,png,gif,tiff]");
$group->hidden("type")->value("photo");
$group->submit(_("Upload"));
$form->add_rules_from(ORM::factory("item"));
diff --git a/core/views/form.html.php b/core/views/form.html.php
index 86f1e38a..cde80709 100644
--- a/core/views/form.html.php
+++ b/core/views/form.html.php
@@ -17,8 +17,9 @@ if (!function_exists("DrawForm")) {
foreach ($inputs as $input) {
if ($input->type == 'group') {
+
print "$prefix<fieldset>\n";
- print "$prefix <legend>$input->name</legend>\n";
+ print "$prefix <legend>{$input->label}</legend>\n";
print "$prefix <ul>\n";
DrawForm($input->inputs, $level + 2);