<div class="wide form">

	<?php $form = $this->beginWidget('GxActiveForm', array(
		'action' => Yii::app()->createUrl($this->route),
		'method' => 'get',
	)); ?>
	<?php if (User::getUser()->FUN_TBL_RDM == 1) { ?>
		<div class="row">
			<?php echo $form->label($model, 'RDM_IDREVENDA'); ?>
			<?php echo $form->dropDownList($model, 'RDM_IDREVENDA', GxHtml::listDataEx(Revendas::model()->findAll("REV_SITUACAO = 'A' order by REV_NOME")), array('prompt' => 'Todas')); ?>
		</div>

		<div class="row">
			<?php echo $form->label($model, 'RDM_IDRESPONSAVEL'); ?>
			<?php echo $form->dropDownList($model, 'RDM_IDRESPONSAVEL', GxHtml::listDataEx(Funcionarios::model()->findAll(array('order'=>'FUN_NOME'))), array('prompt' => 'Todos')); ?>
		</div>

		<div class="row">
			<?php echo $form->label($model, 'RDM_IDREVISADO'); ?>
			<?php echo $form->dropDownList($model, 'RDM_IDREVISADO', GxHtml::listDataEx(Funcionarios::model()->findAll(array('order'=>'FUN_NOME'))), array('prompt' => 'Todos')); ?>
		</div>
		
	<?php } ?>
	<div class="row">
		<?php echo $form->label($model, 'RDM_STATUS'); ?>
		<?php echo $form->dropDownList($model, 'RDM_STATUS', array('1' => 'Aguardando preenchimento', '2' => 'Aguardando validação', '3' => 'Rascunho', '4' => 'RDM invalidado', '5' => 'RDM validado'), array('prompt' => 'Todos'));  ?>
	</div>

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

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

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