<?php $form=$this->beginWidget('bootstrap.widgets.TbActiveForm',array(
	'id'=>'modo-migracion-form',
	'enableAjaxValidation'=>false,
    
)); ?>

<br>
<?php
    $this->widget('bootstrap.widgets.TbAlert', array(
    'block' => true, // display a larger alert block?
    'fade' => true, // use transitions?
    'closeText' => '×', // close link text - if set to false, no close link is displayed
    'alerts' => array(// configurations per alert type
        'success' => array('block' => true, 'fade' => true, 'close' => '×'), // success, info, warning, error or danger
        'warning' => array('block' => true, 'fade' => true, 'close' => '×'), // success, info, warning, error or danger
    ),
));
?>
	<?php echo $form->errorSummary($model); ?>

        <h3>Activar Modo Migración</h3>
        <div class="row-fluid">
        <div class="row-fluid span3">
	</div>
        <div class="row-fluid span3">
        <?php echo $form->checkBoxRow($model,'estatus'); ?>
	</div>
        <div class="row-fluid span3">
        <?php //echo $form->textFieldRow($model,'fecha_corte'); ?>
            <?php
     if ($model->fecha_corte!='') {       
      $model->fecha_corte=date('d-m-Y',strtotime($model->fecha_corte));
      }
      $this->widget('zii.widgets.jui.CJuiDatePicker', array(
              'model'=>$model,
              'attribute'=>'fecha_corte',
              'value'=>$model->fecha_corte,
              'language' => 'es',
              'htmlOptions' => array('readonly'=>"readonly"),
                //additional javascript options for the date picker plugin
              'options'=>array(
                      'autoSize'=>true,
                      'defaultDate'=>$model->fecha_corte,
          //'dateFormat'=>'yy-m-d',
          'dateFormat'=>'dd-mm-yy',
          'buttonImage'=>Yii::app()->baseUrl.'/images/calendar.png',
                      'buttonImageOnly'=>true,
                      'buttonText'=>'Fecha',
                      'selectOtherMonths'=>true,
                      'showAnim'=>'slide',
                      'showButtonPanel'=>true,
                      'showOn'=>'button',
                      'showOtherMonths'=>true,
               'changeMonth' => 'true',
                  'changeYear' => 'true',
                  ),
      )); ?>
	</div>
	</div>
        </fieldset>
	<div class="form-actions" align="center">
		<?php $this->widget('bootstrap.widgets.TbButton', array(
			'buttonType'=>'submit',
			'type'=>'primary',
			'label'=>$model->isNewRecord ? 'Create' : 'Guardar',
		)); ?>
	</div>

<?php $this->endWidget(); ?>
