<?php
if (!$model->isAllowed()) {
  User::blockAction('Este cliente não pertence a sua região ou Unidade de Negócios');
}

$this->pageTitle = 'Prospectos / Clientes &raquo; Update datas &raquo; ' . $model->CLI_NOME;

Yii::app()->clientScript->registerScript('submit', '
$(document).ready( function() {
   $("#submit_button").click(function() {
      $(this).prop("disabled",true)
         .parents("form").submit();
      });
})
');

?>

<div class="form">

    <?php
    $form = $this->beginWidget('GxActiveForm', array(
        'id' => 'clientes-form',
        'enableAjaxValidation' => false,
        'focus' => array($model, 'CLI_SITUACAO'),
    ));
    ?>

    <?php echo FaHtml::getFormInfo($form, $model); ?>

    <div class="row">
      <?php echo $form->labelEx($model,'CLI_DTATIVACAO'); ?>
      <?php $form->widget('ext.Utils.widgets.CrmDatePicker', array('model' => $model, 'attribute' => 'CLI_DTATIVACAO')); ?>
      <?php echo $form->error($model,'CLI_DTATIVACAO'); ?>
    </div><!-- row -->

    <div class="row">
      <?php echo $form->labelEx($model,'CLI_DTCONTRATO'); ?>
      <?php $form->widget('ext.Utils.widgets.CrmDatePicker', array('model' => $model, 'attribute' => 'CLI_DTCONTRATO')); ?>
      <?php echo $form->error($model,'CLI_DTCONTRATO'); ?>
    </div><!-- row -->

    <?php
    echo FaHtml::saveButton();
    $this->endWidget();
    ?>
</div>