Fix colorpicker stati intervento + associazione componente articolo
This commit is contained in:
parent
f9c65acf22
commit
b128541c35
|
@ -10,7 +10,7 @@ unset($_SESSION['superselect']['id_categoria']);
|
|||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
{[ "type": "text", "label": "<?php echo tr('Inserisci il codice:'); ?>", "name": "codice", "required": 1, "value": "" ]}
|
||||
{[ "type": "text", "label": "<?php echo tr('Inserisci il codice:'); ?>", "name": "codice", "class":"alphanumeric-mask", "required": 1, "value": "" ]}
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
|
|
|
@ -25,7 +25,7 @@ $_SESSION['superselect']['id_categoria'] = $records[0]['id_categoria'];
|
|||
|
||||
<div class="col-md-4">
|
||||
|
||||
{[ "type": "text", "label": "<?php echo tr('Codice'); ?>", "name": "codice", "required": 1, "value": "$codice$" ]}
|
||||
{[ "type": "text", "label": "<?php echo tr('Codice'); ?>", "name": "codice", "class":"alphanumeric-mask", "required": 1, "value": "$codice$" ]}
|
||||
<br>
|
||||
{[ "type": "checkbox", "label": "<?php echo tr("Seleziona per rendere visibile l'articolo"); ?>", "name": "attivo", "value": "$attivo$", "help": "", "placeholder": "<?php echo tr('ATTIVO'); ?>" ]}
|
||||
|
||||
|
|
|
@ -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] = '<div class="col-md-4">'.$value.'</div>';
|
||||
}
|
||||
|
||||
echo $title.PHP_EOL.implode(PHP_EOL, $fields).PHP_EOL.'<script>start_inputmask( "#info_componente" );</script>';
|
||||
}
|
||||
|
||||
echo $title;
|
||||
echo '<div class="row">';
|
||||
echo PHP_EOL.implode(PHP_EOL, $fields).PHP_EOL.'<script>start_inputmask( "#info_componente" );</script>';
|
||||
echo '</div>';
|
||||
}
|
|
@ -16,7 +16,7 @@ include_once __DIR__.'/../../core.php';
|
|||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
{[ "type": "text", "label": "<?php echo tr('Colore'); ?>", "name": "colore", "required": 1, "class": "colorpicker text-center", "value": "#ffffff", "extra": "maxlength='7'", "icon-after": "<div class='img-circle square'></div>" ]}
|
||||
{[ "type": "text", "label": "<?php echo tr('Colore'); ?>", "name": "colore", "id": "colore_", "required": 1, "class": "colorpicker text-center", "value": "#ffffff", "extra": "maxlength='7'", "icon-after": "<div class='img-circle square'></div>" ]}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -31,9 +31,9 @@ include_once __DIR__.'/../../core.php';
|
|||
<script>
|
||||
$(document).ready( function(){
|
||||
$('.colorpicker').colorpicker().on('changeColor', function(){
|
||||
$('#colore').parent().find('.square').css( 'background', $('#colore').val() );
|
||||
$('#colore_').parent().find('.square').css( 'background', $('#colore_').val() );
|
||||
});
|
||||
|
||||
$('#colore').parent().find('.square').css( 'background', $('#colore').val() );
|
||||
$('#colore_').parent().find('.square').css( 'background', $('#colore_').val() );
|
||||
});
|
||||
</script>
|
||||
|
|
Loading…
Reference in New Issue