diff --git a/assets/plugins/templatesedit/class/templatesedit.class.php b/assets/plugins/templatesedit/class/templatesedit.class.php index e6a1044..8dcf220 100644 --- a/assets/plugins/templatesedit/class/templatesedit.class.php +++ b/assets/plugins/templatesedit/class/templatesedit.class.php @@ -386,10 +386,14 @@ public function getTemplateVariables(): ?array } } if (empty($this->config[$tabId][$colId])) { - unset($this->config[$tabId]); + unset($this->config[$tabId][$colId]); } } } + + if (empty($this->config[$tabId])) { + unset($this->config[$tabId]); + } } if (!empty($categories) && !empty($this->params['default.tab'])) { @@ -584,6 +588,7 @@ protected function renderField(string $key, array $data, array $settings = []): $data['pattern'] = isset($data['pattern']) ? ' pattern="' . $data['pattern'] . '"' : ''; $data['required'] = !empty($data['required']) ? ' required' : ''; $data['elements'] = $data['elements'] ?? ''; + $data['type'] = $data['type'] ?? null; if (isset($this->defaultFields[$key])) { if (isset($data['type'])) { diff --git a/install/assets/plugins/templatesedit.tpl b/install/assets/plugins/templatesedit.tpl index c0757e7..944de71 100644 --- a/install/assets/plugins/templatesedit.tpl +++ b/install/assets/plugins/templatesedit.tpl @@ -5,9 +5,9 @@ * Кастомизация полей при редактировании документов * * @category plugin - * @version 3.1.9 + * @version 3.1.10 * @package evo - * @internal @properties &showTvImage=Show TV thumbnail;list;yes,no;yes &showTvName=Show TV titles;list;yes,no;no &excludeTvCategory=Exclude TV from categories;text; + * @internal @properties &showTvImage=Show TV thumbnail;list;yes,no;no &showTvName=Show TV titles;list;yes,no;no &excludeTvCategory=Exclude TV from categories;text; * @internal @events OnDocFormTemplateRender,OnDocFormRender,OnDocFormSave,OnTempFormRender,OnTempFormSave,OnTempFormDelete * @internal @modx_category Manager and Admin * @internal @installset base,sample