?> </h1> </div> <div class="box-body"> <div class="account-form"> <?php $form = ActiveForm::begin(['action' => Yii::$app->urlManager->createUrl(['/account'])]); ?> <?php echo $form->field($model, 'fullname')->textInput(['maxlength' => true, 'disabled' => !$model->canChangeName()]); ?> <?php echo $form->field($model, 'language')->widget(Select2Widget::className(), ['bootstrap' => false, 'items' => \common\models\Message::getLocaleList()]); ?> <?php echo $form->field($model, 'timezone')->widget(Select2Widget::className(), ['bootstrap' => false, 'items' => Core::getTimezoneList()]); ?> <div class="form-group"> <?php echo Html::submitButton(Yii::t('app', 'Save'), ['class' => 'btn btn-primary']); ?> </div <?php ActiveForm::end(); ?> </div> </div> </div> </div>
<?php echo $form->field($model, 'content')->widget(TinyMCE::className()); ?> <?php if ($model->url !== null) { $pages = Page::find()->where(['!=', 'url', $model->url])->all(); } else { $pages = Page::find()->all(); } $usedUrlsIds = array_map(function ($page) { return $page->url; }, $pages); ?> <?php echo $form->field($model, 'url')->widget(Select2Widget::className(), ['items' => ArrayHelper::map(Url::find()->where(['not in', 'id', $usedUrlsIds])->all(), 'id', 'url')]); ?> <div class="form-group"> <?php echo Html::submitButton($model->isNewRecord ? Yii::t('app', 'Create') : Yii::t('app', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']); ?> </div> <?php ActiveForm::end(); ?> </div>
<?php echo $form->field($model, 'tittle')->textInput(['maxlength' => true]); ?> <?php echo $form->field($model, 'content')->textInput(['maxlength' => true]); ?> <?php /* echo $form->field($model, 'categoriesList')->dropDownList( $categoriesList, [ 'multiple' => 'true' ]) */ ?> <?php echo $form->field($model, 'categoriesList')->widget(Select2Widget::className(), ['items' => $categoriesList, 'multiple' => 'true']); ?> <div class="form-group"> <?php echo Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']); ?> </div> <?php ActiveForm::end(); ?> </div>