<?php

$this->PageTitle = false;

$this->renderPartial('/contratos/_menu', array('model' => $model));

?>
<h1>
    <?php
        echo "{$model->getTipoDocumento()} - {$model->COT_IDCONTRATO} &raquo;
              {$model->COT_CLI_NOME} &raquo; Trocar status faturamento";
    ?>
</h1>
<div class="form">
<?php $form = $this->beginWidget('GxActiveForm', array('id' => 'acessos-form', 'enableAjaxValidation' => false)); ?>

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

    <div class="row">
        <?php echo $form->labelEx($model, 'COT_FATURAMENTO', array('required' => true)); ?>
        <?php echo $form->dropDownList($model, 'COT_FATURAMENTO',
                                        array(0 => 'Não faturar',
                                              1 => 'Faturar',
                                              2 => 'Faturado',
                                              3 => 'Fechado'),
                                        array('prompt' => 'Selecione')); ?>
        <?php echo $form->error($model, 'COT_FATURAMENTO'); ?>
    </div>

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

    <div class="row">
        <?php echo $form->labelEx($atividade, 'ATD_OBS', array('required' => true, 'label' => 'Observação (mín 5 caracteres)')); ?>
        <?php echo $form->textArea($atividade, 'ATD_OBS'); ?>
        <?php echo $form->error($atividade, 'ATD_OBS'); ?>
    </div>

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

<?php
Yii::app()->clientScript->registerScript('observacoes_obrigatorio',
    $this->renderPartial('_script_observacoes_obrigatorio', array('idFaturamento' => 'Contratos_COT_FATURAMENTO'), true)
);
