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