<?php 

$gates = Gate::getGateList();
$behaviors = Behavior::getBehaviorList();
$yesno = array(0=>t('No'),1=>t('Yes'));
$generateAlarmTypes = array(0=>t('Disabled'),1=>t('Info'),2=>t('Warning'),3=>t('Alarm'));

$form=$this->beginWidget('bootstrap.widgets.TbActiveForm',array(
	'id'=>'gate-behavior-form',
	'enableAjaxValidation'=>false,
)); ?>

	<p class="help-block"><?php echo(t('Fields with <span class="required">*</span> are required.')); ?></p>
  <?php
  
	 echo $form->errorSummary($model); 
	 
	 echo $form->dropDownListRow($model,'id_gate',$gates,array('class'=>'span5')); 

	 echo $form->dropDownListRow($model,'id_behavior',$behaviors,array('class'=>'span5')); 

	 echo $form->dropDownListRow($model,'validate',$yesno,array('class'=>'span5')); 

	 echo $form->dropDownListRow($model,'generate_alarm',$generateAlarmTypes,array('class'=>'span5')); 

	 echo $form->dropDownListRow($model,'to_ignore',$yesno,array('class'=>'span5')); 

	 echo $form->dropDownListRow($model,'transfer_from_vt',$yesno,array('class'=>'span5')); 

	 echo $form->dropDownListRow($model,'transfer_from_event',$yesno,array('class'=>'span5')); 

	 echo $form->dropDownListRow($model,'transfer_empty_plates',$yesno,array('class'=>'span5')); 
	   
	 echo $form->dropDownListRow($model,'is_whitelist',$yesno,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(); ?>
