pics/templates/ConfirmDeletePage.php

36 lines
887 B
PHP
Raw Normal View History

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