<?php
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' => 'bairros-form',
	'enableAjaxValidation' => false,
    'focus'=>array($model,'BAI_DESCRICAO'),
));
?>
	<?php echo FaHtml::getFormInfo($form, $model); ?>

		<div class="row">
		<?php echo $form->labelEx($model,'BAI_DESCRICAO'); ?>
		<?php echo $form->textField($model, 'BAI_DESCRICAO', array('maxlength' => 50)); ?>
		<?php echo $form->error($model,'BAI_DESCRICAO'); ?>
		</div><!-- row -->
		<div class="row">
		<?php echo $form->labelEx($model,'BAI_IDCIDADE'); ?>
		<?php $data = GxHtml::listDataEx(Cidades::model()->findAll(array('order'=>'CID_DESCRICAO')), 'CID_IDCIDADE', 'CidadeEstado'); ?>
		<?php echo $form->dropDownList($model, 'BAI_IDCIDADE', $data, array('prompt'=>'Selecione')); ?>
		<?php echo $form->error($model,'BAI_IDCIDADE'); ?>
		</div><!-- row -->
<?php
echo FaHtml::saveButton();
$this->endWidget();
?>
</div><!-- form -->