summaryrefslogtreecommitdiff
path: root/modules/gallery/helpers/photo.php
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2009-09-07 16:19:41 -0700
committerBharat Mediratta <bharat@menalto.com>2009-09-07 16:21:58 -0700
commit795675e2b5eeee30d90e2efdda28c3df10677af3 (patch)
treeb06d3c284c9f6b8a9e91f958d9a13f2e0272785f /modules/gallery/helpers/photo.php
parent991bb0c06319a4d1d0ed1194826f5438a97964b6 (diff)
Add the slug to album, photo, and movie forms.
Diffstat (limited to 'modules/gallery/helpers/photo.php')
-rw-r--r--modules/gallery/helpers/photo.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/gallery/helpers/photo.php b/modules/gallery/helpers/photo.php
index c713fff9..12515330 100644
--- a/modules/gallery/helpers/photo.php
+++ b/modules/gallery/helpers/photo.php
@@ -140,10 +140,11 @@ class photo_Core {
static function get_add_form($parent) {
$form = new Forge("albums/{$parent->id}", "", "post", array("id" => "gAddPhotoForm"));
$group = $form->group("add_photo")->label(
- t("Add Photo to %album_title", array("album_title" =>$parent->title)));
+ 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);
$group->upload("file")->label(t("File"))->rules("required|allow[jpg,png,gif,flv,mp4]");
$group->hidden("type")->value("photo");
$group->submit("")->value(t("Upload"));
@@ -163,6 +164,7 @@ class photo_Core {
->error_messages("no_slashes", t("The photo name can't contain a \"/\""))
->callback("item::validate_no_trailing_period")
->error_messages("no_trailing_period", t("The photo name can't end in \".\""));
+ $group->input("slug")->label(t("Internet Address"))->value($photo->slug);
module::event("item_edit_form", $photo, $form);