mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-06-22 09:29:53 -04:00
Switch quick delete from JS confirm to jQuery UI dialog, closes ticket #355.
Signed-off-by: <unostar@danalan.info>
This commit is contained in:
@@ -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 <b>%title</b>? All items within the album will also be deleted.", array("title" => $item->title));
|
||||
} else {
|
||||
print t("Are you sure you want to delete <b>%title</b>?", 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);
|
||||
|
||||
Reference in New Issue
Block a user