<?php if ($model->hasErrors('content')) { ?> <div class="has-error"> <?php echo \yii\helpers\Html::error($model, 'brief', $form->field($model, 'brief')->errorOptions); ?> </div> <?php } ?> </div> <div class="form-group required"> <?php echo yii\imperavi\Widget::widget(['model' => $model, 'attribute' => 'content', 'options' => ['minHeight' => 300, 'fileUpload' => Url::toRoute(['file-upload', 'attr' => 'content', 'id' => $model->id]), 'imageUpload' => Url::toRoute(['image-upload', 'attr' => 'content', 'id' => $model->id]), 'imageGetJson' => Url::toRoute(['image-list', 'attr' => 'content', 'id' => $model->id]), 'imageUploadErrorCallback' => new \yii\web\JsExpression('function(json) { alert(json.error); }'), 'fileUploadErrorCallback' => new \yii\web\JsExpression('function(json) { alert(json.error); }')]]); ?> <?php if ($model->hasErrors('content')) { ?> <div class="has-error"> <?php echo \yii\helpers\Html::error($model, 'content', $form->field($model, 'content')->errorOptions); ?> </div> <?php } ?> </div> <?php
<?php echo $form->field($model, 'email')->textInput(); ?> <?php //= $form->field($model, 'role')->dropDownList($roles) ?> <?php //= $form->field($model, 'status')->dropDownList($statuses) ?> </div> <div class="tab-pane" id="tab_profile"> <?php echo $form->field($profile, 'fio')->textInput(); ?> <?php echo yii\imperavi\Widget::widget(['model' => $profile, 'attribute' => 'profile']); ?> <?php echo $form->field($profile, 'gender')->dropDownList([1 => 'M', 2 => 'W']); ?> </div> <div class="tab-pane" id="tab_picture"> <?php if ($model->preview) { ?> <?php echo Html::img($model->getThumbUploadUrl('preview', 'small'), ['class' => 'img-thumbnail']); ?> <?php } ?>
} ?> </ul> <div class="tab-content"> <div class="tab-pane active" id="tab_about"> <?php echo $form->field($model, 'h1')->textInput(['maxlength' => true]); ?> <?php echo $form->field($model, 'alias')->textInput(['maxlength' => true]); ?> <?php echo $form->field($model, 'announce')->textarea(['rows' => 6]); ?> <?php echo yii\imperavi\Widget::widget(['model' => $model, 'attribute' => 'content']); ?> <?php echo TreeViewInput::widget(['query' => Category::find()->addOrderBy('root, lft'), 'model' => $model, 'attribute' => 'category_id', 'headingOptions' => ['label' => Yii::t('app', 'Category')], 'asDropdown' => true, 'multiple' => false, 'fontAwesome' => true, 'rootOptions' => ['label' => '<i class="fa fa-tree"></i>', 'class' => 'text-success']]); ?> <?php echo $form->field($model, 'tags')->listBox(ArrayHelper::map($tags, 'id', 'tag'), ['multiple' => true]); ?> <?php echo $form->field($model, 'active')->checkbox(); ?> </div> <div class="tab-pane" id="tab_picture"> <?php if ($model->preview) { ?>
<?php use yii\helpers\Url; echo $form->field($model, 'title')->textInput(['maxlength' => 255]); ?> <?php echo $form->field($model, 'name')->textInput(['maxlength' => 255]); ?> <div class="form-group required"> <?php echo yii\imperavi\Widget::widget(['model' => $model, 'attribute' => 'content', 'options' => ['deniedTags' => [], 'convertDivs' => false, 'paragraphy' => false, 'formattingTags' => [], 'convertLinks' => false, 'cleanup' => false, 'removeEmptyTags' => false, 'cleanSpaces' => false, 'cleanFontTag' => false, 'tidyHtml' => false, 'paragraphize' => false, 'replaceDivs' => false, 'replaceTags' => false, 'replaceStyles' => false, 'removeEmpty' => false, 'minHeight' => 300, 'fileUpload' => Url::toRoute(['file-upload', 'attr' => 'content']), 'imageUpload' => Url::toRoute(['image-upload', 'attr' => 'content']), 'imageGetJson' => Url::toRoute(['image-list', 'attr' => 'content']), 'imageUploadErrorCallback' => new \yii\web\JsExpression('function(json) { alert(json.error); }'), 'fileUploadErrorCallback' => new \yii\web\JsExpression('function(json) { alert(json.error); }')]]); ?> <?php if ($model->hasErrors('content')) { ?> <div class="has-error"> <?php echo \yii\helpers\Html::error($model, 'content', $form->field($model, 'content')->errorOptions); ?> </div> <?php } ?> </div> <?php echo $form->field($model, 'visible')->checkbox(); ?>
<?php echo $form->field($model, 'address')->textInput(['maxlength' => 255]); ?> <?php echo $form->field($model, 'subject')->textInput(['maxlength' => 255]); ?> <!-- <?php $form->field($model, 'content')->textarea(['rows' => 6]); ?> --> <div class="form-group required"> <?php echo yii\imperavi\Widget::widget(['model' => $model, 'attribute' => 'content', 'options' => []]); ?> <?php if ($model->hasErrors('content')) { ?> <div class="has-error"> <?php echo Html::error($model, 'content', $form->field($model, 'content')->errorOptions); ?> </div> <?php } ?> </div> <?php