summaryrefslogtreecommitdiff
path: root/modules/gallery/helpers/photo.php
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2009-11-25 13:40:47 -0800
committerBharat Mediratta <bharat@menalto.com>2009-11-25 13:40:47 -0800
commitf50dbd992d6973caeaaa3139ddf5f908dd84ec79 (patch)
treecbdb343de89306a4ed823dc5aa104a802f846dc4 /modules/gallery/helpers/photo.php
parent2e420522ece22942a9b3b6ee413ca0e1dfa76148 (diff)
parentdc67cf64813361b34c366123f37d88ef6988fcc8 (diff)
Merge branch 'master' of git@github.com:gallery/gallery3 into bharat_dev
Conflicts: modules/gallery/controllers/rest.php
Diffstat (limited to 'modules/gallery/helpers/photo.php')
-rw-r--r--modules/gallery/helpers/photo.php21
1 files changed, 1 insertions, 20 deletions
diff --git a/modules/gallery/helpers/photo.php b/modules/gallery/helpers/photo.php
index 90cb108f..21cb13a0 100644
--- a/modules/gallery/helpers/photo.php
+++ b/modules/gallery/helpers/photo.php
@@ -137,27 +137,8 @@ class photo_Core {
return $photo;
}
- static function get_add_form($parent) {
- $form = new Forge("albums/{$parent->id}", "", "post", array("id" => "g-add-photo-form"));
- $group = $form->group("add_photo")->label(
- t("Add Photo to %album_title", array("album_title" => $parent->title)));
- $group->input("title")->label(t("Title"));
- $group->textarea("description")->label(t("Description"));
- $group->input("name")->label(t("Filename"));
- $group->input("slug")->label(t("Internet Address"))->value($photo->slug)
- ->callback("item::validate_url_safe")
- ->error_messages(
- "not_url_safe",
- t("The internet address should contain only letters, numbers, hyphens and underscores"));
- $group->upload("file")->label(t("File"))->rules("required|allow[jpg,png,gif,flv,mp4]");
- $group->hidden("type")->value("photo");
- $group->submit("")->value(t("Upload"));
- $form->add_rules_from(ORM::factory("item"));
- return $form;
- }
-
static function get_edit_form($photo) {
- $form = new Forge("photos/$photo->id", "", "post", array("id" => "g-edit-photo-form"));
+ $form = new Forge("photos/update/$photo->id", "", "post", array("id" => "g-edit-photo-form"));
$form->hidden("_method")->value("put");
$group = $form->group("edit_item")->label(t("Edit Photo"));
$group->input("title")->label(t("Title"))->value($photo->title);