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 | 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 | 8 | <div class="section-box content"> |
| 5 | 9 | <div class="section-box registration"> |
| ... | ... | @@ -7,10 +11,12 @@ |
| 7 | 11 | <div class="box-all"> |
| 8 | 12 | <div class="registration-title style">Регистрация</div> |
| 9 | 13 | <div class="registration-form style"> |
| 10 | - <form action="" method=""> | |
| 14 | + <?php $form = ActiveForm::begin(); ?> | |
| 11 | 15 | |
| 12 | 16 | <div class="input-blocks-wrapper"> |
| 13 | 17 | <div class="input-blocks"> |
| 18 | + <?= $form->field($model, 'username')?> | |
| 19 | + | |
| 14 | 20 | <div class="form-group field-accountsform-email require has-erro"> |
| 15 | 21 | <label for="input-txt-1">Логин</label> |
| 16 | 22 | <input class="custom-input-2" id="input-txt-1" type="text"> |
| ... | ... | @@ -140,7 +146,7 @@ |
| 140 | 146 | </div> |
| 141 | 147 | </div> |
| 142 | 148 | |
| 143 | - </form> | |
| 149 | + <?php ActiveForm::end()?> | |
| 144 | 150 | </div> |
| 145 | 151 | </div> |
| 146 | 152 | </div> | ... | ... |