- {[ "type": "text", "label": "", "name": "codice", "required": 1, "value": "" ]}
+ {[ "type": "text", "label": "", "name": "codice", "class":"alphanumeric-mask", "required": 1, "value": "" ]}
diff --git a/modules/articoli/edit.php b/modules/articoli/edit.php
index a52e4f37f..bf7159070 100644
--- a/modules/articoli/edit.php
+++ b/modules/articoli/edit.php
@@ -25,7 +25,7 @@ $_SESSION['superselect']['id_categoria'] = $records[0]['id_categoria'];
- {[ "type": "text", "label": "", "name": "codice", "required": 1, "value": "$codice$" ]}
+ {[ "type": "text", "label": "", "name": "codice", "class":"alphanumeric-mask", "required": 1, "value": "$codice$" ]}
{[ "type": "checkbox", "label": "", "name": "attivo", "value": "$attivo$", "help": "", "placeholder": "" ]}
@@ -69,6 +69,7 @@ $_SESSION['superselect']['id_categoria'] = $records[0]['id_categoria'];
0) ? $records[0]['abilita_serial'] = 1 : $records[0]['abilita_serial'] = $records[0]['abilita_serial'];
if (empty($records[0]['abilita_serial'])) {
$plugin = $dbo->fetchArray("SELECT id FROM zz_plugins WHERE name='Serial'");
echo '';
@@ -76,7 +77,7 @@ $_SESSION['superselect']['id_categoria'] = $records[0]['id_categoria'];
?>
- {[ "type": "checkbox", "label": "", "name": "abilita_serial", "value": "$abilita_serial$", "help": "", "placeholder": "" ]}
+ {[ "type": "checkbox", "label": "", "name": "abilita_serial", "value": "$abilita_serial$", "help": "", "placeholder": "", "extra": "0) ? 'readonly' : ''; ?>" ]}
diff --git a/modules/articoli/init.php b/modules/articoli/init.php
index c71d416bc..894dba964 100644
--- a/modules/articoli/init.php
+++ b/modules/articoli/init.php
@@ -3,5 +3,5 @@
include_once __DIR__.'/../../core.php';
if (isset($id_record)) {
- $records = $dbo->fetchArray('SELECT * FROM mg_articoli WHERE id='.prepare($id_record));
+ $records = $dbo->fetchArray('SELECT *, (SELECT COUNT(id) FROM mg_prodotti WHERE id_articolo = mg_articoli.id) AS serial FROM mg_articoli WHERE id='.prepare($id_record));
}
diff --git a/modules/my_impianti/modutil.php b/modules/my_impianti/modutil.php
index 90314cef4..a8a3d3d27 100644
--- a/modules/my_impianti/modutil.php
+++ b/modules/my_impianti/modutil.php
@@ -6,10 +6,13 @@ function genera_form_componente($contenuto)
{
$fields = \Util\Ini::getFields($contenuto);
$title = array_shift($fields);
-
+
foreach ($fields as $key => $value) {
$fields[$key] = '
'.$value.'
';
}
-
- echo $title.PHP_EOL.implode(PHP_EOL, $fields).PHP_EOL.'';
-}
+
+ echo $title;
+ echo '
';
+ echo PHP_EOL.implode(PHP_EOL, $fields).PHP_EOL.'';
+ echo '
';
+}
\ No newline at end of file
diff --git a/modules/stati_intervento/add.php b/modules/stati_intervento/add.php
index f4f6f659b..0c31490f4 100644
--- a/modules/stati_intervento/add.php
+++ b/modules/stati_intervento/add.php
@@ -16,7 +16,7 @@ include_once __DIR__.'/../../core.php';
- {[ "type": "text", "label": "", "name": "colore", "required": 1, "class": "colorpicker text-center", "value": "#ffffff", "extra": "maxlength='7'", "icon-after": "
" ]}
+ {[ "type": "text", "label": "", "name": "colore", "id": "colore_", "required": 1, "class": "colorpicker text-center", "value": "#ffffff", "extra": "maxlength='7'", "icon-after": "
" ]}