From a162214ef689badec1505fecd0fcfad8c8bd2812 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Sun, 6 Dec 2020 11:13:19 +0100 Subject: [PATCH] tpl fixes, dont use printHtml for none-string types --- .../Components/InlinePreview/BaseView.php | 17 +++++++++++++---- .../InlinePreview/inline-preview.tpl.php | 16 ++++++++-------- Theme/Backend/Components/Media/list.tpl.php | 2 +- Theme/Backend/media-single.tpl.php | 4 ++-- 4 files changed, 24 insertions(+), 15 deletions(-) diff --git a/Theme/Backend/Components/InlinePreview/BaseView.php b/Theme/Backend/Components/InlinePreview/BaseView.php index edc0957..05ab21a 100755 --- a/Theme/Backend/Components/InlinePreview/BaseView.php +++ b/Theme/Backend/Components/InlinePreview/BaseView.php @@ -38,6 +38,14 @@ class BaseView extends View */ protected string $id = ''; + /** + * Form id + * + * @var string + * @since 1.0.0 + */ + protected string $form = ''; + /** * Virtual path of the media file * @@ -76,10 +84,11 @@ class BaseView extends View */ public function render(...$data) : string { - $this->id = $data[0]; - $this->name = $data[1]; - $this->virtualPath = $data[2] ?? '/'; - $this->isRequired = $data[3] ?? false; + $this->form = $data[0]; + $this->id = $data[1]; + $this->name = $data[2]; + $this->virtualPath = $data[3] ?? '/'; + $this->isRequired = $data[4] ?? false; return parent::render(); } diff --git a/Theme/Backend/Components/InlinePreview/inline-preview.tpl.php b/Theme/Backend/Components/InlinePreview/inline-preview.tpl.php index d27a4c7..de16e03 100755 --- a/Theme/Backend/Components/InlinePreview/inline-preview.tpl.php +++ b/Theme/Backend/Components/InlinePreview/inline-preview.tpl.php @@ -1,10 +1,10 @@
- -
- + -