Commit be42633137ae75531b26066dd8b5c502d81b38ea
1 parent
9b69b051
add Vitaliy's widgets
Showing
2 changed files
with
33 additions
and
3 deletions
Show diff stats
1 | +<?php | ||
2 | + | ||
3 | +use yii\db\Migration; | ||
4 | + | ||
5 | +class m160204_151615_cities extends Migration | ||
6 | +{ | ||
7 | + public function up() | ||
8 | + { | ||
9 | + $tableOptions = null; | ||
10 | + | ||
11 | + $this->createTable('{{%cities}}', [ | ||
12 | + 'id' => $this->primaryKey(), | ||
13 | + 'name' => $this->string(255), | ||
14 | + 'is_active' => $this->smallInteger(), | ||
15 | + 'parent' => $this->integer() | ||
16 | + ], $tableOptions); | ||
17 | + | ||
18 | + } | ||
19 | + | ||
20 | + public function down() | ||
21 | + { | ||
22 | + $this->dropTable('{{%cities}}'); | ||
23 | + } | ||
24 | +} |
frontend/views/site/registration.php
1 | <?php | 1 | <?php |
2 | - $this->registerJsFile('@web/js/selectize.js'); | 2 | +/** |
3 | + * @var $user common\models\User | ||
4 | + * @var $user_info common\models\UserInfo | ||
5 | + */ | ||
6 | + use yii\widgets\ActiveForm; | ||
3 | ?> | 7 | ?> |
4 | <div class="section-box content"> | 8 | <div class="section-box content"> |
5 | <div class="section-box registration"> | 9 | <div class="section-box registration"> |
@@ -7,10 +11,12 @@ | @@ -7,10 +11,12 @@ | ||
7 | <div class="box-all"> | 11 | <div class="box-all"> |
8 | <div class="registration-title style">Регистрация</div> | 12 | <div class="registration-title style">Регистрация</div> |
9 | <div class="registration-form style"> | 13 | <div class="registration-form style"> |
10 | - <form action="" method=""> | 14 | + <?php $form = ActiveForm::begin(); ?> |
11 | 15 | ||
12 | <div class="input-blocks-wrapper"> | 16 | <div class="input-blocks-wrapper"> |
13 | <div class="input-blocks"> | 17 | <div class="input-blocks"> |
18 | + <?= $form->field($model, 'username')?> | ||
19 | + | ||
14 | <div class="form-group field-accountsform-email require has-erro"> | 20 | <div class="form-group field-accountsform-email require has-erro"> |
15 | <label for="input-txt-1">Логин</label> | 21 | <label for="input-txt-1">Логин</label> |
16 | <input class="custom-input-2" id="input-txt-1" type="text"> | 22 | <input class="custom-input-2" id="input-txt-1" type="text"> |
@@ -140,7 +146,7 @@ | @@ -140,7 +146,7 @@ | ||
140 | </div> | 146 | </div> |
141 | </div> | 147 | </div> |
142 | 148 | ||
143 | - </form> | 149 | + <?php ActiveForm::end()?> |
144 | </div> | 150 | </div> |
145 | </div> | 151 | </div> |
146 | </div> | 152 | </div> |