. */ include_once __DIR__.'/../../core.php'; echo '

'.tr('Dati').'

{[ "type": "text", "label": "'.tr('Nome').'", "name": "name", "value": "$name$", "required": 1 ]}
{[ "type": "select", "label": "'.tr('Modulo del template').'", "name": "module", "values": "query=SELECT `zz_modules`.`id`, `title` AS descrizione FROM `zz_modules` LEFT JOIN `zz_modules_lang` ON (`zz_modules`.`id` = `zz_modules_lang`.`id_record` AND `zz_modules_lang`.`id_lang` = '.prepare(setting('Lingua')).') WHERE `enabled` = 1", "value": "'.$record->id_module.'", "disabled": "'.!empty($record->id_plugin).'" ]}
{[ "type": "select", "label": "'.tr('Plugin del template').'", "name": "plugin", "values": "query=SELECT `zz_plugins`.`id`, `zz_plugins_lang`.`title` AS descrizione, `zz_modules_lang`.`name` AS optgroup FROM zz_plugins INNER JOIN `zz_modules` ON `zz_plugins`.`id_module_to` = `zz_modules`.`id` LEFT JOIN `zz_modules_lang` ON (`zz_modules`.`id` = `zz_modules_lang`.`id_record` AND `zz_modules_lang`.`id_lang` = '.prepare(setting('Lingua')).') LEFT JOIN `zz_plugins_lang` ON (`zz_plugins`.`id` = `zz_plugins_lang`.`id_record` AND `zz_plugins_lang`.`id_lang` = '.prepare(setting('Lingua')).') WHERE `enabled` = 1", "value": "'.$record->id_plugin.'", "disabled": "'.!empty($record->id_module).'" ]}
'; $checks = $record->mainChecks(); $list = []; foreach ($checks as $check) { $list[] = [ 'id' => $check->id, 'text' => $check->content, ]; } echo '

'.tr('Checklist').'

'.input([ 'type' => 'ckeditor', 'label' => tr('Contenuto'), 'name' => 'content', 'required' => 1, 'value' => '', ]).'
{[ "type": "select", "label": "'.tr('Genitore').'", "name": "parent", "class": "unblockable", "values": '.json_encode($list).' ]}
{[ "type": "checkbox", "label": "'.tr('Utilizza come titolo').'", "name": "is_titolo" ]}


'; echo ' '; echo ' '.tr('Elimina').' ';