
<div class="form">
  <?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'pagos-form',
        'htmlOptions'=>array('class'=>'form-horizontal'),
        'enableClientValidation' => true,
        'clientOptions'=>array(
        'validateOnSubmit'=>true,
  ),
      
)); ?>
    
	<div class="row">
            <div class="col-12">
                <p class="note">Los campos con <span class="required">*</span> son obligatorios.</p>
            </div> 
        </div>
    <?php echo $form->hiddenField($model,'id_gestor',array('size'=>60,'maxlength'=>100,
                               'class' => 'form-control form-control-line text-uppercase', 'readonly'=>'true',
                               'placeholder'=>"")); ?>
         <div class="row">
                <div class="col-12">
                        <div class="form-group">
                           <?php echo $form->labelEx($model,'id_prestamo', array('class' => 'col-12')); ?>
                            
                            <div class="col-12">
                  
                                <?php 
                               $this->widget('ext.select2.ESelect2',array(
                                 'model' => $model,
                                 'attribute' => 'id_prestamo',  
                                 'data'=> Prestamo::listaPagos(),
                                 'options'=>array(
                                   'allowClear'=>true,
                                   'placeholder'=>'SELECCIONE EL PRESTAMO',
                                 ),
                               ));
                               ?> 
                           <?php echo $form->error($model,'id_prestamo'); ?>
                          </div>
                        </div>
                </div>
            <div class="col-12 col-sm-12 col-md-5"></div>
          </div>  
            
    
    
    
     <?php
        if(!empty($_SESSION['id_perfil']) and ($_SESSION['id_perfil']=='1') 
             and (Yii::app()->user->name==='antonio' )){
    ?>  
    
    <div class="row">
          <div class="col-12 col-sm-12 col-md-4 ">
             <div class="form-group">
		<?php echo $form->labelEx($model,'fecha',array('class' => 'col-12 text-uppercase')); ?>
		<div class="col-12">
                <?php
                        $this->widget('ext.YiiDateTimePicker.jqueryDateTime', array(
                            'model' => $model,
                            'attribute' => 'fecha',
                            'options' => array(
                                'lang'=>'es',
                                'timepicker'=>false,
                                'format'=>'d-m-Y',
                                ),
                            'htmlOptions' => array(
                                'class' => 'form-control form-control-line',
                                'placeholder'=>"dd-mm-aaaa",
                                'autocomplete'=>"off"
                                ),
                        ));
                        ?>
                 <?php echo $form->error($model,'fecha'); ?>
	       </div>
             </div>
        </div>
        
        
                <div class="col-12 col-sm-12 col-md-4">
                    <div class="form-group">
                       <?php echo $form->labelEx($model,'hora', array('class' => 'col-12 text-uppercase')); ?>
                       <div class="col-12">
                        <?php echo $form->textField($model,'hora',array('size'=>60,'maxlength'=>100,
                               'class' => 'form-control form-control-line text-uppercase', 
                               'placeholder'=>"00:00:00",
                            
                             'autocomplete'=>"off"
                            )); ?>
                        <?php echo $form->error($model,'hora'); ?>
                      </div>
                    </div>
               </div>
        
    </div>
    
    <?php    
        }  
    ?>
    
    
    
    
    
    
    
    
    <div class="row">
               
   
     
     
                <div class="col-12 col-sm-12 col-md-4">
                        <div class="form-group">
                          <?php echo $form->labelEx($model,'cuota', array('class' => 'col-12 mdi mdi-mail mdi-18px')); ?>
                           <div class="col-12">
                           <?php echo $form->textField($model,'cuota',array('size'=>60,'maxlength'=>100,
                                   'class' => 'form-control form-control-line text-uppercase', 
                                   'placeholder'=>"")); ?>
                            <?php echo $form->error($model,'cuota'); ?>
                          </div>
                        </div>
                </div>
        <div class="col-12 col-sm-12 col-md-4">
                        <div class="form-group">
                           <?php echo $form->labelEx($model,'mora', array('class' => 'col-12')); ?>
                           <div class="col-12">
                           <?php echo $form->textField($model,'mora',array('size'=>60,'maxlength'=>100,
                               'class' => 'form-control form-control-line','autocomplete' => 'off' )); ?>
                           <?php echo $form->error($model,'mora'); ?>
                          </div>
                        </div>
                </div>
           
            </div>
        
        <div class="row justify-content-center">
          
          
            
                 <div class="col-12 col-sm-12 col-md-4">
                        <div class="form-group">
                           <?php echo $form->labelEx($model,'combustible', array('class' => 'col-12')); ?>
                           <div class="col-12">
                           <?php echo $form->textField($model,'combustible',array('size'=>60,'maxlength'=>100,
                               'class' => 'form-control form-control-line','autocomplete' => 'off' )); ?>
                           <?php echo $form->error($model,'combustible'); ?>
                          </div>
                        </div>
                </div>
         <div class="col-12 col-sm-12 col-md-8">
                        <div class="form-group">
                           <?php echo $form->labelEx($model,'observacion', array('class' => 'col-12')); ?>
                           <div class="col-12">
                           <?php echo $form->textField($model,'observacion',array('size'=>60,'maxlength'=>100,
                               'class' => 'form-control form-control-line text-uppercase','autocomplete' => 'off', )); ?>
                           <?php echo $form->error($model,'observacion'); ?>
                          </div>
                        </div>
                </div>
            
        </div>

    
      <div class="row justify-content-center" >
                <div class="col-12 col-sm-12 col-md-4 col-lg-4 col-xl-4 m-b-40 m-t-20">
                       <button type="submit" class="btn btn-large btn-block btn-primary  ">
                               <i class="fas fa-save fa-lg   "></i>    <?php echo $model->isNewRecord ? "REGISTRAR PAGO" : "EDITAR"; ?></button>
                </div> 
            </div>
               
            <div class="row justify-content-center">
                <div class="col-12 col-sm-12 col-md-8 col-lg-8 col-xl-8">
                <?php echo $form->errorSummary($model); ?>
                </div>
            </div>
    
    
<?php $this->endWidget(); ?>
</div><!-- form -->



<script type="application/javascript">
    

$(document).ready(function() {
    $('#Pagos_hora').mask('00:00:00');
 }); 


</script>



