<div class="modal-dialog">
    <?php
    $form = $this->beginWidget('CActiveForm', array(
        'id' => 'forum-form',
        'enableAjaxValidation'=>true,
        'htmlOptions'=>array(
          'class'=>'form-horizontal',
        ),
    ));
    ?>

    <div class="modal-content">
        <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal">
                <span aria-hidden="true">&times;</span><span class="sr-only">Закрыть</span>
            </button>
            <h4 class="modal-title"><?php echo ($model->isNewRecord ? 'Создать раздел' : 'Редактировать раздел');?></h4>
        </div>
        <div class="modal-body">
            <div class="form-group">
                <?php echo $form->labelEx($model, 'title', array('class' => 'col-sm-3 control-label')); ?>
                <div class="col-sm-9">
                    <?php echo $form->textField($model, 'title', array('class' => 'form-control')); ?>
                    <?php echo $form->error($model, 'title'); ?>
                </div>
            </div>
            <div class="form-group">
                <?php echo $form->labelEx($model, 'description', array('class' => 'col-sm-3 control-label')); ?>
                <div class="col-sm-9">
                    <?php echo $form->textArea($model, 'description', array('class' => 'form-control')); ?>
                    <?php echo $form->error($model, 'description'); ?>
                </div>
            </div>
        </div>
        <div class="modal-footer">
            <?php echo CHtml::submitButton(($model->isNewRecord ? Yii::t('layout', 'Создать') : Yii::t('layout', 'Сохранить')), array('class' => 'btn-block form-control sendModalForm')); ?>
        </div>
    </div>
    <?php $this->endWidget(); ?>
</div>