<?php
if (isset($conexion)) {
    ?>
	<div id="nuevaReserva" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="display: none;">
		<div class="modal-dialog">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
					<h4 class="modal-title"><i class='fa fa-edit'></i> Nueva Reserva</h4>
				</div>
				<div class="modal-body">
					<form class="form-horizontal" method="post" id="guardar_reserva" name="guardar_reserva">
						<div id="resultados_ajax"></div>

						<div class="row">
							<div class="col-md-12">
								<div class="form-group">
									<div class="input-group">
										<input type="text" id="nombre_cliente" class="form-control" placeholder="Buscar Cliente" required  tabindex="2">
										<span class="input-group-btn">
											<button type="button" class="btn waves-effect waves-light btn-success" data-toggle="modal" data-target="#nuevoCliente"><li class="fa fa-plus"></li></button>
										</span>
										<input id="id_cliente" name="id_cliente" type='hidden'>
									</div>
								</div>
							</div>
						</div>
						<div class="row">
							<div class="col-md-6">
								<div class="form-group">
									<label for="tel" class="control-label">Telefono Contacto:</label>
									<input type="text" class="form-control UpperCase" id="tel" name="tel"  autocomplete="off" required>
								</div>
							</div>
							<div class="col-md-6">
								<div class="form-group">
									<label for="fecha" class="control-label">Fecha Reserva:</label>
									<input type="date" class="form-control" id="fecha" name="fecha"  autocomplete="off" required>
								</div>
							</div>
						</div>
						<div class="row">
							<div class="col-md-6">
								<div class="form-group">
									<label for="horai" class="control-label">Hora Inicial:</label>
									<input type="time" class="form-control" id="horai" name="horai"  autocomplete="off" required>
								</div>
							</div>
							<div class="col-md-6">
								<div class="form-group">
									<label for="horaf" class="control-label">Hora Final:</label>
									<input type="time" class="form-control" id="horaf" name="horaf"  autocomplete="off" required>
								</div>
							</div>
						</div>
						<div class="row">
							<div class="col-md-6">
								<div class="form-group">
									<label for="cantidad" class="control-label">Cantidad de Personas:</label>
									<input type="number" class="form-control UpperCase" id="cantidad" name="cantidad"  autocomplete="off" required>
								</div>
							</div>
							<div class="col-md-6">
								<div class="form-group">
								<label for="id_salon" class="control-label">Salón:</label>
								<select id = "id_salon" class = "form-control" name = "id_salon" required autocomplete="off">
										<option value="">-- SELECCIONE --</option>
										<?php foreach ($salon as $s): ?>
											<option value="<?php echo $s->id_salon; ?>"><?php echo $s->nombre_salon; ?></option>
										<?php endforeach;?>
									</select>
								</div>
							</div>

						</div>
						<div class="row">
							<div class="col-md-5">
								<div class="form-group">
									<label for="estado" class="control-label">Estado:</label>
									<select class="form-control" id="estado" name="estado" required>
										<option value="">-- Selecciona --</option>
										<option value="1">Proceso</option>
										<option value="2">Aceptada</option>
										<option value="3">Suspendida</option>
										<option value="4">Finalizada</option>
									</select>
								</div>
							</div>
							<div class="col-md-7">
								<div class="form-group">
									<label for="obs" class="control-label">Observación:</label>
									<input type="text" class="form-control UpperCase" id="obs" name="obs"  autocomplete="off">
								</div>
							</div>
						</div>

					</div>
					<div class="modal-footer">
						<button type="button" class="btn btn-secondary waves-effect" data-dismiss="modal">Cerrar</button>
						<button type="submit" class="btn btn-primary waves-effect waves-light" id="guardar_datos">Guardar</button>
					</div>
				</form>
			</div>
		</div>
	</div><!-- /.modal -->
	<?php
}
?>