2018-07-07 14:21:12 +02:00
|
|
|
<?php
|
|
|
|
/*****************************************************************************
|
|
|
|
* ConfirmDeletePage.php
|
|
|
|
* Contains the confirm delete page template.
|
|
|
|
*
|
|
|
|
* Kabuki CMS (C) 2013-2016, Aaron van Geffen
|
|
|
|
*****************************************************************************/
|
|
|
|
|
2018-07-08 10:19:37 +02:00
|
|
|
class ConfirmDeletePage extends PhotoPage
|
2018-07-07 14:21:12 +02:00
|
|
|
{
|
|
|
|
public function __construct(Image $photo)
|
|
|
|
{
|
2018-07-08 10:19:37 +02:00
|
|
|
parent::__construct($photo);
|
2018-07-07 14:21:12 +02:00
|
|
|
}
|
|
|
|
|
2023-03-12 01:00:50 +01:00
|
|
|
public function html_main()
|
2018-07-07 14:21:12 +02:00
|
|
|
{
|
|
|
|
$this->confirm();
|
|
|
|
$this->photo();
|
|
|
|
}
|
|
|
|
|
|
|
|
private function confirm()
|
|
|
|
{
|
2018-07-08 10:19:37 +02:00
|
|
|
$buttons = [];
|
2023-03-12 01:00:50 +01:00
|
|
|
$buttons[] = new Button("Delete", BASEURL . '/' . $this->photo->getSlug() . '/?delete_confirmed', "btn btn-danger");
|
2018-07-08 10:19:37 +02:00
|
|
|
$buttons[] = new Button("Cancel", $this->photo->getPageUrl(), "btn");
|
2018-07-07 14:21:12 +02:00
|
|
|
|
2018-07-08 10:19:37 +02:00
|
|
|
$alert = new WarningDialog(
|
|
|
|
"Confirm deletion.",
|
|
|
|
"You are about to permanently delete the following photo.",
|
|
|
|
$buttons
|
|
|
|
);
|
2023-03-12 01:00:50 +01:00
|
|
|
$alert->html_main();
|
2018-07-07 14:21:12 +02:00
|
|
|
}
|
|
|
|
}
|