forked from Public/pics
Remove obsolete ConfirmDeletePage and Button templates
This commit is contained in:
parent
e28fcd8b03
commit
3a533b7644
@ -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>';
|
|
||||||
}
|
|
||||||
}
|
|
@ -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();
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user