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
|
|
|
}
|
|
|
|
|
|
|
|
protected function html_content()
|
|
|
|
{
|
|
|
|
$this->confirm();
|
|
|
|
$this->photo();
|
|
|
|
}
|
|
|
|
|
|
|
|
private function confirm()
|
|
|
|
{
|
2018-07-08 10:19:37 +02:00
|
|
|
$buttons = [];
|
|
|
|
$buttons[] = new Button("Delete", BASEURL . '/' . $this->photo->getSlug() . '?delete_confirmed', "btn btn-red");
|
|
|
|
$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
|
|
|
|
);
|
|
|
|
$alert->html_content();
|
2018-07-07 14:21:12 +02:00
|
|
|
}
|
|
|
|
}
|