diff options
author | Bharat Mediratta <bharat@menalto.com> | 2009-09-07 16:19:41 -0700 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2009-09-07 16:21:58 -0700 |
commit | 795675e2b5eeee30d90e2efdda28c3df10677af3 (patch) | |
tree | b06d3c284c9f6b8a9e91f958d9a13f2e0272785f /modules | |
parent | 991bb0c06319a4d1d0ed1194826f5438a97964b6 (diff) |
Add the slug to album, photo, and movie forms.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/gallery/helpers/album.php | 2 | ||||
-rw-r--r-- | modules/gallery/helpers/photo.php | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/modules/gallery/helpers/album.php b/modules/gallery/helpers/album.php index 78c5062f..d995b6ad 100644 --- a/modules/gallery/helpers/album.php +++ b/modules/gallery/helpers/album.php @@ -100,6 +100,7 @@ class album_Core { $group->input("name")->label(t("Directory Name")) ->callback("item::validate_no_slashes") ->error_messages("no_slashes", t("The directory name can't contain the \"/\" character")); + $group->input("slug")->label(t("Internet Address")); $group->hidden("type")->value("album"); $group->submit("")->value(t("Create")); $form->add_rules_from(ORM::factory("item")); @@ -122,6 +123,7 @@ class album_Core { ->error_messages("no_slashes", t("The directory name can't contain a \"/\"")) ->callback("item::validate_no_trailing_period") ->error_messages("no_trailing_period", t("The directory name can't end in \".\"")); + $group->input("slug")->label(t("Internet Address"))->value($parent->slug); } $sort_order = $group->group("sort_order", array("id" => "gAlbumSortOrder")) 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); |