Replace generic alert, form and table templates with new Bootstrap equivalents

This commit is contained in:
2023-03-11 13:20:59 +01:00
parent daf6b6b264
commit f9eefe7b41
18 changed files with 681 additions and 573 deletions

View File

@@ -6,7 +6,7 @@
* Kabuki CMS (C) 2013-2015, Aaron van Geffen
*****************************************************************************/
class Alert extends SubTemplate
class Alert extends Template
{
private $_type;
private $_message;
@@ -16,20 +16,20 @@ class Alert extends SubTemplate
{
$this->_title = $title;
$this->_message = $message;
$this->_type = in_array($type, ['alert', 'error', 'success', 'info']) ? $type : 'alert';
$this->_type = in_array($type, ['success', 'info', 'warning', 'danger']) ? $type : 'info';
}
protected function html_content()
public function html_main()
{
echo '
<div class="alert', $this->_type != 'alert' ? ' alert-' . $this->_type : '', '">', (!empty($this->_title) ? '
<strong>' . $this->_title . '</strong><br>' : ''), '<p>', $this->_message, '</p>';
$this->additional_alert_content();
echo '</div>';
<div class="alert', $this->_type !== 'alert' ? ' alert-' . $this->_type : '', '">'
, !empty($this->_title) ? '<strong>' . $this->_title . '</strong><br>' : '', '
', $this->_message,
$this->additional_alert_content(), '
</div>';
}
protected function additional_alert_content()
{}
{
}
}