<?php
$form = $this->beginWidget ( 'bootstrap.widgets.TbActiveForm', array (
    'id' => 'violation-code-form',
    'enableAjaxValidation' => false 
) );
/** @var TbActiveForm $form */
/** @var ViolationCode $model */

?>

<p class="help-block">
  Fields with <span class="required">*</span> are required.
</p>

<?php echo $form->errorSummary($model); ?>

	<?php echo $form->textFieldRow($model,'name',array('class'=>'span5','maxlength'=>255)); ?>

	<?php echo $form->dropDownListRow($model,'id_behavior',Behavior::getBehaviorList(), array('class'=>'span5')); ?>

	<?php echo $form->textAreaRow($model,'description',array('rows'=>6, 'cols'=>50, 'class'=>'span8')); ?>

	<?php echo $form->dropDownListRow($model,'has_goods',array(''=>t('Empty'),'0'=>t('No'),'1'=>t('Yes')),array('class'=>'span5')); ?>

<div class="form-actions">
		<?php
  
  $this->widget ( 'bootstrap.widgets.TbButton', array (
      'buttonType' => 'submit',
      'type' => 'primary',
      'label' => $model->isNewRecord ? 'Create' : 'Save' 
  ) );
  ?>
	</div>

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