<commit_before><?php  $atr_label = array('class' => 'col-sm-4 control-label'); ?>

<div class="row"> 
<div class="col-xs-12"> 
  <h5><strong> NUEVA SOLICITUD </strong></h5>
</div>
</div>

<div class="row"> 
<div class="col-xs-12">
  <?php $attributes = array('class' => 'form-horizontal', 'role'=>'form', 'id' => 'form_request'); ?>
  <?php echo form_open('', $attributes); ?>

  <div class="panel panel-default">
  <div class="panel-heading"><i class="fa fa-pencil-square-o" aria-hidden="true"></i> Datos de la solicitud </div>
  <div class="panel-body">
    <div class="row">
      <div class="col-xs-6">
        <div class="form-group form-group-sm">
          <?=form_label('<small> Tipo solicitud </small>', 'tipo_doc', $atr_label); ?>
          <div class="col-sm-8">
          <?php
            $options = array();
            foreach ($request_types as $key => $value):
              $options[$request_types[$key]->id] = $request_types[$key]->detail;
            endforeach;
          ?>
          <?=form_dropdown('request_types', $options, '', 'class="form-control" id="request_types"'); ?>
          </div>
        </div>
        <div class="form-group form-group-sm">
          <?=form_label('<small> Fecha desde </small>', 'date_from', $atr_label); ?>
          <div class="col-sm-8">
            <div class='input-group date' id='date_from'>
              <input type='text' id="value_date_from" name="value_date_from" class="form-control"/>
              <span class="input-group-addon"><span class="glyphicon glyphicon-calendar"></span>
              </span>
            </div>
          </div>
        </div>
        <div class="form-group form-group-sm">          
          <?=form_label('<small> Fecha hasta </small>', 'date_end', $atr_label); ?>
          <div class="col-sm-8">
            <div class='input-group date' id='date_end'>
              <input type='text' id="value_date_end" name="value_date_from" class="form-control"/>
              <span class="input-group-addon"><span class="glyphicon glyphicon-calendar"></span>
              </span>
            </div>
          </div>
        </div>        
      </div>
      <div class="col-xs-6">
        <div class="form-group form-group-sm">          
          <?=form_label('<small> Certificado </small>', 'certificate', $atr_label); ?>
          <div class="col-sm-8">
            <input type='file' id="certificate" name="file-es[]" class="form-control" data-preview-file-type="text"/>
          </div>
        </div>
        <div class="form-group form-group-sm">          
          <?=form_label('<small> Comentarios </small>', 'certificate', $atr_label); ?>
          <div class="col-sm-8">
            <?=form_textarea('comments', set_value(''), 'class="form-control" style="height:77px;" id="comments"');?>  
          </div>
        </div>
        
      </div>
    </div>      
  </div>
  </div>

  <div class="row"> 
  <div class="col-xs-12">
    <?php $attributes = array('name' => 'accept', 'id' => 'accept', 'type' => 'button', 'class' => 'btn btn-success', 'content' => '<span class="glyphicon glyphicon-ok"></span> Aceptar', 'onClick' => '', 'title' => 'Aceptar');?>
    <?=form_button($attributes);?>
    <a href="<?php echo base_url();?>request" title="Cancelar"><button type="button" class="btn btn-danger"><i class="glyphicon glyphicon-remove"></i> Cancelar</button></a>
  </div>
  </div>
  <?=form_close(); ?>
</div>
</div>

<!-- Modal para el alta de paciente -->
<a data-toggle="modal" href="#modal_insert" id="modal_insert_click" style="display: none"></a>
<div class="modal fade" id="modal_insert" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true" id="close_modal_insert">&times;</button>
        <h5 class="modal-title">Enviando la nueva solicitud, espere por favor...</h5>
      </div>
      <div class="modal-body">
        <img src="<?php echo base_url()?>images/loading.gif" class="img-responsive center-block" alt="Procesando ...">
      </div>        
    </div><!-- /.modal-content -->
  </div><!-- /.modal-dialog -->
</div><!-- /.modal -->

<!-- recuperamos los datos del paciente si es que existe -->
<script type="text/javascript">  
  $(document).ready(function(){
   change_class('request', 'active');
   change_class('start', '');
   change_class('contact', '');

   $("#certificate").fileinput({showPreview: false, showUpload: false, showCaption: true, overwriteInitial: false, language: 'es', browseClass: "btn btn-primary btn-sm", removeClass: "btn btn-danger btn-sm" , allowedFileExtensions: ['jpg', 'png','gif']});
   
   $('#date_from, #date_end').datepicker({
     format: 'dd/mm/yyyy',     
     language: 'es',            
     autoclose: true     
   });

   var date = new Date();
   var str_date =  date.getDate() + "/" + (date.getMonth()+1) + "/" + date.getFullYear();

   $('#value_date_from, #value_date_end').val(str_date);

   $( "input" ).keypress(function( event ) {
     if ( event.which == 13 ) {
       event.preventDefault();
     }      
   });
  });
</script><commit_msg>change del type request<commit_after><?php  $atr_label = array('class' => 'col-sm-4 control-label'); ?>

<div class="row"> 
<div class="col-xs-12"> 
  <h5><strong> NUEVA SOLICITUD </strong></h5>
</div>
</div>

<div class="row"> 
<div class="col-xs-12">
  <?php $attributes = array('class' => 'form-horizontal', 'role'=>'form', 'id' => 'form_request'); ?>
  <?php echo form_open('', $attributes); ?>

  <div class="panel panel-default">
  <div class="panel-heading"><i class="fa fa-pencil-square-o" aria-hidden="true"></i> Datos de la solicitud </div>
  <div class="panel-body">
    <div class="row">
      <div class="col-xs-6">
        <div class="form-group form-group-sm">
          <?=form_label('<small> Tipo solicitud </small>', 'request_types', $atr_label); ?>
          <div class="col-sm-8">
          <?php
            $options = array();
            foreach ($request_types as $key => $value):
              $options[$request_types[$key]->id] = $request_types[$key]->detail;
            endforeach;
          ?>
          <?=form_dropdown('request_types', $options, '', 'class="form-control" id="request_types"'); ?>
          </div>
        </div>
        <div class="form-group form-group-sm" id="form_group_date_from">
          <?=form_label('<small> Fecha desde </small>', 'date_from', $atr_label); ?>
          <div class="col-sm-8">
            <div class='input-group date' id='date_from'>
              <input type='text' id="value_date_from" name="value_date_from" class="form-control"/>
              <span class="input-group-addon"><span class="glyphicon glyphicon-calendar"></span>
              </span>
            </div>
          </div>
        </div>
        <div class="form-group form-group-sm" id="form_group_date_end">
          <?=form_label('<small> Fecha hasta </small>', 'date_end', $atr_label); ?>
          <div class="col-sm-8">
            <div class='input-group date' id='date_end'>
              <input type='text' id="value_date_end" name="value_date_end" class="form-control"/>
              <span class="input-group-addon"><span class="glyphicon glyphicon-calendar"></span>
              </span>
            </div>
          </div>
        </div>        
      </div>
      <div class="col-xs-6">
        <div class="form-group form-group-sm">          
          <?=form_label('<small> Certificado </small>', 'certificate', $atr_label); ?>
          <div class="col-sm-8">
            <input type='file' id="certificate" name="file-es[]" class="form-control" data-preview-file-type="text"/>
          </div>
        </div>
        <div class="form-group form-group-sm">          
          <?=form_label('<small> Comentarios </small>', 'certificate', $atr_label); ?>
          <div class="col-sm-8">
            <?=form_textarea('comments', set_value(''), 'class="form-control" style="height:77px;" id="comments"');?>  
          </div>
        </div>
        
      </div>
    </div>      
  </div>
  </div>

  <div class="row"> 
  <div class="col-xs-12">
    <?php $attributes = array('name' => 'accept', 'id' => 'accept', 'type' => 'button', 'class' => 'btn btn-success', 'content' => '<span class="glyphicon glyphicon-ok"></span> Aceptar', 'onClick' => '', 'title' => 'Aceptar');?>
    <?=form_button($attributes);?>
    <a href="<?php echo base_url();?>request" title="Cancelar"><button type="button" class="btn btn-danger"><i class="glyphicon glyphicon-remove"></i> Cancelar</button></a>
  </div>
  </div>
  <?=form_close(); ?>
</div>
</div>

<!-- Modal para el alta de paciente -->
<a data-toggle="modal" href="#modal_insert" id="modal_insert_click" style="display: none"></a>
<div class="modal fade" id="modal_insert" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true" id="close_modal_insert">&times;</button>
        <h5 class="modal-title">Enviando la nueva solicitud, espere por favor...</h5>
      </div>
      <div class="modal-body">
        <img src="<?php echo base_url()?>images/loading.gif" class="img-responsive center-block" alt="Procesando ...">
      </div>        
    </div><!-- /.modal-content -->
  </div><!-- /.modal-dialog -->
</div><!-- /.modal -->

<!-- recuperamos los datos del paciente si es que existe -->
<script type="text/javascript">  
  $(document).ready(function(){
   change_class('request', 'active');
   change_class('start', '');
   change_class('contact', '');

   $('#form_group_date_from').hide();
   $('#form_group_date_end').hide();

   $("#certificate").fileinput({showPreview: false, showUpload: false, showCaption: true, overwriteInitial: false, language: 'es', browseClass: "btn btn-primary btn-sm", removeClass: "btn btn-danger btn-sm" , allowedFileExtensions: ['jpg', 'png','gif']});
   
   $('#date_from, #date_end').datepicker({
     format: 'dd/mm/yyyy',     
     language: 'es',            
     autoclose: true     
   });

   var date = new Date();
   var str_date =  date.getDate() + "/" + (date.getMonth()+1) + "/" + date.getFullYear();
   $('#value_date_from, #value_date_end').val(str_date);

   $( "input" ).keypress(function( event ) {
     if ( event.which == 13 ) {
       event.preventDefault();
     }      
   });

   $( "#request_types" ).change(function() {
     var value = $('#request_types').val();
     if (value == 1) {
       $('#form_group_date_from').hide('slow');
       $('#form_group_date_end').hide('slow');
     } else {
       $('#form_group_date_from').show('slow');
       $('#form_group_date_end').show('slow');
     }

   });

  });
</script>
{'fraction_non_alphanumeric': 0.2112159809401631, 'fraction_numerical': 0.004490057729313663, 'mean_word_length': 2.8798435833629576, 'pattern_counts': {'":': 0, '<': 249, '<?xml version=': 0, '>': 277, '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': '3622754', 'n_tokens_mistral': 3563, 'n_tokens_neox': 3528, 'n_words': 691}