From 1659d010c22b9b516cc5bb26a84acba777d1d239 Mon Sep 17 00:00:00 2001 From: MatteoPistorello Date: Mon, 7 Mar 2022 16:40:03 +0100 Subject: [PATCH] Fix html format creazione vista --- modules/viste/fields.php | 17 ++++++++++++----- update/2_4_31.sql | 4 ++-- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/modules/viste/fields.php b/modules/viste/fields.php index 4790a20e4..e358f4b52 100755 --- a/modules/viste/fields.php +++ b/modules/viste/fields.php @@ -99,6 +99,7 @@ foreach ($fields as $key => $field) { {[ "type": "checkbox", "label": "'.tr('Sommabile').'", "name": "sum['.$key.']", "value": "'.$field['summable'].'", "help": "'.tr('Indica se il campo รจ da sommare').'" ]} +
{[ "type": "checkbox", "label": "'.tr('Formattazione automatica').'", "name": "format['.$key.']", "value": "'.$field['format'].'", "help": "'.tr('Indica se il campo deve essere formattabile in modo automatico, per esempio valori numerici o date.').'" ]} @@ -201,20 +202,26 @@ echo '
-
+
{[ "type": "checkbox", "label": "'.tr('Ricercabile').'", "name": "search[-id-]" ]}
-
+
{[ "type": "checkbox", "label": "'.tr('Ricerca lenta').'", "name": "slow[-id-]" ]}
-
+
{[ "type": "checkbox", "label": "'.tr('Sommabile').'", "name": "sum[-id-]" ]}
+
-
- {[ "type": "checkbox", "label": "'.tr('Formattabile').'", "name": "format[-id-]" ]} +
+
+ {[ "type": "checkbox", "label": "'.tr('Formattazione automatica').'", "name": "format[-id-]", "help": "'.tr('Indica se il campo deve essere formattabile in modo automatico, per esempio valori numerici o date.').'" ]} +
+ +
+ {[ "type": "checkbox", "label": "'.tr('Utilizza HTML').'", "name": "html_format[-id-]", "help": "'.tr('Indica se il campo deve mantenere la formattazione HTML. Impostazione utile per i campi di testo con editor.').'" ]}
diff --git a/update/2_4_31.sql b/update/2_4_31.sql index 9972a0526..8a93ee47a 100644 --- a/update/2_4_31.sql +++ b/update/2_4_31.sql @@ -28,8 +28,8 @@ INSERT INTO `zz_views` (`id`, `id_module`, `name`, `query`, `order`, `search`, ` (NULL, (SELECT `id` FROM `zz_modules` WHERE `name` = 'Anagrafiche'), 'Codice', 'an_anagrafiche.codice', 1, 1, 0, 0, '', '', 0, 0, 1); -- Aggiunta opzione formattazione HTML nelle viste per la gestione dei campi CKeditor -ALTER TABLE `zz_views` ADD `html_format` TINYINT NOT NULL DEFAULT '1' AFTER `format`; -UPDATE `zz_views` SET `html_format` = '1'; +ALTER TABLE `zz_views` ADD `html_format` TINYINT NOT NULL DEFAULT '0' AFTER `format`; +UPDATE `zz_views` SET `html_format` = '0'; -- Correzione widget valore magazzino UPDATE `zz_widgets` SET `query` = 'SELECT CONCAT_WS(\" \", REPLACE(REPLACE(REPLACE(FORMAT(SUM(prezzo_acquisto*qta),2), \",\", \"#\"), \".\", \",\"), \"#\", \".\"), \"€\") AS dato FROM mg_articoli WHERE qta>0 AND deleted_at IS NULL AND servizio=0 AND 1=1', `help` = 'Articoli a magazzino (tutti o solo attivi secondo il segmento)' WHERE `zz_widgets`.`name` = 'Valore magazzino';