Commit cbbc84017fb7e0c01dcf0eca40dd6dc1a919de73
Merge remote-tracking branch 'origin/master'
Showing
2 changed files
with
9 additions
and
3 deletions
Show diff stats
common/models/speaker/Speaker.php
... | ... | @@ -85,7 +85,7 @@ |
85 | 85 | */ |
86 | 86 | public function getLanguage() |
87 | 87 | { |
88 | - return $this->hasMany(SpeakerLang::className(), [ 'speaker_id' => 'id' ]) | |
88 | + return $this->hasOne(SpeakerLang::className(), [ 'speaker_id' => 'id' ]) | |
89 | 89 | ->where( |
90 | 90 | [ |
91 | 91 | 'language_id' => Language::getCurrent()->id, | ... | ... |
frontend/views/site/signup.php
... | ... | @@ -3,8 +3,9 @@ |
3 | 3 | /* @var $this yii\web\View */ |
4 | 4 | /* @var $form yii\bootstrap\ActiveForm */ |
5 | 5 | /* @var $model \common\models\Customer */ |
6 | - | |
7 | -use yii\helpers\Html; | |
6 | + | |
7 | + use artbox\core\models\Language; | |
8 | + use yii\helpers\Html; | |
8 | 9 | use yii\web\View; |
9 | 10 | use yii\widgets\ActiveForm; |
10 | 11 | use common\models\Customer; |
... | ... | @@ -133,6 +134,11 @@ JS; |
133 | 134 | <button type="submit">РЕЄСТРАЦІЯ</button> |
134 | 135 | </div> |
135 | 136 | </div> |
137 | + <?php | |
138 | + echo $form->field($model, 'language_id') ->hiddenInput(['value' => Language::getCurrent()->id])->label(false); | |
139 | + echo $form->field($model, 'status') ->hiddenInput(['value' => Customer::STATUS_NEW])->label(false); | |
140 | + | |
141 | + ?> | |
136 | 142 | <?php ActiveForm::end(); ?> |
137 | 143 | </div> |
138 | 144 | </div> | ... | ... |