<!DOCTYPE html>
<!-- Formulario para agregar servicio general (Franquiciatario) -->
<html>
<div id="page-content-wrapper">
<div class="page-content inset">
<div class="row">
<div class="col-md-8">


<head>
    <meta charset="utf-8">
    <link rel="stylesheet" href="<?php echo base_url().'assets/dist/js/jquery/jquery-ui.css'?>">
    <script type="text/javascript" src="<?php echo base_url()?>assets/dist/js/servicios.js"></script>
  <link rel="stylesheet" href="<?php echo base_url().'assets/dist/css/validacion.css'?>">
	<link rel="stylesheet" type="text/css" href='<?php echo base_url()?>assets/dist/css/styleTable.css' /> 
   <link rel="stylesheet" type="text/css" href='<?php echo base_url()?>assets/dist/css/table.css' />
   <link rel="stylesheet" href="<?php echo base_url().'assets/plugins/select/bootstrap-select.min.css'?>">
    <!-- Latest compiled and minified JavaScript -->
    <script src="<?php echo base_url().'assets/plugins/select/bootstrap-select.min.js'?>"></script>
  </head>

<body>
<form action="<?php echo base_url();?>servicios/Franquiciatario/serviciosGeneralesF/guardar" method="POST">
<center><h1>Agregar Servicio General</h1></center>


  <div class="form-group">

    <label for="name1" >Franquicia</label>
    <select id="f"  name="Franquicia" class="form-control"> <?php foreach ($ReFranquicia as $i => $Franquicia)    
    echo '<option value="',$i,'">',$Franquicia,'</option>'; ?> </select>
    </br>

    <div class="form-group">
          <label>Servicio</label>
              <input type="text" name="title" class="form-control" id="title" placeholder="SLIM-BODY ORGANIC"  >
    </div>

    <div class="form-group">
            <label>Modelo</label>
            <input type="text" name="Modelo" class="form-control" id="Modelo" placeholder="ORGANIC" readonly="">
    </div>


    <div class="form-group">
            <label>Tipo</label>
            <input type="text" name="TipoServicio" class="form-control" id="TipoServicio" placeholder="GENERAL" readonly="">
    </div>

  <div class="form-group">
            <label>Categoría</label>
            <input type="text" name="Categoria" class="form-control" id="Categoria" placeholder="CORPORAL" readonly="">
    </div>

 

  <label for="name1">Precio</label>
    <input type="text" class="form-control" name="Precios" id="Precios"  placeholder="$0000"  required="" onkeypress="return valida(event)" readonly=""> </br>
  <label for="name1">Descripción</label>
    <textarea class="form-control" rows="3" name="Descripcion" id="Descripcion"   readonly="" > </textarea>

  <label for="name1">Observaciones</label>
       <textarea class="form-control" rows="3" name="Observaciones"   readonly="" > </textarea>



  <label for="name1" placeholder="" readonly="" >Zona</label>
  <input type="text" class="form-control" name="Zona" id="Zona" placeholder="490"  required="" readonly="">
      </br>  



    <input type="submit" value="Agregar" class="btn btn-primary" ></button>
    <a href="<?php echo base_url();?>servicios/Franquiciatario/serviciosGeneralesF">
    <button type="button" class="btn btn-danger">Cancelar</button>
    <!-- Regresa a la pantalla principa de servicios generales -->
    <select id="f"   class="form-control" name="Usuario" readonly style="visibility:hidden;">
    <?php foreach ($ReUsuario as $i => $Usuario) echo '<option value="',$i,'">',$Usuario,'</option>'; ?> </select>
    <div class="form-group">

        <select id="f"   class="form-control" name="Zona" readonly style="visibility:hidden; >
    <?php foreach ($Zona1 as $i => $Zona) echo '<option value="',$i,'">',$Zona,'</option>'; ?> </select>

   <select id="f"   class="form-control" name="Modelo" readonly   style="visibility:hidden; >
      <?php foreach ($Modelo1 as $i => $Modelo) echo '<option value="',$i,'">',$Modelo,'</option>'; ?> </select>


            <input type="text" class="form-control" name="Servicios" id="Servicios" style="visibility:hidden;  required="">
        </div>

     <script src="<?php echo base_url().'assets/dist/js/jquery/jquery-3.3.1.js'?>" type="text/javascript"></script>
    <script src="<?php echo base_url().'assets/dist/js/jquery/jquery-ui.js'?>" type="text/javascript"></script>
    <script type="text/javascript">
        $(document).ready(function(){
 
            $('#title').autocomplete({
                source: "<?php echo site_url('servicios/Franquiciatario/serviciosGeneralesF/servicios');?>",
      
                select: function (event, ui) {
                    $('[name="title"]').val(ui.item.label); 
                    $('[name="TipoServicio"]').val(ui.item.TipoServicio);
                    $('[name="Modelo"]').val(ui.item.Modelo);
                    $('[name="Categoria"]').val(ui.item.Categoria);
                    $('[name="Precios"]').val(ui.item.Precios);
                    $('[name="Descripcion"]').val(ui.item.Descripcion); 
                    $('[name="Observaciones"]').val(ui.item.Observaciones);
                    $('[name="Zona"]').val(ui.item.Zona);
                    $('[name="Servicios"]').val(ui.item.Servicios);
                }
            });
 
        });
    </script>
      </a>
    </div>
  </form>
</body>
</div>
</head>
</div>
</div>
</div>
</html>



