<?php
/* @var $this OptionController */
/* @var $model Option */
/* @var $form CActiveForm */
?>
<div class="col-xs-12">
    <?php
    $form = $this->beginWidget('bootstrap.widgets.TbActiveForm', array(
	'id' => 'option-form',
	// Please note: When you enable ajax validation, make sure the corresponding
	// controller action is handling ajax validation correctly.
	// There is a call to performAjaxValidation() commented in generated controller code.
	// See class documentation of CActiveForm for details on this.
	'enableAjaxValidation' => false,
    ));
    ?>
    <?php echo $form->errorSummary($model); ?>
    <?php echo $form->textFieldControlGroup($model, 'key', array('size' => 45, 'maxlength' => 45)); ?>
    <?php echo $form->textFieldControlGroup($model, 'value', array('size' => 45, 'maxlength' => 450)); ?>
    <?php echo $form->dropDownListControlGroup($model, 'group', CHtml::listData(OptionGroup::model()->findAll(), 'key', 'title'), array('empty' => '')); ?>
    <?php
    echo TbHtml::formActions(array(
	TbHtml::submitButton($model->isNewRecord ? 'Create' : 'Save', array('color' => TbHtml::BUTTON_COLOR_PRIMARY)),
	TbHtml::resetButton('Reset'),
    ));
    ?>
    <?php $this->endWidget(); ?>
</div>