<?php
if (isset($conexion)) {
    ?>
	<div id="editarReserva" 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> Editar reserva</h4>
				</div>
				<div class="modal-body">
					<form class="form-horizontal" method="post" id="editar_reserva" name="editar_reserva">
						<div id="resultados_ajax2"></div>

						<div class="row">
							<div class="col-md-12">
								<div class="form-group">
									<div class="input-group">
										<select id = "id_cliente2" class = "form-control" name = "id_cliente2" required autocomplete="off">
										<option value="">-- SELECCIONE --</option>
										<?php foreach ($cliente as $c): ?>
											<option value="<?php echo $c->id_cliente; ?>"><?php echo $c->nombre_cliente; ?></option>
										<?php endforeach;?>
									</select>
										<input id="mod_id" name="mod_id" type='hidden'>
									</div>
								</div>
							</div>
						</div>
						<div class="row">
							<div class="col-md-6">
								<div class="form-group">
									<label for="tel2" class="control-label">Telefono Contacto:</label>
									<input type="text" class="form-control UpperCase" id="tel2" name="tel2"  autocomplete="off" required>
								</div>
							</div>
							<div class="col-md-6">
								<div class="form-group">
									<label for="fecha2" class="control-label">Fecha Reserva:</label>
									<input type="date" class="form-control" id="fecha2" name="fecha2"  autocomplete="off" required>
								</div>
							</div>
						</div>
						<div class="row">
							<div class="col-md-6">
								<div class="form-group">
									<label for="horai2" class="control-label">Hora Inicial:</label>
									<input type="time" class="form-control" id="horai2" name="horai2"  autocomplete="off" required>
								</div>
							</div>
							<div class="col-md-6">
								<div class="form-group">
									<label for="horaf2" class="control-label">Hora Final:</label>
									<input type="time" class="form-control" id="horaf2" name="horaf2"  autocomplete="off" required>
								</div>
							</div>
						</div>
						<div class="row">
							<div class="col-md-6">
								<div class="form-group">
									<label for="cantidad2" class="control-label">Cantidad de Personas:</label>
									<input type="number" class="form-control UpperCase" id="cantidad2" name="cantidad2"  autocomplete="off" required>
								</div>
							</div>
							<div class="col-md-6">
								<div class="form-group">
								<label for="id_salon2" class="control-label">Salón:</label>
								<select id = "id_salon2" class = "form-control" name = "id_salon2" 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="estado2" class="control-label">Estado:</label>
									<select class="form-control" id="estado2" name="estado2" 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="obs2" class="control-label">Observación:</label>
									<input type="text" class="form-control UpperCase" id="obs2" name="obs2"  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="actualizar_datos">Actualizar</button>
					</div>
				</form>
			</div>
		</div>
	</div><!-- /.modal -->
	<?php
}
?>