feat(main): Add alert type; add template override support
This commit is contained in:
@@ -37,6 +37,12 @@ class CustomHtmlBlock extends ObjectModel
|
||||
/** @var string */
|
||||
public $image = '';
|
||||
|
||||
/** @var string */
|
||||
public $alert_type = 'info';
|
||||
|
||||
/** @var int */
|
||||
public $timeout = 0;
|
||||
|
||||
/** @var int */
|
||||
public $active = 1;
|
||||
|
||||
@@ -65,6 +71,8 @@ class CustomHtmlBlock extends ObjectModel
|
||||
'extra_description' => ['type' => self::TYPE_STRING, 'validate' => 'isGenericName', 'required' => false, 'size' => 1024],
|
||||
'link' => ['type' => self::TYPE_STRING, 'validate' => 'isGenericName', 'required' => false, 'size' => 512],
|
||||
'image' => ['type' => self::TYPE_STRING, 'validate' => 'isGenericName', 'required' => false, 'size' => 255],
|
||||
'alert_type' => ['type' => self::TYPE_STRING, 'validate' => 'isGenericName', 'required' => false, 'size' => 16],
|
||||
'timeout' => ['type' => self::TYPE_INT, 'validate' => 'isUnsignedInt', 'required' => false],
|
||||
'active' => ['type' => self::TYPE_BOOL, 'validate' => 'isBool'],
|
||||
'show_title' => ['type' => self::TYPE_BOOL, 'validate' => 'isBool'],
|
||||
'ordering' => ['type' => self::TYPE_INT, 'validate' => 'isInt'],
|
||||
@@ -97,7 +105,7 @@ class CustomHtmlBlock extends ObjectModel
|
||||
|
||||
$result = Db::getInstance()->executeS(
|
||||
'SELECT `id_ws_customhtml`, `id_ws_customhtml_group`, `title`, `type`, `content`, `custom_class`,
|
||||
`description`, `extra_description`, `link`, `image`, `active`, `show_title`, `ordering`
|
||||
`description`, `extra_description`, `link`, `image`, `alert_type`, `timeout`, `active`, `show_title`, `ordering`
|
||||
FROM `' . _DB_PREFIX_ . 'ws_customhtml`
|
||||
WHERE `id_ws_customhtml_group` IN (' . implode(',', $groupIds) . ')
|
||||
AND `active` = 1
|
||||
|
||||
Reference in New Issue
Block a user