forked from Public/pics
Allow resetting password through email.
This also adopts the use of an Alert template for error and success messages.
This commit is contained in:
24
templates/Alert.php
Normal file
24
templates/Alert.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
/*****************************************************************************
|
||||
* Alert.php
|
||||
* Defines the key template Alert.
|
||||
*
|
||||
* Kabuki CMS (C) 2013-2015, Aaron van Geffen
|
||||
*****************************************************************************/
|
||||
|
||||
class Alert extends SubTemplate
|
||||
{
|
||||
public function __construct($title = '', $message = '', $type = 'alert')
|
||||
{
|
||||
$this->_title = $title;
|
||||
$this->_message = $message;
|
||||
$this->_type = in_array($type, ['alert', 'error', 'success', 'info']) ? $type : 'alert';
|
||||
}
|
||||
|
||||
protected function html_content()
|
||||
{
|
||||
echo '
|
||||
<div class="alert', $this->_type != 'alert' ? ' alert-' . $this->_type : '', '">', (!empty($this->_title) ? '
|
||||
<strong>' . $this->_title . '</strong><br>' : ''), $this->_message, '</div>';
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user