mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-08-22 23:05:18 -04:00
Revert commit 078c77a62b and change the
tag_event:item_edit_form to use the new Form_Script library to inject script into a form.
This commit is contained in:
@@ -166,8 +166,7 @@ class Albums_Controller extends Items_Controller {
|
||||
access::required("view", $album);
|
||||
access::required("edit", $album);
|
||||
|
||||
$view = album::get_edit_form($album);
|
||||
$form = $view->form;
|
||||
$form = album::get_edit_form($album);
|
||||
if ($valid = $form->validate()) {
|
||||
// Make sure that there's not a conflict
|
||||
if ($album->id != 1 &&
|
||||
@@ -203,7 +202,7 @@ class Albums_Controller extends Items_Controller {
|
||||
} else {
|
||||
print json_encode(
|
||||
array("result" => "error",
|
||||
"form" => $view->__toString()));
|
||||
"form" => $form->__toString()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -70,8 +70,7 @@ class Movies_Controller extends Items_Controller {
|
||||
access::required("view", $photo);
|
||||
access::required("edit", $photo);
|
||||
|
||||
$view = photo::get_edit_form($photo);
|
||||
$form = $view->form;
|
||||
$form = photo::get_edit_form($photo);
|
||||
if ($valid = $form->validate()) {
|
||||
// Make sure that there's not a conflict
|
||||
if (Database::instance()
|
||||
@@ -102,7 +101,7 @@ class Movies_Controller extends Items_Controller {
|
||||
} else {
|
||||
print json_encode(
|
||||
array("result" => "error",
|
||||
"form" => $view->__toString()));
|
||||
"form" => $form->__toString()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -61,8 +61,7 @@ class Photos_Controller extends Items_Controller {
|
||||
access::required("view", $photo);
|
||||
access::required("edit", $photo);
|
||||
|
||||
$view = photo::get_edit_form($photo);
|
||||
$form = $view->form;
|
||||
$form = photo::get_edit_form($photo);
|
||||
if ($valid = $form->validate()) {
|
||||
if ($form->edit_item->filename->value != $photo->name) {
|
||||
// Make sure that there's not a conflict
|
||||
@@ -95,7 +94,7 @@ class Photos_Controller extends Items_Controller {
|
||||
} else {
|
||||
print json_encode(
|
||||
array("result" => "error",
|
||||
"form" => $view->__toString()));
|
||||
"form" => $form->__toString()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user