From a5a611c9ff1d80b763af6c4a0565687d939bcf23 Mon Sep 17 00:00:00 2001 From: Vitaliy Date: Mon, 5 Oct 2015 14:41:37 +0300 Subject: [PATCH] Importers CRUD --- backend/views/accounts/_form.php | 5 +---- backend/views/user/_form.php | 7 ++++++- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/backend/views/accounts/_form.php b/backend/views/accounts/_form.php index a3bab13..55d6dfe 100644 --- a/backend/views/accounts/_form.php +++ b/backend/views/accounts/_form.php @@ -49,10 +49,7 @@ use yii\helpers\ArrayHelper; field($model, 'name')->textInput(['maxlength' => true]) ?> - field($model, 'city')->dropDownList(ArrayHelper::map([['id'=>1,'name'=>'Администратор'], - ['id'=>2,'name'=>'Менеджер'], - ['id'=>3,'name'=>'Топ-менеджер'], - ], 'id', 'name')) ?> + field($model, 'city')->dropDownList(ArrayHelper::map($cities, 'id', 'name'), ['prompt' => 'Выберие город']) ?> field($model, 'address')->textarea(['rows' => 6]) ?> diff --git a/backend/views/user/_form.php b/backend/views/user/_form.php index 2869b41..d99eb0b 100644 --- a/backend/views/user/_form.php +++ b/backend/views/user/_form.php @@ -2,6 +2,7 @@ use yii\helpers\Html; use yii\widgets\ActiveForm; +use yii\helpers\ArrayHelper; /* @var $this yii\web\View */ /* @var $model backend\models\User */ @@ -18,7 +19,11 @@ use yii\widgets\ActiveForm; field($model, 'email')->textInput(['maxlength' => true]) ?> - field($model, 'is_super')->textInput() ?> + + field($model, 'is_super')->dropDownList(ArrayHelper::map([['id'=>1,'name'=>'Администратор'], + ['id'=>2,'name'=>'Менеджер'], + ['id'=>3,'name'=>'Топ-менеджер'], + ], 'id', 'name')) ?> field($model, 'name')->textInput(['maxlength' => true]) ?> -- libgit2 0.21.4