<div class="wide form">

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

	<div class="row">
		<?php echo $form->label($model, 'REG_DESCRICAO'); ?>
		<?php echo $form->textField($model, 'REG_DESCRICAO', array('maxlength' => 50)); ?>
	</div>

	<div class="row">
		<?php echo $form->label($model, 'REG_IDREVENDA'); ?>
    	<?php
            $revendas = Revendas::model()->findAll(array('order' => 'REV_SITUACAO, REV_TIPO, REV_FANTASIA'));
            $revendas = CHtml::listData($revendas, 'REV_IDREVENDA', 'REV_FANTASIA', 'SituacaoPlural');
            echo $form->dropDownList($model, 'REG_IDREVENDA', $revendas, array('prompt' => 'Todas'));
        ?>
	</div>

	<div class="row">
		<?php echo $form->label($model, 'REG_SITUACAO'); ?>
        <?php echo $form->dropDownList($model, 'REG_SITUACAO', array('A' => 'Ativo','I' => 'Inativo'), array('prompt' => 'Todas')); ?>
	</div>

	<div class="row buttons">
		<?php echo FaHtml::searchButton(); ?>
	</div>

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

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