<?php 

$groups = GateGroup::getGateGroupList();
$groups[-1] = t('None');
$times = TimeSchedule::getTimeScheduleArrayForRuns();
$yesno = array(0=>t('No'),1=>t('Yes'));

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

?>

	<p class="help-block"><?php echo(t('Fields with <span class="required">*</span> are required.')); ?></p>

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

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

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

	<?php echo $form->dropDownListRow($model,'active',$yesno,array('class'=>'span5')); ?>

	<?php echo $form->dropDownListRow($model,'id_gate_group',$groups,array('class'=>'span5','maxlength'=>20)); ?>

	<?php echo $form->dropDownListRow($model,'id_time_table',$times,array('class'=>'span5','maxlength'=>20)); ?>

	<?php echo $form->dropDownListRow($model,'confirmation_required',$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(); ?>
