summaryrefslogtreecommitdiff
path: root/modules/gallery/controllers/quick.php
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2010-07-13 12:30:03 -0700
committerBharat Mediratta <bharat@menalto.com>2010-07-13 12:30:03 -0700
commit887154a3b797eade36c1c651e2e849c613459544 (patch)
tree835214c5c76dbfa2b1de584a6f3f58235a0009ad /modules/gallery/controllers/quick.php
parent5eb4b8ff6cae33d83cfef8ea3d41cba4352e65d8 (diff)
parent69dfb51490b62bd639c8e09461fad15f4fb51650 (diff)
Merge branch 'master' of github.com:gallery/gallery3
Diffstat (limited to 'modules/gallery/controllers/quick.php')
-rw-r--r--modules/gallery/controllers/quick.php17
1 files changed, 5 insertions, 12 deletions
diff --git a/modules/gallery/controllers/quick.php b/modules/gallery/controllers/quick.php
index dc0c380a..253a279b 100644
--- a/modules/gallery/controllers/quick.php
+++ b/modules/gallery/controllers/quick.php
@@ -91,17 +91,10 @@ class Quick_Controller extends Controller {
access::required("view", $item);
access::required("edit", $item);
- if ($item->is_album()) {
- print t(
- "Delete the album <b>%title</b>? All photos and movies in the album will also be deleted.",
- array("title" => html::purify($item->title)));
- } else {
- print t("Are you sure you want to delete <b>%title</b>?",
- array("title" => html::purify($item->title)));
- }
-
- $form = item::get_delete_form($item);
- print $form;
+ $v = new View("quick_delete_confirm.html");
+ $v->item = $item;
+ $v->form = item::get_delete_form($item);
+ print json_encode(array("form" => (string) $v));
}
public function delete($id) {
@@ -161,6 +154,6 @@ class Quick_Controller extends Controller {
// Pass on the source item where this form was generated, so we have an idea where to return to.
$form->hidden("from_id")->value((int)Input::instance()->get("from_id", 0));
- print $form;
+ print json_encode(array("form" => (string) $form));
}
}