From 6b28ded828ba8e325a1d3b4229c718276c171914 Mon Sep 17 00:00:00 2001 From: loviuz Date: Fri, 24 Feb 2023 11:26:42 +0100 Subject: [PATCH] Fix editor su impostazioni --- src/Settings.php | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/Settings.php b/src/Settings.php index eb3ed13e6..299809779 100755 --- a/src/Settings.php +++ b/src/Settings.php @@ -220,8 +220,21 @@ class Settings {[ "type": "checkbox", "label": '.json_encode($setting->nome).', "readonly": "'.!$setting->editable.'", "name": "setting['.$setting->id.']", "placeholder": "'.tr('Attivo').'", "value": "'.$setting->valore.'", "required": "'.intval($required).'", "help": "'.$setting->help.'" ]}'; } + // Editor + elseif ($setting->tipo == 'ckeditor') { + $result = input([ + 'type' => 'ckeditor', + 'label' => json_encode($setting->nome), + 'readonly' => !$setting->editable, + 'name' => 'setting['.$setting->id.']', + 'value' => $setting->valore, + 'required' => intval($required), + 'help' => $setting->help, + ]); + } + // Campi di default - elseif (in_array($setting->tipo, ['textarea', 'ckeditor', 'timestamp', 'date', 'time'])) { + elseif (in_array($setting->tipo, ['textarea', 'timestamp', 'date', 'time'])) { $result = ' {[ "type": "'.$setting->tipo.'", "label": '.json_encode($setting->nome).', "readonly": "'.!$setting->editable.'", "name": "setting['.$setting->id.']", "value": '.json_encode($setting->valore).', "required": "'.intval($required).'", "help": "'.$setting->help.'" ]}'; }