Commit 3e86d3d14f661fb68c0c17d933d2ebf559292ee8
1 parent
c7e64161
test
Showing
3 changed files
with
23 additions
and
2 deletions
Show diff stats
common/models/User.php
@@ -86,7 +86,11 @@ | @@ -86,7 +86,11 @@ | ||
86 | 'max' => 255, | 86 | 'max' => 255, |
87 | ], | 87 | ], |
88 | [ | 88 | [ |
89 | - [ 'firstname' ], | 89 | + [ |
90 | + 'firstname', | ||
91 | + 'lastname', | ||
92 | + 'email', | ||
93 | + ], | ||
90 | 'required', | 94 | 'required', |
91 | ], | 95 | ], |
92 | [ | 96 | [ |
@@ -115,6 +119,18 @@ | @@ -115,6 +119,18 @@ | ||
115 | /** | 119 | /** |
116 | * @inheritdoc | 120 | * @inheritdoc |
117 | */ | 121 | */ |
122 | + public function attributeLabels() | ||
123 | + { | ||
124 | + return [ | ||
125 | + 'firstname' => Yii::t('app', 'Имя'), | ||
126 | + 'lastname' => Yii::t('app', 'Фамилия'), | ||
127 | + 'email' => Yii::t('app', 'Email'), | ||
128 | + ]; | ||
129 | + } | ||
130 | + | ||
131 | + /** | ||
132 | + * @inheritdoc | ||
133 | + */ | ||
118 | public static function findIdentity($id) | 134 | public static function findIdentity($id) |
119 | { | 135 | { |
120 | if(Yii::$app->getSession() | 136 | if(Yii::$app->getSession() |
common/models/UserInfo.php
frontend/views/accounts/general.php
@@ -119,7 +119,6 @@ | @@ -119,7 +119,6 @@ | ||
119 | $form->field($user_info, 'country')->widget(Select2::classname(), [ | 119 | $form->field($user_info, 'country')->widget(Select2::classname(), [ |
120 | 'options' => ['placeholder' => 'Выбор страны ...', ], | 120 | 'options' => ['placeholder' => 'Выбор страны ...', ], |
121 | 'pluginOptions' => [ | 121 | 'pluginOptions' => [ |
122 | - 'tags' => true, | ||
123 | 'allowClear' => true, | 122 | 'allowClear' => true, |
124 | 'minimumInputLength' => 3, | 123 | 'minimumInputLength' => 3, |
125 | 'ajax' => [ | 124 | 'ajax' => [ |