<?php
$est = new Estacionamiento();
$carrocerias = $est->carrocerias();
?>
<form id="precio" class="five column custom centered" action="javascript:void(0);" method="post">
	<fieldset>
		<legend>Nuevo precio</legend>
		<label><span class="requerido"></span> Valor minimo(30 minutos):</label>
		<input class="three" type="number" min="0" step="1" value="0" name="minimo">
		<label><span class="requerido"></span> Valor hora:</label>
		<input class="three" type="number" min="0" step="1" value="0" name="hora">
		<label>Tiempo extra(minutos):</label>
		<input class="three" type="number" min="0" step="1" value="0" name="tiempo_extra">
		<label>Valor por tiempo extra:</label>
		<input class="three" type="number" min="0" step="1" value="0" name="valor_tiempo_extra">

		<label for="customDropdown"><span class="requerido"></span> Carroceria:</label>
		<select name="car_id" style="display:none;" id="customDropdown">
			<?php foreach($carrocerias as $carroceria){ ?>
			<option value="<?php echo $carroceria['id']; ?>"><?php echo $carroceria['nombre']; ?></option>
			<?php } ?>
		</select>
		<div class="custom dropdown" style="width:380px;">
			<a href="#" class="current">
				<?php echo $carrocerias[0]['nombre']; ?>
			</a>
			<a href="#" class="selector"></a>
			<ul>
				<?php foreach($carrocerias as $carroceria){ ?>
					<li style="width:380px;"><?php echo $carroceria['nombre']; ?></li>
				<?php } ?>
			</ul>
		</div>
		<input type="submit" class="success button radius" value="Guardar" style="margin:10px;" onclick="xajax_nuevo_precio(xajax.getFormValues('precio'));">
		<a href="{BASE}precios" class="alert button radius" style="margin:10px;">Cancelar</a>
	</fieldset>
</form>