<?php
$this->pageTitle = 'Тех. поддержка';
?>
<?php
if (!SupportMessages::checkForNewMessage()):
$form = $this->beginWidget('CActiveForm', array(
    'enableAjaxValidation'=>false,
    'htmlOptions'=>array(
      'role'=>'form',
    ),
));
?>
<div class="form-group">
    <?php echo $form->label($model, 'id_category', array('class' => 'col-sm-3 control-label')); ?>
    <?php echo $form->dropDownList($model, 'id_category', CHtml::listData(SupportCategories::model()->findAll(), 'id_category', 'title'), array('class' => 'form-control')); ?>
    <?php echo $form->error($model, 'id_category'); ?>
</div>
<div class="form-group">
    <?php echo $form->label($model, 'message', array('class' => 'control-label')); ?>
    <?php echo $form->textArea($model, 'message', array('class' => 'form-control')); ?>
    <?php echo $form->error($model, 'message'); ?>
</div>
<div class="form-group">
    <?php echo CHtml::submitButton(Yii::t('layout', 'Отправить'), array('class' => 'btn-block form-control')); ?>
</div>
<?php $this->endWidget(); ?>
<?php else: ?>
<div class="info">Вы уже отправили запрос в тех. поддержку. Ожидайте...</div>
<?php endif; ?>