mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-07-28 10:43:53 -04:00
Make the slug field required for all items.
Make the filename field required for photos/movies. Fixes ticket #838
This commit is contained in:
@@ -135,6 +135,7 @@ class movie_Core {
|
||||
$group->input("title")->label(t("Title"))->value($movie->title);
|
||||
$group->textarea("description")->label(t("Description"))->value($movie->description);
|
||||
$group->input("filename")->label(t("Filename"))->value($movie->name)
|
||||
->rules("required")
|
||||
->error_messages(
|
||||
"name_conflict", t("There is already a movie, photo or album with this name"))
|
||||
->callback("item::validate_no_slashes")
|
||||
|
||||
@@ -163,6 +163,7 @@ class photo_Core {
|
||||
$group->input("title")->label(t("Title"))->value($photo->title);
|
||||
$group->textarea("description")->label(t("Description"))->value($photo->description);
|
||||
$group->input("filename")->label(t("Filename"))->value($photo->name)
|
||||
->rules("required")
|
||||
->error_messages(
|
||||
"name_conflict", t("There is already a movie, photo or album with this name"))
|
||||
->callback("item::validate_no_slashes")
|
||||
|
||||
@@ -24,7 +24,8 @@ class Item_Model extends ORM_MPTT {
|
||||
var $rules = array(
|
||||
"name" => "required|length[0,255]",
|
||||
"title" => "required|length[0,255]",
|
||||
"description" => "length[0,65535]"
|
||||
"description" => "length[0,65535]",
|
||||
"slug" => "required|length[0,255]"
|
||||
);
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user