Remove obsolete ConfirmDeletePage and Button templates

This commit is contained in:
Aaron van Geffen 2023-11-11 15:31:06 +01:00
parent e28fcd8b03
commit 3a533b7644
2 changed files with 0 additions and 62 deletions

View File

@ -1,27 +0,0 @@
<?php
/*****************************************************************************
* Button.php
* Defines the Button template.
*
* Kabuki CMS (C) 2013-2015, Aaron van Geffen
*****************************************************************************/
class Button extends Template
{
private $content = '';
private $href = '';
private $class = '';
public function __construct($content = '', $href = '', $class = '')
{
$this->content = $content;
$this->href = $href;
$this->class = $class;
}
public function html_main()
{
echo '
<a class="', $this->class, '" href="', $this->href, '">', $this->content, '</a>';
}
}

View File

@ -1,35 +0,0 @@
<?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();
}
}