Commit a5a611c9ff1d80b763af6c4a0565687d939bcf23
1 parent
5c492607
Importers CRUD
Showing
2 changed files
with
7 additions
and
5 deletions
Show diff stats
backend/views/accounts/_form.php
@@ -49,10 +49,7 @@ use yii\helpers\ArrayHelper; | @@ -49,10 +49,7 @@ use yii\helpers\ArrayHelper; | ||
49 | 49 | ||
50 | <?= $form->field($model, 'name')->textInput(['maxlength' => true]) ?> | 50 | <?= $form->field($model, 'name')->textInput(['maxlength' => true]) ?> |
51 | 51 | ||
52 | - <?= $form->field($model, 'city')->dropDownList(ArrayHelper::map([['id'=>1,'name'=>'Администратор'], | ||
53 | - ['id'=>2,'name'=>'Менеджер'], | ||
54 | - ['id'=>3,'name'=>'Топ-менеджер'], | ||
55 | - ], 'id', 'name')) ?> | 52 | + <?= $form->field($model, 'city')->dropDownList(ArrayHelper::map($cities, 'id', 'name'), ['prompt' => 'Выберие город']) ?> |
56 | 53 | ||
57 | <?= $form->field($model, 'address')->textarea(['rows' => 6]) ?> | 54 | <?= $form->field($model, 'address')->textarea(['rows' => 6]) ?> |
58 | 55 |
backend/views/user/_form.php
@@ -2,6 +2,7 @@ | @@ -2,6 +2,7 @@ | ||
2 | 2 | ||
3 | use yii\helpers\Html; | 3 | use yii\helpers\Html; |
4 | use yii\widgets\ActiveForm; | 4 | use yii\widgets\ActiveForm; |
5 | +use yii\helpers\ArrayHelper; | ||
5 | 6 | ||
6 | /* @var $this yii\web\View */ | 7 | /* @var $this yii\web\View */ |
7 | /* @var $model backend\models\User */ | 8 | /* @var $model backend\models\User */ |
@@ -18,7 +19,11 @@ use yii\widgets\ActiveForm; | @@ -18,7 +19,11 @@ use yii\widgets\ActiveForm; | ||
18 | 19 | ||
19 | <?= $form->field($model, 'email')->textInput(['maxlength' => true]) ?> | 20 | <?= $form->field($model, 'email')->textInput(['maxlength' => true]) ?> |
20 | 21 | ||
21 | - <?= $form->field($model, 'is_super')->textInput() ?> | 22 | + |
23 | + <?= $form->field($model, 'is_super')->dropDownList(ArrayHelper::map([['id'=>1,'name'=>'Администратор'], | ||
24 | + ['id'=>2,'name'=>'Менеджер'], | ||
25 | + ['id'=>3,'name'=>'Топ-менеджер'], | ||
26 | + ], 'id', 'name')) ?> | ||
22 | 27 | ||
23 | <?= $form->field($model, 'name')->textInput(['maxlength' => true]) ?> | 28 | <?= $form->field($model, 'name')->textInput(['maxlength' => true]) ?> |
24 | 29 |