<!--Formulario que agrega clientes(Administrador General)-->
<div id="page-content-wrapper">
<div class="page-content inset">
<div class="row">
 <div class="col-md-8">
	<link href="\SM\views\css\estilos.css" rel='stylesheet' type='text/css' />
  <script src="http://code.jquery.com/jquery-1.0.4.js"></script>
  <script src="http://code.jquery.com/jquery-1.0.4.js"></script>
  <script src="http://code.jquery.com/jquery-1.0.4.js"></script> 
  <link rel="stylesheet" href="<?php echo base_url().'assets/dist/css/validacion.css'?>">

<head>
<!-- Manda a traer el javascript para validar el formulario -->
  <script type="text/javascript" src="<?php echo base_url()?>assets/dist/js/site.js"></script>
</head>

 <div class="title_right">
<div class="x_panel"> 

<center><h1>Agregar Cliente</h1></center>
<!-- Función que guarda todos los datos ingresados-->
<form action="<?php echo base_url();?>clientes/administrador/clienteA/guardar" method="POST">

	<div class="form-group">
	<label for="name1">Nombre Cliente</label>
	<input type="text" class="form-control" id="name1" name="txt_nombrecliente" maxlength='30' minlength="3" placeholder="Nombre"  onkeypress="return validaLetra(event)" required>

	<label for="name1">Apellido Paterno</label>
	<input type="text" class="form-control" id="name1" name="txt_apaterno" maxlength='25' minlength="15" placeholder="Apellido Paterno"  onkeypress="return validaLetra(event)" required="">

	<label for="name1">Apellido Materno</label>
	<input type="text" class="form-control" id="name1" name="txt_amaterno" maxlength='25' minlength="15" placeholder="Apellido Materno"  onkeypress="return validaLetra(event)" required="">
	
	<label for="name1">Fecha Nacimiento</label>
	<input type="date" class="form-control" id="name1" name="txt_fechanac" placeholder="dd/mm/aaaa" >

	<div class="form-group">
	<label for="name1">Teléfono</label>
	<input type="tel" class="form-control" id="name1" name="txt_TelefonoCliente" maxlength='13' placeholder="2487896578" onkeypress="return valida(event)" required="">
	
	<label for="name1">Celular</label>
	<input type="tel" class="form-control" id="name1" name="txt_CelularCliente" maxlength='13' placeholder="2487896578" onkeypress="return valida(event)" required="">
	
	<label for="name1">Correo  Electrónico </label>
	<input type="email" class="form-control" id="name1" name="txt_CorreoCliente" maxlength='50' placeholder=" sistemas@modelartspa.com" required="" onkeyUp="this.value=this.value.toLowerCase();" required="">
	
	<label for="name1">Direccion</label>
	<input type="text" class="form-control" id="name1" name="txt_DireccionCliente" maxlength='60' placeholder="Dirección"  >
	
	<label for="name1">Edad</label>
	<input type="text" class="form-control" id="name1" name="txt_EdadCliente" maxlength='2' minlength="2" placeholder="Edad"  onkeypress="return valida(event)" >

	<label for="txt_SexoCliente">Sexo</label>
	<select id= "txt_SexoCliente" name="txt_SexoCliente" class="form-control">    <option value="">--- Selecciona la opción ---</option>
	<option value="MASCULINO">MASCULINO</option>
	<option value="FEMENINO">FEMENINO</option>
	<option value="OTRO">OTRO</option>
	</select> 

	<label for="txt_SexoCliente">Estado Civil</label>
	<select id= "txt_estadociv" name="txt_estadociv" class="form-control">
	<option value="">--- Selecciona la opción ---</option>
	<option value="SOLTERO">SOLTERO</option>
	<option value="CASADO">CASADO</option>
	<option value="DIVORCIADO">DIVORCIADO</option>
	</select> 

	<label for="name1">Ocupación</label>
	<input type="text" class="form-control" id="name1" name="txt_ocupacion" maxlength='35' placeholder="Ocupación"  onkeypress="return validaLetra(event)">

	<label for="txt_SexoCliente">Medio por el cual se enteró</label>
	<select id= "txt_medio" name="txt_medio" class="form-control">
	<option value="">--- Selecciona la opción ---</option>
	<option value="FACEBOOK">FACEBOOK</option>
	<option value="RADIO">RADIO</option>
	<option value="PÁGINA WEB">PÁGINA WEB</option>
	<option value="VOLANTE">VOLANTE</option>
	<option value="OTRO">OTRO</option>
	</select> 

	<label for="name1" >Franquicia  </label>
	<select class="form-control" name="txt_franquicia" id="txt_franquicia" required="">
	<option value="">--- Selecciona la opción ---</option>
	<?php foreach ($ReFranquicia as $i => $franquicia)    
	echo '<option value="',$i,'">',$franquicia,'</option>'; ?> </select>

	<label for="name1">Recomendado por:</label>
	<input type="text" class="form-control" id="name1" name="txt_recomendado" maxlength='45' placeholder="Recomendado por:"  >

	<label >Autoriza usar datos</label></br>
	<label for="name1" >Si &nbsp;&nbsp;&nbsp;</label><input type="radio" name="Autoriza" class="form-check-input" value="Si" required="" >
	<label for="name1" >No &nbsp;&nbsp;&nbsp;</label><input type="radio" name="Autoriza" class="form-check-input" value="No" >
	</select> 

 </div>
  </div>
	</div>
  </div>

	<!-- Guarda todos los datos del cliente -->
  <button type="submit" class="btn btn-primary">Guardar</button>
	<!-- Regresa a la vista principal de clietes -->
  <a href="<?php echo base_url();?>clientes/administrador/clienteA"><button type="button" class="btn btn-danger" >Cancelar</button></a>

<br>
<br>
<br>


</form>
</div>
</div>
</form>
</div>
</div>

