diff --git a/modules/categorie/actions.php b/modules/categorie/actions.php index e602205ba..852c03108 100644 --- a/modules/categorie/actions.php +++ b/modules/categorie/actions.php @@ -19,9 +19,11 @@ switch (filter('op')) { case 'add': $nome = filter('nome'); + $nota = filter('nota'); + $colore = filter('colore'); if (isset($nome)) { - $dbo->query('INSERT INTO `mg_categorie` (`nome`) VALUES ('.prepare($nome).')'); + $dbo->query('INSERT INTO `mg_categorie` (`nome`, `colore`, `nota`) VALUES ('.prepare($nome).', '.prepare($colore).', '.prepare($nota).')'); $id_record = $dbo->lastInsertedID(); diff --git a/modules/categorie/add.php b/modules/categorie/add.php index 404452285..cab25fd95 100644 --- a/modules/categorie/add.php +++ b/modules/categorie/add.php @@ -19,17 +19,14 @@ if (isset($id_record)) { if (!isset($id_original)) { ?> - -
-
- {[ "type": "text", "label": "", "name": "nome", "required": 1 ]} -
-
+
@@ -47,19 +44,6 @@ if (!isset($id_original)) {
- - -
@@ -77,3 +61,13 @@ if (isset($id_record)) {
+ + diff --git a/modules/categorie/edit.php b/modules/categorie/edit.php index f9b6a3aaa..988c8a8c8 100644 --- a/modules/categorie/edit.php +++ b/modules/categorie/edit.php @@ -79,7 +79,7 @@ $res = $dbo->fetchNum('SELECT * FROM `mg_articoli` WHERE `id_categoria`='.prepar if ($res) { echo '
-

'.tr('Esistono ancora alcuni articoli sotto questa categoria!').'

+

'.tr('Ci sono '.count($res).' articoli collegati questa categoria. Non รจ possibile eliminarla.').'

'; } else { echo '