<div class="form col-xs-12 first">

    <?php if ($model->scenario === 'update'): ?>
        <h3><?php echo Rights::getAuthItemTypeName($model->type); ?></h3>
    <?php endif; ?>

    <?php $form = $this->beginWidget('bootstrap.widgets.TbActiveForm'); ?>

    <?php echo $form->textFieldControlGroup($model, 'name', array('maxlength' => 255, 'class' => 'text-field', 'help' => Rights::t('core', 'Do not change the name unless you know what you are doing.'))); ?>

    <?php echo $form->textFieldControlGroup($model, 'description', array('maxlength' => 255, 'class' => 'text-field', 'help' => Rights::t('core', 'A descriptive name for this item.'))); ?>

    <?php if (Rights::module()->enableBizRule === true): ?>

	<?php echo $form->textFieldControlGroup($model, 'bizRule', array('maxlength' => 255, 'class' => 'text-field', 'help' => Rights::t('core', 'Code that will be executed when performing access checking.'))); ?>

    <?php endif; ?>

    <?php if (Rights::module()->enableBizRule === true && Rights::module()->enableBizRuleData): ?>

	<?php echo $form->textFieldControlGroup($model, 'data', array('maxlength' => 255, 'class' => 'text-field', 'help' => Rights::t('core', 'Additional data available when executing the business rule.'))); ?>


    <?php endif; ?>


    <?php
    echo TbHtml::formActions(array(
	CHtml::submitButton(Rights::t('core', 'Save'), array('class' => 'btn btn-primary')),
	CHtml::link(Rights::t('core', 'Cancel'), Yii::app()->user->rightsReturnUrl, array('class' => 'btn')),
    ));
    ?>


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

</div>