<div class="wide form">

    <?php
    $form = $this->beginWidget('GxActiveForm', array('action' => Yii::app()->createUrl($this->route),'method' => 'get'));

    $this->widget('application.extensions.EChosen.EChosen', array('target' => '.echosen','useJQuery' => true));
    if(empty($model->TOKEN)) {
        $model->TOKEN = Util::uid();
    }
    echo $form->hiddenField($model, 'TOKEN');
    ?>

    <div class="row">
        <?php echo $form->label($model, 'CLI_NOME'); ?>
        <?php
        $this->widget('ext.Utils.widgets.CrmAutoComplete', array(
            'model' => $model,
            'attribute' => 'CLI_NOME',
            'url' => 'autocomplete/clientes',
            'params' => array(
                'todos: true',
                'field: "CLI_NOME"'
                )
            )
        );
        ?>
    </div>

    <div class="row">
        <?php echo $form->label($model, 'CLI_CNPJCPF'); ?>
        <?php
        $this->widget('ext.Utils.widgets.CrmAutoComplete', array(
            'model' => $model,
            'attribute' => 'CLI_CNPJCPF',
            'url' => 'autocomplete/clientes',
            'params' => array(
                'todos: true',
                'field: "CLI_CNPJCPF"'
                ),
            'htmlOptions' => array(
                'maxlength' => '19',
                )
            )
        );
        ?>
    </div>

    <div class="row">
        <?php echo $form->label($model, 'CLI_FONE1'); ?>
        <?php
        $this->widget('ext.Utils.widgets.CrmAutoComplete', array(
            'model' => $model,
            'attribute' => 'CLI_FONE1',
            'url' => 'autocomplete/clientes',
            'params' => array(
                'todos: true',
                'field: "CLI_FONE1"'
                ),
            'htmlOptions' => array(
                'class' => 'mask_telefone_filtro',
                'maxlength' => '14',
                )
            )
        );
        ?>
    </div><!-- row -->

    <div class="row">
        <?php echo $form->label($model, 'CLI_EMAIL'); ?>
        <?php
        $this->widget('ext.Utils.widgets.CrmAutoComplete', array(
            'model' => $model,
            'attribute' => 'CLI_EMAIL',
            'url' => 'autocomplete/clientes',
            'params' => array(
                'todos: true',
                'field: "CLI_EMAIL"'
                )
            )
        );
        ?>
    </div>

    <div class="row buttons">
        <input type="hidden" name="busca_telefonista" value="1" />
        <?php echo FaHtml::searchButton(); ?>
    </div>

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

</div><!-- search-form -->