From 3e86d3d14f661fb68c0c17d933d2ebf559292ee8 Mon Sep 17 00:00:00 2001 From: Yarik Date: Mon, 22 Feb 2016 17:04:40 +0200 Subject: [PATCH] test --- common/models/User.php | 18 +++++++++++++++++- common/models/UserInfo.php | 6 ++++++ frontend/views/accounts/general.php | 1 - 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/common/models/User.php b/common/models/User.php index ec624c6..35354fe 100755 --- a/common/models/User.php +++ b/common/models/User.php @@ -86,7 +86,11 @@ 'max' => 255, ], [ - [ 'firstname' ], + [ + 'firstname', + 'lastname', + 'email', + ], 'required', ], [ @@ -115,6 +119,18 @@ /** * @inheritdoc */ + public function attributeLabels() + { + return [ + 'firstname' => Yii::t('app', 'Имя'), + 'lastname' => Yii::t('app', 'Фамилия'), + 'email' => Yii::t('app', 'Email'), + ]; + } + + /** + * @inheritdoc + */ public static function findIdentity($id) { if(Yii::$app->getSession() diff --git a/common/models/UserInfo.php b/common/models/UserInfo.php index 5e9df2c..d502e4d 100755 --- a/common/models/UserInfo.php +++ b/common/models/UserInfo.php @@ -67,6 +67,12 @@ return [ [ [ + 'city', + ], + 'required', + ], + [ + [ 'is_customer', 'is_freelancer', 'salary_currency', diff --git a/frontend/views/accounts/general.php b/frontend/views/accounts/general.php index 63f7deb..066f768 100755 --- a/frontend/views/accounts/general.php +++ b/frontend/views/accounts/general.php @@ -119,7 +119,6 @@ $form->field($user_info, 'country')->widget(Select2::classname(), [ 'options' => ['placeholder' => 'Выбор страны ...', ], 'pluginOptions' => [ - 'tags' => true, 'allowClear' => true, 'minimumInputLength' => 3, 'ajax' => [ -- libgit2 0.21.4