registerJs($js, View::POS_READY);
?>
= $form->field($model, 'title')
->textInput([ 'maxlength' => true ]) ?>
=$model->author->name.' '.$model->author->secondname?>
= $form->field($model, 'description')
->widget(
TinyMce::className(),
[
'options' => [ 'rows' => 30 ],
'language' => 'ru',
'clientOptions' => [
'file_browser_callback' => new JsExpression(
"function(field_name, url, type, win) {
window.open('" . Url::to(
[
'imagemanager/manager',
'view-mode' => 'iframe',
'select-type' => 'tinymce',
]
) . "&tag_name='+field_name,'','width=800,height=540 ,toolbar=no,status=no,menubar=no,scrollbars=no,resizable=no');
}"
),
'plugins' => [
"advlist autolink lists link charmap print preview anchor",
"searchreplace visualblocks code fullscreen",
"insertdatetime media table contextmenu paste image",
],
'toolbar' => "undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image | code",
'image_advtab' => true,
],
]
); ?>
= $form->field($model, 'preview')
->textarea(
[
'rows' => '10',
]
) ?>
= $form->field($model, 'status')->widget(
Select2::classname(),
[
'data' => $model->getStatuses(),
'pluginOptions' => [
'allowClear' => true,
],
]
);
?>
= $form->field($model, 'on_main')
->checkbox(
[
'class' => 'switchery',
]
) ?>
= Html::submitButton(
$model->isNewRecord ? Yii::t('core', 'Create') : Yii::t('core', 'Update'),
[ 'class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary' ]
) ?>