<?php
/* @var $this PagosController */
/* @var $model Pagos */
/* @var $form CActiveForm */
?>
 <div class="row justify-content-center  mb-3">
  <fieldset class="col-12 col-sm-12 col-md-12 px-3">
    <legend><i class="fa fa-search  lg"></i> Buscar </legend>


<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'action'=>Yii::app()->createUrl($this->route),
	'method'=>'get',
      'htmlOptions' => array(
                'class' => 'form-horizontal mt-3 '
         )
)); ?>
    

   <div class="row ">
                 <div class="col-12 col-sm-12 col-md-3 col-lg-3 col-xl-3  ">
                   <div class="form-group ">
                     <?php echo $form->labelEx($model, 'fecha_desde', array('class' => 'col-12 mdi mdi-calendar-blank mdi-18px')); ?>
                     
                       <div class="col-12">
                     <?php echo $form->hiddenField($model,'borrado',array('size'=>60, 'value'=>'0' , 'maxlength'=>100)); ?>
       
                        <?php
                        $this->widget('ext.YiiDateTimePicker.jqueryDateTime', array(
                            'model' => $model,
                            'attribute' => 'fecha_desde',
                            'options' => array(
                                'lang'=>'es',
                                'timepicker'=>false,
                                'format'=>'Y-m-d'),
                                'htmlOptions' => array('class' => 'form-control form-control-line',
                                'placeholder'=>"aaaa-mm-dd",
                                'autocomplete'=>"off",
                                ),
                        ));
                        
                        ?>
                  
                     </div>
                 </div>
                    </div>
            
                 <div class="col-12 col-sm-12 col-md-3 col-lg-3 col-xl-3 ">
                             <div class="form-group ">
                     <?php echo $form->labelEx($model, 'fecha_hasta', array('class' => 'col-md-12 mdi mdi-calendar-blank mdi-18px')); ?>
                     <div class="col-12">

                        <?php
                        $this->widget('ext.YiiDateTimePicker.jqueryDateTime', array(
                            'model' => $model,
                            'attribute' => 'fecha_hasta',
                            'options' => array(
                                'lang'=>'es',
                                'timepicker'=>false,
                                'format'=>'Y-m-d'),
                                'htmlOptions' => array('class' => 'form-control form-control-line',
                                'placeholder'=>"aaaa-mm-dd",
                                'autocomplete'=>"off",
                                ),
                        ));
                        
                        ?>
                
                     </div>
                 </div>
                    </div>
       
                  <div class="col-12 col-sm-12 col-md-3 col-lg-3 col-xl-3 ">
                        <div class="form-group">
                           <?php echo $form->labelEx($model,'id_gestor', array('class' => 'col-12 text-uppercase mdi mdi-face-outline mdi-18px')); ?>
                           <div class="col-12">
                           <?php        
                            if(!empty($_SESSION['perfil'])and !empty($_SESSION['gestor'])  ){
                           echo $form->dropdownList($model,'id_gestor', Gestor::lista(),  array('class'=>'form-control form-control-line text-uppercase',
                  

                               )); 
                           }else{
                           echo $form->dropdownList($model,'id_gestor', Gestor::lista(),  array('class'=>'form-control form-control-line text-uppercase',
                  
                             'prompt' => 'TODOS LOS GESTORES'

                               )); 
                           }
                           ?>
                           
             
            
                          </div>
                        </div>
                  </div>
            
        
       
       
        <div class="col-12 col-sm-12 col-md-3 col-lg-3 col-xl-3">
                        <div class="form-group">
                           <?php echo $form->labelEx($model,'estatus', array('class' => 'col-12 text-uppercase mdi mdi-face-outline mdi-18px')); ?>
                           <div class="col-12">
                           <?php echo $form->dropdownList($model,'estatus',Prestamo::listaEstatus(),  array('class'=>'form-control form-control-line text-uppercase',
                               'prompt' => 'ESTATUS')); ?> 
            
                          </div>
                        </div>
                  </div>
       
       
           <div class="col-12 col-sm-12 col-md-3 col-lg-3 col-xl-3 mt-2  ">
            
                  <?php echo CHtml::submitButton('BUSCAR ',array('class'=>'btn btn-block btn-primary fa fa-search  font-weight-medium mt-3')); ?>
              
        </div> 
       
        </div>
    


<?php $this->endWidget(); ?>


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