From 390bc7c1f6b79924e42b326718ee244ee989243a Mon Sep 17 00:00:00 2001 From: Chad Kieffer Date: Sun, 14 Jun 2009 10:42:14 -0600 Subject: Switch quick delete from JS confirm to jQuery UI dialog, closes ticket #355. --- modules/gallery/controllers/quick.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'modules/gallery/controllers/quick.php') diff --git a/modules/gallery/controllers/quick.php b/modules/gallery/controllers/quick.php index d6f5213f..30383307 100644 --- a/modules/gallery/controllers/quick.php +++ b/modules/gallery/controllers/quick.php @@ -95,6 +95,21 @@ class Quick_Controller extends Controller { print json_encode(array("result" => "success", "reload" => 1)); } + public function form_delete($id) { + $item = model_cache::get("item", $id); + access::required("view", $item); + access::required("edit", $item); + + if ($item->is_album()) { + print t("Delete the album %title? All items within the album will also be deleted.", array("title" => $item->title)); + } else { + print t("Are you sure you want to delete %title?", array("title" => $item->title)); + } + + $form = item::get_delete_form($item); + print $form; + } + public function delete($id) { access::verify_csrf(); $item = model_cache::get("item", $id); -- cgit v1.2.3