<div class="form">

    <?php
    /**
     * @var BHorizontalForm $form
     * @var Show $model
     * @var ShowI18n[] $i18nModels
     */
    ?>

    <?php $form = $this->beginWidget('BHorizontalForm', array(
    'id' => 'show-form',
    'enableAjaxValidation' => false,
    'htmlOptions' => array(
        'enctype' => 'multipart/form-data',
    ),
)); ?>
    <!--
    <p class="note">Fields with <span class="required">*</span> are required.</p>

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

    -->

    <div class="control-group <?php echo ($model->hasErrors('news_category_id') ? ' error' : '') ?>">
        <?php echo $form->label($model, 'news_category_id', array('class' => 'control-label'))?>
        <div class="controls">
            <?php echo $form->dropDownList($model, 'news_category_id', $model->getCategories()); ?>
            <?php echo $form->error($model, 'news_category_id'); ?>
        </div>
    </div>

    <div class="control-group <?php echo ($model->hasErrors('dateRu') ? ' error' : '') ?>">
        <?php echo $form->label($model, 'dateRu', array('class' => 'control-label'))?>
        <div class="controls">
            <?php
            $this->widget('vendor.z_bodya.yii-datetimepicker.DateTimePicker', array(
                'model' => $model,
                'attribute' => 'dateRu',
                'language' => 'ru',
                'options' => array(
                    'dateFormat' => 'dd.mm.yy',
                    'timeFormat' => 'hh:mm:ss',
                ),
            ));
            ?>
            <?php echo $form->error($model, 'dateRu'); ?>
        </div>
    </div>
    <!--
    <div class="control-group <?php /*echo ($model->hasErrors('dateRu') ? ' error' : '') */?>">
        <?php /*echo $form->label($model, 'dateRu', array('class' => 'control-label'))*/?>
        <div class="controls">
            <?php
    /*            $this->widget('zii.widgets.jui.CJuiDatePicker', array(
                    'model' => $model,
                    'attribute' => 'dateRu',
                    'language' => 'ru',
                    'options' => array(
                        'showAnim' => 'fold',
                    ),
                    'htmlOptions' => array(
                        'style' => 'height:20px;'
                    ),
                ));
                */?>
            <?php /*echo $form->error($model, 'dateRu'); */?>
        </div>
    </div>-->


    <div class="control-group <?php echo ($model->hasErrors('video_url') ? ' error' : '') ?>">
        <?php echo $form->label($model, 'video_url', array('class' => 'control-label'))?>
        <div class="controls">
            <?php echo $form->textField($model, 'video_url', array('size' => 60, 'maxlength' => 2048)); ?>
            <?php echo $form->error($model, 'video_url'); ?>
        </div>
    </div>

    <?php
    /**
     * @var BTabs $tabs
     */
    $tabs = $this->beginWidget('BTabs');
    foreach ($i18nModels as $lang => $i18nModel):
        ?>
        <?php $tabs->beginTab(Yii::app()->params['languageNames'][$lang]) ?>
        <div class="control-group <?php echo ($i18nModel->hasErrors('name') ? ' error' : '') ?>">
            <?php echo $form->label($i18nModel, 'name', array('class' => 'control-label'))?>
            <div class="controls">
                <?php echo $form->textField($i18nModel, "[$lang]name", array('size' => 60, 'maxlength' => 512)); ?>
                <?php echo $form->error($i18nModel, 'name'); ?>
            </div>
        </div>


        <div class="control-group <?php echo ($i18nModel->hasErrors('short') ? ' error' : '') ?>">
            <?php echo $form->label($i18nModel, 'short', array('class' => 'control-label'))?>
            <div class="controls">
                <?php
                $this->widget('TinyMce', array(
                    'model' => $i18nModel,
                    'attribute' => "[$lang]short",
                    'htmlOptions' => array(
                        'rows' => 6,
                        'cols' => 60,
                    ),
                ));
                ?>
                <?php echo $form->error($i18nModel, 'short'); ?>
            </div>
        </div>


        <?php $tabs->endTab() ?>
        <?php
    endforeach;
    $this->endWidget();
    ?>

    <div class="form-actions">
        <button type="submit" class="btn btn-large btn-primary">
            <?php echo ($model->isNewRecord ? 'Создать' : 'Сохранить'); ?>
        </button>
    </div>

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

</div><!-- form -->
