staticText('id', 'ID')
->staticText('description', _t('@banners', 'Note'), function ($v){ ?>
= HTML::escape($v) ?>
hidden(function () use ($form) {
return empty($form->getData('description'));
})
->staticText('pos', _t('@banners', 'Banner Position'), function ($v) use ($positions) { ?>
= $positions[$v]['title'] ?? $v ?>
staticText('type', _t('@banners', 'Banner Type'), function ($v) {
$types = Banners::types(); ?>
= $types[$v]['t'] ?? $v ?>
staticText('', $v['t'], function () use ($form, $v) {
$type = $form->getData('type');
$data = $form->getData('type_data');
if ($type == Banners::TYPE_IMAGE) {
$img = $data['img_' . $v['id'] ]['name'] ?? '';
$url = Banners::buildUrl($form->getData('id'), $img, Banners::szView);
?>
= HTML::escape(json_encode($data, JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT)) ?>buttonsNo() ;