<script src="<?php echo $rootdir ?>/lib/jscripts/jquery/plugins/colorpicker/bootstrap-colorpicker.min.js"></script>
<link rel="stylesheet" href="<?php echo $theme_path ?>/css/colorpicker/bootstrap-colorpicker.min.css">
<form action="" method="post" id="add-form">
	<input type="hidden" name="op" value="update">
	<input type="hidden" name="backto" value="record-edit">
	<input type="hidden" name="id_record" value="<?php echo $id_record ?>">



	<div class="panel panel-<?php echo $_SESSION['profilo_pannello'] ?>">
		<div class="clearfix"></div>
		</br>
		<div class="col-md-4">
			<div class="pull-left">
				<button type="submit" class="btn-app btn-success"><i class="fa fa-check"></i> Salva </button>
			</div>
		</div>
		<div class="col-md-4">
			<div class="pull-right">
				<!--
					<div class="pull-left showcase sweet">
					<button type="button" class="btn-app btn-danger" aria-label="Show SweetAlert2 success message" ><i class="fa fa-trash-o"></i> Elimina</span></button>
					</div>
				-->
			</div>
		</div>

		<div class="col-md-4">
			<a class="btn btn-app btn-info" target="_blank" href="https://www.w3schools.com/icons/fontawesome_icons_text.asp"><i class="fa fa-mobile"></i> Esempi Icone</a>
		</div>
		<div class="clearfix"></div>

	</div>

	<div class="clearfix"></div>



	<div class="panel panel-<?php echo $_SESSION['profilo_pannello'] ?>">
		<div class="panel-heading">
			<h3 class="panel-title">Impostazione Menu Gest366</h3>
		</div>
		<div class="panel-body">
			<div class="row">
				<div class="col-md-3">
					{[ "type": "text", "label": "Nome", "name": "name", "required": 1, "class": "", "value": "$name$", "extra": "" ]}
				</div>
				<div class="col-md-3">
					 {["type": "select", "label": "Parente", "name": "parent", "required": 0, "class": "", "values": "query=SELECT id as id ,  CONCAT(name2,' ',name) AS descrizione  FROM zz_modules", "value": "$parent$", "extra": "" ]}
				</div>
				<div class="col-md-1">
					{[ "type": "text", "label": "Ordinamento", "name": "order", "required": 0, "class": "inputmask-integer", "value": "$order$", "extra": "" ]}
				</div>
				<div class="col-md-2">
					{[ "type": "checkbox", "label": "Visibile", "name": "enabled", "required": 0, "class": "", "values": "$enabled$", "value": "$enabled$", "extra": "", "help": "", "placeholder": "ATTIVO" ]}
				</div>
			</div>
			<div class="row">
				<div class="col-md-2">
					{[ "type": "text", "label": "Icona", "name": "icon", "required": 0, "class": "", "value": "$icon$", "extra": "" ]}
				</div>
			</div>
		</div>
	</div>

</form>


<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() );
	});
</script>

