Fix colorpicker stati intervento + associazione componente articolo

This commit is contained in:
Luca 2018-03-27 01:00:15 +02:00
parent f9c65acf22
commit b128541c35
4 changed files with 12 additions and 9 deletions

View File

@ -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">

View File

@ -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'); ?>" ]}

View File

@ -11,5 +11,8 @@ function genera_form_componente($contenuto)
$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>';
}

View File

@ -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>