<?php use yii\helpers\Html; use yii\widgets\ActiveForm; use yii\easyii\widgets\SeoForm; use kuzmiand\behaviors\multilanguage\input_widget\MultiLanguageActiveField; $form = ActiveForm::begin(['enableAjaxValidation' => true, 'options' => ['enctype' => 'multipart/form-data', 'class' => 'model-form']]); echo $form->field($model, 'title'); ?> <?php echo $form->field($model, 'file')->fileInput()->widget(MultiLanguageActiveField::className(), ['inputType' => 'file']); ?> <?php //= $form->field($model, 'file')->fileInput() ?> <?php /*if(!$model->isNewRecord) : */ ?> <!-- <div><a href="<?php /*= $model->file */ ?> " target="_blank"><?php /*= basename($model->file) */ ?> </a> (<?php /*= Yii::$app->formatter->asShortSize($model->size, 2) */ ?>
<?php use yii\helpers\Html; use yii\widgets\ActiveForm; use kuzmiand\behaviors\multilanguage\input_widget\MultiLanguageActiveField; use yii\easyii\widgets\RedactorMultiLanguage\RedactorMultiLanguageInput; use yii\helpers\Url; ?> <?php $form = ActiveForm::begin(['enableAjaxValidation' => true, 'options' => ['class' => 'model-form']]); ?> <?php echo $form->field($model, 'text')->textarea()->widget(MultiLanguageActiveField::className(), ['inputType' => 'textArea', 'inputOptions' => ['rows' => '10', 'style' => ['width' => '100%']]]); ?> <?php /*= RedactorMultiLanguageInput::widget($model, 'text', ['options' => [ 'minHeight' => 400, 'imageUpload' => Url::to(['/admin/redactor/upload', 'dir' => 'text']), 'fileUpload' => Url::to(['/admin/redactor/upload', 'dir' => 'text']), 'plugins' => ['fullscreen'] ]]); */ ?> <?php echo IS_ROOT ? $form->field($model, 'slug') : ''; ?> <?php
<?php } ?> <?php echo $form->field($model, 'image')->fileInput(); ?> <?php echo $form->field($model, 'link'); ?> <?php if ($this->context->module->settings['enableTitle']) { ?> <?php echo $form->field($model, 'title')->textarea()->widget(MultiLanguageActiveField::className(), ['inputType' => 'textArea']); } ?> <?php if ($this->context->module->settings['enableText']) { ?> <?php echo $form->field($model, 'text')->textarea()->widget(MultiLanguageActiveField::className(), ['inputType' => 'textArea']); } ?> <?php echo Html::submitButton(Yii::t('easyii', 'Save'), ['class' => 'btn btn-primary']); ActiveForm::end();
<?php use yii\helpers\Html; use yii\helpers\Url; use yii\widgets\ActiveForm; use yii\easyii\widgets\Redactor; use yii\easyii\widgets\SeoForm; use kuzmiand\behaviors\multilanguage\input_widget\MultiLanguageActiveField; use yii\easyii\widgets\RedactorMultiLanguage\RedactorMultiLanguageInput; $form = ActiveForm::begin(['enableAjaxValidation' => true, 'options' => ['class' => 'model-form']]); ?> <?php echo $form->field($model, 'title')->widget(MultiLanguageActiveField::className()); ?> <?php /*= $form->field($model, 'text')->widget(Redactor::className(),[ 'options' => [ 'minHeight' => 400, 'imageUpload' => Url::to(['/admin/redactor/upload', 'dir' => 'pages']), 'fileUpload' => Url::to(['/admin/redactor/upload', 'dir' => 'pages']), 'plugins' => ['fullscreen'] ] ]) */ ?> <div style="margin: 20px 0"> <?php echo RedactorMultiLanguageInput::widget($model, 'text', ['options' => ['minHeight' => 400, 'imageUpload' => Url::to(['/admin/redactor/upload', 'dir' => 'news']), 'fileUpload' => Url::to(['/admin/redactor/upload', 'dir' => 'news']), 'plugins' => ['fullscreen']]]); ?>