Commit a5a611c9ff1d80b763af6c4a0565687d939bcf23

Authored by Administrator
1 parent 5c492607

Importers CRUD

backend/views/accounts/_form.php
... ... @@ -49,10 +49,7 @@ use yii\helpers\ArrayHelper;
49 49  
50 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 54 <?= $form->field($model, 'address')->textarea(['rows' => 6]) ?>
58 55  
... ...
backend/views/user/_form.php
... ... @@ -2,6 +2,7 @@
2 2  
3 3 use yii\helpers\Html;
4 4 use yii\widgets\ActiveForm;
  5 +use yii\helpers\ArrayHelper;
5 6  
6 7 /* @var $this yii\web\View */
7 8 /* @var $model backend\models\User */
... ... @@ -18,7 +19,11 @@ use yii\widgets\ActiveForm;
18 19  
19 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 28 <?= $form->field($model, 'name')->textInput(['maxlength' => true]) ?>
24 29  
... ...