<commit_before><?php


$title = 'Editar local';
$this->headTitle($title);
?>

<div class="span10">
<?php
$form = $this->form;
//$form->setAttribute('action', $this->url('usuario', array('action' => 'add')));

$form->setAttributes(array(
    'action' => $this->url.'/local/index/editarlocal?id='.$this->id,
    'method' => 'post',
    'in_id'   =>$this->id,
));
$form->prepare();



echo $this->form()->openTag($form);
?><h3><?php echo $this->escapeHtml($title); ?></h3>
<?php
echo $this->formHidden($form->get('in_id'));
?>
<?php
echo $this->formHidden($form->get('ta_restaurante_in_id'));
?>


<?php
echo $this->formHidden($form->get('h_pais'));
?>
<?php
echo $this->formHidden($form->get('h_departamento'));
?>
<?php
echo $this->formHidden($form->get('h_provincia'));
?>
<?php
echo $this->formHidden($form->get('h_distrito'));
?>


<h5><?php echo $this->id ;?></h5>

<div class="control-group "><?php echo $this->formRow($form->get('servicio'));?></div>

<div class="control-group "><?php echo $this->formRow($form->get('de_latitud'));?></div>
<div class="control-group "><?php echo $this->formRow($form->get('de_longitud'));?></div>
<div class="control-group "><?php echo $this->formRow($form->get('va_telefono'));?></div><?php?>
<div class="control-group "><?php echo $this->formRow($form->get('va_horario'));?></div ><?php?>
<div class="control-group "><?php echo $this->formRow($form->get('va_horario_opcional'));?></div ><?php?>
<div class="control-group "><?php echo $this->formRow($form->get('va_rango_precio'));?></div><?php?>
<div class="control-group "><?php echo $this->formRow($form->get('ta_dia_in_id'));?></div><?php?>
<div class="control-group">
	<label for="">Seleccione Servicio que ofrece</label>
	<label id="servicio_local"></label>
</div>

<div class="control-group "><?php echo $this->formRow($form->get('pais'));?></div><?php?>
<div class="control-group "><?php echo $this->formRow($form->get('departamento'));?></div><?php?>
<div class="control-group "><?php echo $this->formRow($form->get('provincia'));?></div><?php?>
<div class="control-group "><?php echo $this->formRow($form->get('distrito'));?></div><?php?>

<div class="control-group "><?php echo $this->formRow($form->get('va_direccion'));?></div><?php?>
<div class="control-group span12">
                              <label>Encontrar latitud y longitud</label>
                              <div><input type="text" maxlength="100" id="address" class="span10"/> <input type="button" class="btn btn-info" id="search" value="Buscar" /></div><br/>
                              <div id='map_canvas' style="height:200px;"></div>                           
                             </div>
<div class="control-group "><?php echo $this->formSubmit($form->get('submit'));?></div><?php
echo $this->form()->closeTag();?> </div> 
</div>
<script>
	$(document).ready(function(){
		var id_r = $('h5').text();
      $('#ta_restaurante_in_id').val(id_r);
       var pais=parseInt($('#pais').val());
      $.getJSON('/local/index/jsondepartamento',function(data){
          if(pais==1){
             $.each(data,function(i,val){
              $("#departamento").empty();  
              $("#departamento").append("<option value=''>"+ val.ch_provincia +"</option>");  
                $('#departamento').append( "<option value=" + val.in_iddep + " >" + val.ch_departamento + " </option>");                    
          });          
          }
      });
    var depa=parseInt($('#h_departamento').val());
    var url="/local/index/jsonprovincia?iddepa=" + depa;
     console.log(depa);
          $.getJSON(url,function(data){
                  
                $.each(data,function(i,val){ 
                $("#provincia").empty();  
                $("#provincia").append("<option value=''>"+ val.ch_provincia +"</option>");        
                    $('#provincia').append( "<option value=" + val.in_idprov + " >" + val.ch_provincia + " </option>");                                
                          });  
         });



	})<commit_msg>combo<commit_after><?php


$title = 'Editar local';
$this->headTitle($title);
?>

<div class="span10">
<?php
$form = $this->form;
//$form->setAttribute('action', $this->url('usuario', array('action' => 'add')));

$form->setAttributes(array(
    'action' => $this->url.'/local/index/editarlocal?id='.$this->id,
    'method' => 'post',
    'in_id'   =>$this->id,
));
$form->prepare();



echo $this->form()->openTag($form);
?><h3><?php echo $this->escapeHtml($title); ?></h3>
<?php
echo $this->formHidden($form->get('in_id'));
?>
<?php
echo $this->formHidden($form->get('ta_restaurante_in_id'));
?>


<?php
echo $this->formHidden($form->get('h_pais'));
?>
<?php
echo $this->formHidden($form->get('h_departamento'));
?>
<?php
echo $this->formHidden($form->get('h_provincia'));
?>
<?php
echo $this->formHidden($form->get('h_distrito'));
?>


<h5><?php echo $this->id ;?></h5>

<div class="control-group "><?php echo $this->formRow($form->get('servicio'));?></div>

<div class="control-group "><?php echo $this->formRow($form->get('de_latitud'));?></div>
<div class="control-group "><?php echo $this->formRow($form->get('de_longitud'));?></div>
<div class="control-group "><?php echo $this->formRow($form->get('va_telefono'));?></div><?php?>
<div class="control-group "><?php echo $this->formRow($form->get('va_horario'));?></div ><?php?>
<div class="control-group "><?php echo $this->formRow($form->get('va_horario_opcional'));?></div ><?php?>
<div class="control-group "><?php echo $this->formRow($form->get('va_rango_precio'));?></div><?php?>
<div class="control-group "><?php echo $this->formRow($form->get('ta_dia_in_id'));?></div><?php?>
<div class="control-group">
	<label for="">Seleccione Servicio que ofrece</label>
	<label id="servicio_local"></label>
</div>

<div class="control-group "><?php echo $this->formRow($form->get('pais'));?></div><?php?>
<div class="control-group "><?php echo $this->formRow($form->get('departamento'));?></div><?php?>
<div class="control-group "><?php echo $this->formRow($form->get('provincia'));?></div><?php?>
<div class="control-group "><?php echo $this->formRow($form->get('distrito'));?></div><?php?>

<div class="control-group "><?php echo $this->formRow($form->get('va_direccion'));?></div><?php?>
<div class="control-group span12">
                              <label>Encontrar latitud y longitud</label>
                              <div><input type="text" maxlength="100" id="address" class="span10"/> <input type="button" class="btn btn-info" id="search" value="Buscar" /></div><br/>
                              <div id='map_canvas' style="height:200px;"></div>                           
                             </div>
<div class="control-group "><?php echo $this->formSubmit($form->get('submit'));?></div><?php
echo $this->form()->closeTag();?> </div> 
</div>
<script>
	$(document).ready(function(){
		  var id_r = $('h5').text();
      $('#ta_restaurante_in_id').val(id_r);
       var pais=parseInt($('#pais').val());
      $.getJSON('/local/index/jsondepartamento',function(data){
          if(pais==1){
             $("#departamento").empty(); 
             $.each(data,function(i,val){              
              $("#departamento").append("<option value=''>"+ val.ch_departamento +"</option>");  
                $('#departamento').append( "<option value=" + val.in_iddep + " >" + val.ch_departamento + " </option>");                    
          });          
          }
      });
    var depa=parseInt($('#h_departamento').val());
    var url="/local/index/jsonprovincia?iddepa=" + depa;
     console.log(depa);
          $.getJSON(url,function(data){
                  $("#provincia").empty();  
                $.each(data,function(i,val){ 
                
                $("#provincia").append("<option value=''>"+ val.ch_provincia +"</option>");        
                    $('#provincia').append( "<option value=" + val.in_idprov + " >" + val.ch_provincia + " </option>");                                
                          });  
         });



	})
{'fraction_non_alphanumeric': 0.25282503414876445, 'fraction_numerical': 0.004470383707934931, 'mean_word_length': 3.4669994453688298, 'pattern_counts': {'":': 0, '<': 195, '<?xml version=': 0, '>': 313, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '406883', 'n_tokens_mistral': 2703, 'n_tokens_neox': 2719, 'n_words': 400}