Commit bca17da70893eb39008bfd965bb23616238baed6
Merge remote-tracking branch 'origin/master'
Showing
14 changed files
with
215 additions
and
80 deletions
Show diff stats
backend/views/specialization/_form.php
| @@ -3,6 +3,7 @@ | @@ -3,6 +3,7 @@ | ||
| 3 | use yii\helpers\Html; | 3 | use yii\helpers\Html; |
| 4 | use yii\widgets\ActiveForm; | 4 | use yii\widgets\ActiveForm; |
| 5 | use yii\helpers\ArrayHelper; | 5 | use yii\helpers\ArrayHelper; |
| 6 | +use \kartik\color\ColorInput; | ||
| 6 | /* @var $this yii\web\View */ | 7 | /* @var $this yii\web\View */ |
| 7 | /* @var $model common\models\Specialization */ | 8 | /* @var $model common\models\Specialization */ |
| 8 | /* @var $form yii\widgets\ActiveForm */ | 9 | /* @var $form yii\widgets\ActiveForm */ |
| @@ -20,9 +21,13 @@ use yii\helpers\ArrayHelper; | @@ -20,9 +21,13 @@ use yii\helpers\ArrayHelper; | ||
| 20 | 21 | ||
| 21 | 22 | ||
| 22 | if($model->specialization_pid == 0 && !empty($model->specialization_id) ){ | 23 | if($model->specialization_pid == 0 && !empty($model->specialization_id) ){ |
| 23 | - echo $form->field($model, 'background')->textInput(); | ||
| 24 | 24 | ||
| 25 | - echo \common\widgets\ImageUploader::widget([ | 25 | + |
| 26 | + echo $form->field($model, 'background')->widget(ColorInput::classname(), [ | ||
| 27 | + 'options' => ['placeholder' => 'Select color ...'], | ||
| 28 | + ]); | ||
| 29 | + | ||
| 30 | + echo \common\widgets\ImageUploader::widget([ | ||
| 26 | 'model'=> $model, | 31 | 'model'=> $model, |
| 27 | 'field'=>'image', | 32 | 'field'=>'image', |
| 28 | 'width'=>940, | 33 | 'width'=>940, |
common/models/UserInfo.php
| @@ -61,13 +61,13 @@ class UserInfo extends \yii\db\ActiveRecord | @@ -61,13 +61,13 @@ class UserInfo extends \yii\db\ActiveRecord | ||
| 61 | public function rules() | 61 | public function rules() |
| 62 | { | 62 | { |
| 63 | return [ | 63 | return [ |
| 64 | - [['user_id', 'view_count', 'contract', 'estimate', 'purchase', 'delivery'], 'integer'], | 64 | + [['user_id', 'view_count', 'contract', 'estimate', 'purchase', 'delivery','is_customer','is_freelancer'], 'integer'], |
| 65 | [['date_visit'], 'safe'], | 65 | [['date_visit'], 'safe'], |
| 66 | [['experience', 'soft', 'guarantee', 'about', 'city', 'country', 'image', 'poster', 'social_vk', 'social_fb', 'social_in', 'social_t'], 'string'], | 66 | [['experience', 'soft', 'guarantee', 'about', 'city', 'country', 'image', 'poster', 'social_vk', 'social_fb', 'social_in', 'social_t'], 'string'], |
| 67 | [['prepayment'], 'number'], | 67 | [['prepayment'], 'number'], |
| 68 | 68 | ||
| 69 | [['rank', 'location'], 'string', 'max' => 50], | 69 | [['rank', 'location'], 'string', 'max' => 50], |
| 70 | - [['salary', 'job'], 'string', 'max' => 255], | 70 | + [['salary', 'job','firstname','lastname'], 'string', 'max' => 255], |
| 71 | [['busy', 'member'], 'boolean'], | 71 | [['busy', 'member'], 'boolean'], |
| 72 | ]; | 72 | ]; |
| 73 | } | 73 | } |
| @@ -96,6 +96,12 @@ class UserInfo extends \yii\db\ActiveRecord | @@ -96,6 +96,12 @@ class UserInfo extends \yii\db\ActiveRecord | ||
| 96 | 'delivery' => Yii::t('app', 'Delivery'), | 96 | 'delivery' => Yii::t('app', 'Delivery'), |
| 97 | 'prepayment' => Yii::t('app', 'Prepayment'), | 97 | 'prepayment' => Yii::t('app', 'Prepayment'), |
| 98 | 'about' => Yii::t('app', 'About'), | 98 | 'about' => Yii::t('app', 'About'), |
| 99 | + 'type' => Yii::t('app', 'Is Default'), | ||
| 100 | + 'firstname' => 'Имя', | ||
| 101 | + 'lastname' => 'Фамилия', | ||
| 102 | + 'alt_location' => 'Город не в списке', | ||
| 103 | + 'is_customer' => '', | ||
| 104 | + 'is_freelancer' => '', | ||
| 99 | 105 | ||
| 100 | ]; | 106 | ]; |
| 101 | } | 107 | } |
common/widgets/views/image_sizer.php
| @@ -24,7 +24,6 @@ $id = $model::tableName().'_id'; | @@ -24,7 +24,6 @@ $id = $model::tableName().'_id'; | ||
| 24 | <?= $model->$field ? Html::img($model->$field): '' ?> | 24 | <?= $model->$field ? Html::img($model->$field): '' ?> |
| 25 | </div> | 25 | </div> |
| 26 | </div> | 26 | </div> |
| 27 | - <div class="file-help-1"><div>Формат: PNG, JPG, GIF<br />Размер: 180x180 px<br />Файлы большего размера и других пропорций будут конвертироваться</div></div> | ||
| 28 | </div> | 27 | </div> |
| 29 | 28 | ||
| 30 | <span class="btn btn-success fileinput-button uploader-button"> | 29 | <span class="btn btn-success fileinput-button uploader-button"> |
composer.json
| @@ -25,7 +25,8 @@ | @@ -25,7 +25,8 @@ | ||
| 25 | "developeruz/yii2-db-rbac": "*", | 25 | "developeruz/yii2-db-rbac": "*", |
| 26 | "nodge/yii2-eauth": "*", | 26 | "nodge/yii2-eauth": "*", |
| 27 | "yiisoft/yii2-imagine": "^2.0", | 27 | "yiisoft/yii2-imagine": "^2.0", |
| 28 | - "mihaildev/yii2-elfinder": "^1.1" | 28 | + "mihaildev/yii2-elfinder": "^1.1", |
| 29 | + "kartik-v/yii2-widget-colorinput": "*" | ||
| 29 | }, | 30 | }, |
| 30 | "require-dev": { | 31 | "require-dev": { |
| 31 | "yiisoft/yii2-codeception": "*", | 32 | "yiisoft/yii2-codeception": "*", |
composer.lock
| @@ -4,8 +4,8 @@ | @@ -4,8 +4,8 @@ | ||
| 4 | "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", | 4 | "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", |
| 5 | "This file is @generated automatically" | 5 | "This file is @generated automatically" |
| 6 | ], | 6 | ], |
| 7 | - "hash": "5f5473586959d0912177c3dace19c844", | ||
| 8 | - "content-hash": "2d0acd792b2e28f03338a962c2923bbe", | 7 | + "hash": "f958ed2e8b3c8028fd675954db6672d5", |
| 8 | + "content-hash": "d6ebcd3630219974938579b63b419fdd", | ||
| 9 | "packages": [ | 9 | "packages": [ |
| 10 | { | 10 | { |
| 11 | "name": "almasaeed2010/adminlte", | 11 | "name": "almasaeed2010/adminlte", |
| @@ -324,7 +324,7 @@ | @@ -324,7 +324,7 @@ | ||
| 324 | }, | 324 | }, |
| 325 | "dist": { | 325 | "dist": { |
| 326 | "type": "zip", | 326 | "type": "zip", |
| 327 | - "url": "https://api.github.com/repos/cebe/markdown/zipball/d7b6f46cd423174c8a86c7f816dea45008dbf454", | 327 | + "url": "https://api.github.com/repos/cebe/markdown/zipball/35d47fe727a453a8aa5c6be7e627caad8f16d586", |
| 328 | "reference": "d7b6f46cd423174c8a86c7f816dea45008dbf454", | 328 | "reference": "d7b6f46cd423174c8a86c7f816dea45008dbf454", |
| 329 | "shasum": "" | 329 | "shasum": "" |
| 330 | }, | 330 | }, |
| @@ -660,6 +660,60 @@ | @@ -660,6 +660,60 @@ | ||
| 660 | "time": "2016-01-10 12:26:29" | 660 | "time": "2016-01-10 12:26:29" |
| 661 | }, | 661 | }, |
| 662 | { | 662 | { |
| 663 | + "name": "kartik-v/yii2-widget-colorinput", | ||
| 664 | + "version": "dev-master", | ||
| 665 | + "source": { | ||
| 666 | + "type": "git", | ||
| 667 | + "url": "https://github.com/kartik-v/yii2-widget-colorinput.git", | ||
| 668 | + "reference": "18537fcdab0f5491d5eebff8e2464ef6a616ee4c" | ||
| 669 | + }, | ||
| 670 | + "dist": { | ||
| 671 | + "type": "zip", | ||
| 672 | + "url": "https://api.github.com/repos/kartik-v/yii2-widget-colorinput/zipball/18537fcdab0f5491d5eebff8e2464ef6a616ee4c", | ||
| 673 | + "reference": "18537fcdab0f5491d5eebff8e2464ef6a616ee4c", | ||
| 674 | + "shasum": "" | ||
| 675 | + }, | ||
| 676 | + "require": { | ||
| 677 | + "kartik-v/yii2-krajee-base": "*" | ||
| 678 | + }, | ||
| 679 | + "type": "yii2-extension", | ||
| 680 | + "extra": { | ||
| 681 | + "branch-alias": { | ||
| 682 | + "dev-master": "1.0.x-dev" | ||
| 683 | + } | ||
| 684 | + }, | ||
| 685 | + "autoload": { | ||
| 686 | + "psr-4": { | ||
| 687 | + "kartik\\color\\": "" | ||
| 688 | + } | ||
| 689 | + }, | ||
| 690 | + "notification-url": "https://packagist.org/downloads/", | ||
| 691 | + "license": [ | ||
| 692 | + "BSD 3-Clause" | ||
| 693 | + ], | ||
| 694 | + "authors": [ | ||
| 695 | + { | ||
| 696 | + "name": "Kartik Visweswaran", | ||
| 697 | + "email": "kartikv2@gmail.com", | ||
| 698 | + "homepage": "http://www.krajee.com/" | ||
| 699 | + } | ||
| 700 | + ], | ||
| 701 | + "description": "An enhanced Yii 2 widget encapsulating the HTML 5 color input (sub repo split from yii2-widgets)", | ||
| 702 | + "homepage": "https://github.com/kartik-v/yii2-widget-colorinput", | ||
| 703 | + "keywords": [ | ||
| 704 | + "HTML5", | ||
| 705 | + "color", | ||
| 706 | + "extension", | ||
| 707 | + "form", | ||
| 708 | + "input", | ||
| 709 | + "jquery", | ||
| 710 | + "plugin", | ||
| 711 | + "widget", | ||
| 712 | + "yii2" | ||
| 713 | + ], | ||
| 714 | + "time": "2016-02-02 14:28:12" | ||
| 715 | + }, | ||
| 716 | + { | ||
| 663 | "name": "kartik-v/yii2-widget-select2", | 717 | "name": "kartik-v/yii2-widget-select2", |
| 664 | "version": "dev-master", | 718 | "version": "dev-master", |
| 665 | "source": { | 719 | "source": { |
| @@ -1228,7 +1282,7 @@ | @@ -1228,7 +1282,7 @@ | ||
| 1228 | }, | 1282 | }, |
| 1229 | "dist": { | 1283 | "dist": { |
| 1230 | "type": "zip", | 1284 | "type": "zip", |
| 1231 | - "url": "https://api.github.com/repos/yiisoft/yii2-composer/zipball/574dcb1d101ae55be230e0c00a2428af6ec4c5c1", | 1285 | + "url": "https://api.github.com/repos/yiisoft/yii2-composer/zipball/d33d1046a5951f2f7823fe343f28ddc58b3421a4", |
| 1232 | "reference": "574dcb1d101ae55be230e0c00a2428af6ec4c5c1", | 1286 | "reference": "574dcb1d101ae55be230e0c00a2428af6ec4c5c1", |
| 1233 | "shasum": "" | 1287 | "shasum": "" |
| 1234 | }, | 1288 | }, |
| @@ -1452,7 +1506,7 @@ | @@ -1452,7 +1506,7 @@ | ||
| 1452 | }, | 1506 | }, |
| 1453 | "dist": { | 1507 | "dist": { |
| 1454 | "type": "zip", | 1508 | "type": "zip", |
| 1455 | - "url": "https://api.github.com/repos/fzaninotto/Faker/zipball/b312ab9d0c446971069e22a524fec01c7cddc75e", | 1509 | + "url": "https://api.github.com/repos/fzaninotto/Faker/zipball/8d8e0e1a6151a46ea5cda344e2234b7225c61e7a", |
| 1456 | "reference": "b312ab9d0c446971069e22a524fec01c7cddc75e", | 1510 | "reference": "b312ab9d0c446971069e22a524fec01c7cddc75e", |
| 1457 | "shasum": "" | 1511 | "shasum": "" |
| 1458 | }, | 1512 | }, |
console/migrations/m160208_125956_user_info_add_status_fields.php
0 → 100644
| 1 | +<?php | ||
| 2 | + | ||
| 3 | +use yii\db\Migration; | ||
| 4 | + | ||
| 5 | +class m160208_125956_user_info_add_status_fields extends Migration | ||
| 6 | +{ | ||
| 7 | + public function up() | ||
| 8 | + { | ||
| 9 | + $this->addColumn('user_info', 'is_freelancer', $this->integer()); | ||
| 10 | + $this->addColumn('user_info', 'is_customer', $this->integer()); | ||
| 11 | + } | ||
| 12 | + | ||
| 13 | + public function down() | ||
| 14 | + { | ||
| 15 | + $this->dropColumn('user_info', 'is_freelancer'); | ||
| 16 | + $this->dropColumn('user_info', 'is_customer'); | ||
| 17 | + } | ||
| 18 | +} |
frontend/assets/AppAsset.php
| @@ -19,7 +19,7 @@ class AppAsset extends AssetBundle | @@ -19,7 +19,7 @@ class AppAsset extends AssetBundle | ||
| 19 | public $css = [ | 19 | public $css = [ |
| 20 | 'css/style.css', | 20 | 'css/style.css', |
| 21 | '/admin/css/flags32.css', | 21 | '/admin/css/flags32.css', |
| 22 | - //'https://fonts.googleapis.com/css?family=Roboto:400,700&subset=cyrillic,latin', | 22 | + 'https://fonts.googleapis.com/css?family=Roboto:400,700&subset=cyrillic,latin', |
| 23 | ]; | 23 | ]; |
| 24 | public $js = [ | 24 | public $js = [ |
| 25 | '/js/script.js', | 25 | '/js/script.js', |
frontend/controllers/SiteController.php
| @@ -55,9 +55,9 @@ class SiteController extends Controller | @@ -55,9 +55,9 @@ class SiteController extends Controller | ||
| 55 | $out = ['results' => ['id' => '', 'text' => '']]; | 55 | $out = ['results' => ['id' => '', 'text' => '']]; |
| 56 | if (!is_null($q)) { | 56 | if (!is_null($q)) { |
| 57 | $query = new Query; | 57 | $query = new Query; |
| 58 | - $query->select('id, name AS text') | 58 | + $query->select('name AS id, name AS text') |
| 59 | ->from('cities') | 59 | ->from('cities') |
| 60 | - ->where(['like', 'name', $q]) | 60 | + ->where(['like', 'name', mb_convert_case( $q,MB_CASE_TITLE, "UTF-8")]) |
| 61 | ->limit(20); | 61 | ->limit(20); |
| 62 | $command = $query->createCommand(); | 62 | $command = $query->createCommand(); |
| 63 | $data = $command->queryAll(); | 63 | $data = $command->queryAll(); |
| @@ -84,7 +84,7 @@ class SiteController extends Controller | @@ -84,7 +84,7 @@ class SiteController extends Controller | ||
| 84 | */ | 84 | */ |
| 85 | public function actionIndex() | 85 | public function actionIndex() |
| 86 | { | 86 | { |
| 87 | - $specializations = Specialization::find()->where(['specialization_pid'=>0])->all(); | 87 | + $specializations = Specialization::find()->where(['specialization_pid'=>0])->orderBy('specialization_id')->all(); |
| 88 | 88 | ||
| 89 | return $this->render('index',[ | 89 | return $this->render('index',[ |
| 90 | 'specializations' => $specializations, | 90 | 'specializations' => $specializations, |
| @@ -213,8 +213,11 @@ class SiteController extends Controller | @@ -213,8 +213,11 @@ class SiteController extends Controller | ||
| 213 | 213 | ||
| 214 | $user_info = new UserInfo(); | 214 | $user_info = new UserInfo(); |
| 215 | 215 | ||
| 216 | + $user_info->load(Yii::$app->request->post(),'SignupForm'); | ||
| 217 | + | ||
| 216 | $user_info->user_id = $user->id; | 218 | $user_info->user_id = $user->id; |
| 217 | 219 | ||
| 220 | + | ||
| 218 | $user_info->save(); | 221 | $user_info->save(); |
| 219 | 222 | ||
| 220 | if (Yii::$app->getUser()->login($user)) { | 223 | if (Yii::$app->getUser()->login($user)) { |
frontend/models/SignupForm.php
| @@ -18,6 +18,9 @@ class SignupForm extends Model | @@ -18,6 +18,9 @@ class SignupForm extends Model | ||
| 18 | public $verifyCode; | 18 | public $verifyCode; |
| 19 | public $location; | 19 | public $location; |
| 20 | public $type; | 20 | public $type; |
| 21 | + public $is_customer; | ||
| 22 | + public $is_freelancer; | ||
| 23 | + public $city; | ||
| 21 | 24 | ||
| 22 | /** | 25 | /** |
| 23 | * @inheritdoc | 26 | * @inheritdoc |
| @@ -30,7 +33,7 @@ class SignupForm extends Model | @@ -30,7 +33,7 @@ class SignupForm extends Model | ||
| 30 | ['username', 'unique', 'targetClass' => '\common\models\User', 'message' => 'This username has already been taken.'], | 33 | ['username', 'unique', 'targetClass' => '\common\models\User', 'message' => 'This username has already been taken.'], |
| 31 | ['username', 'string', 'min' => 2, 'max' => 255], | 34 | ['username', 'string', 'min' => 2, 'max' => 255], |
| 32 | 35 | ||
| 33 | - ['location', 'string', 'min' => 2, 'max' => 255], | 36 | + ['city', 'string', 'min' => 2, 'max' => 255], |
| 34 | 37 | ||
| 35 | ['email', 'filter', 'filter' => 'trim'], | 38 | ['email', 'filter', 'filter' => 'trim'], |
| 36 | ['email', 'required'], | 39 | ['email', 'required'], |
| @@ -41,6 +44,8 @@ class SignupForm extends Model | @@ -41,6 +44,8 @@ class SignupForm extends Model | ||
| 41 | ['verifyCode', 'captcha'], | 44 | ['verifyCode', 'captcha'], |
| 42 | 45 | ||
| 43 | ['type', 'integer'], | 46 | ['type', 'integer'], |
| 47 | + ['is_customer', 'integer'], | ||
| 48 | + ['is_freelancer', 'integer'], | ||
| 44 | 49 | ||
| 45 | ['password', 'required'], | 50 | ['password', 'required'], |
| 46 | ['password', 'string', 'min' => 6], | 51 | ['password', 'string', 'min' => 6], |
| @@ -67,5 +72,23 @@ class SignupForm extends Model | @@ -67,5 +72,23 @@ class SignupForm extends Model | ||
| 67 | 72 | ||
| 68 | return null; | 73 | return null; |
| 69 | } | 74 | } |
| 75 | + /** | ||
| 76 | + * @inheritdoc | ||
| 77 | + */ | ||
| 78 | + public function attributeLabels() | ||
| 79 | + { | ||
| 80 | + return [ | ||
| 81 | + 'username' => 'Логин', | ||
| 82 | + 'password' => 'Пароль', | ||
| 83 | + 'email' => 'E-mail', | ||
| 84 | + 'type' => Yii::t('app', 'Is Default'), | ||
| 85 | + 'firstname' => 'Имя', | ||
| 86 | + 'lastname' => 'Фамилия', | ||
| 87 | + 'city' => 'Город', | ||
| 88 | + 'alt_location' => 'Город не в списке', | ||
| 89 | + 'is_customer' => '', | ||
| 90 | + 'is_freelancer' => '', | ||
| 91 | + ]; | ||
| 92 | + } | ||
| 70 | 93 | ||
| 71 | } | 94 | } |
frontend/views/accounts/general.php
| @@ -95,6 +95,7 @@ | @@ -95,6 +95,7 @@ | ||
| 95 | ?> | 95 | ?> |
| 96 | </div> | 96 | </div> |
| 97 | </div> | 97 | </div> |
| 98 | + <div class="conacts-admin style">Контакты представителя:</div> | ||
| 98 | </div> | 99 | </div> |
| 99 | 100 | ||
| 100 | <div class="input-blocks-wrapper"> | 101 | <div class="input-blocks-wrapper"> |
| @@ -174,7 +175,7 @@ | @@ -174,7 +175,7 @@ | ||
| 174 | </div> | 175 | </div> |
| 175 | </div> | 176 | </div> |
| 176 | </div> | 177 | </div> |
| 177 | - <div class="input-blocks-wrapper border-general"> | 178 | + <div class="input-blocks-wrapper border-general fix-marg"> |
| 178 | <div class="input-blocks weight-normal"> | 179 | <div class="input-blocks weight-normal"> |
| 179 | <div class="gen-admin-title">Статус:</div> | 180 | <div class="gen-admin-title">Статус:</div> |
| 180 | <?= $form->field ($user_info, 'busy') | 181 | <?= $form->field ($user_info, 'busy') |
| @@ -201,6 +202,7 @@ | @@ -201,6 +202,7 @@ | ||
| 201 | <div class="style border-general"> | 202 | <div class="style border-general"> |
| 202 | <div class="input-blocks-wrapper admin-avatar"> | 203 | <div class="input-blocks-wrapper admin-avatar"> |
| 203 | <div class="gen-admin-title">Аватар</div> | 204 | <div class="gen-admin-title">Аватар</div> |
| 205 | + <div class="file-help-1"><div>Формат: PNG, JPG, GIF<br />Размер: 180x180 px<br />Файлы большего размера и других пропорций будут конвертироваться</div></div> | ||
| 204 | <?= ImageUploader::widget([ | 206 | <?= ImageUploader::widget([ |
| 205 | 'model'=> $user_info, | 207 | 'model'=> $user_info, |
| 206 | 'field'=>'image', | 208 | 'field'=>'image', |
| @@ -230,7 +232,7 @@ | @@ -230,7 +232,7 @@ | ||
| 230 | </div> | 232 | </div> |
| 231 | 233 | ||
| 232 | 234 | ||
| 233 | - <div class="input-blocks-wrapper"> | 235 | + <div class="input-blocks-wrapper fix-marg"> |
| 234 | <div class="input-blocks weight-normal"> | 236 | <div class="input-blocks weight-normal"> |
| 235 | <div class="gen-admin-title">Членство в МФП</div> | 237 | <div class="gen-admin-title">Членство в МФП</div> |
| 236 | <div class="admin-fix-mfp"> | 238 | <div class="admin-fix-mfp"> |
frontend/views/layouts/admin.php
| @@ -60,12 +60,12 @@ $this->beginContent('@app/views/layouts/main.php'); | @@ -60,12 +60,12 @@ $this->beginContent('@app/views/layouts/main.php'); | ||
| 60 | ], | 60 | ], |
| 61 | [ | 61 | [ |
| 62 | 'label' => 'Портфолио', | 62 | 'label' => 'Портфолио', |
| 63 | - 'url' => ['accounts/portfolio'], | 63 | + 'url' => ['accounts/portfolio-create'], |
| 64 | ], | 64 | ], |
| 65 | 65 | ||
| 66 | [ | 66 | [ |
| 67 | 'label' => 'Блог', | 67 | 'label' => 'Блог', |
| 68 | - 'url' => ['accounts/'], | 68 | + 'url' => ['accounts/blog-create'], |
| 69 | ], | 69 | ], |
| 70 | [ | 70 | [ |
| 71 | 'label' => 'Галерея', | 71 | 'label' => 'Галерея', |
frontend/views/layouts/main.php
| @@ -45,11 +45,19 @@ AppAsset::register($this); | @@ -45,11 +45,19 @@ AppAsset::register($this); | ||
| 45 | <div class="header-cabinet-wr"> | 45 | <div class="header-cabinet-wr"> |
| 46 | <?php | 46 | <?php |
| 47 | if (Yii::$app->user->isGuest): ?> | 47 | if (Yii::$app->user->isGuest): ?> |
| 48 | - <div class="header-cabinet-foto"><img src="/images/ded-ico.png" alt=""/></div> | ||
| 49 | - <div class="header-cabinet-profile">Профиль</div> | ||
| 50 | - <?= Html::a('Личный кабинет',['/site/login']) ?> | 48 | + <div class="header-cabinet-foto"> |
| 49 | +<!-- <img src="/images/ded-ico.png" alt=""/>--> | ||
| 50 | + </div> | ||
| 51 | + <div class="header-cabinet-profile not-login">Профиль</div> | ||
| 52 | + <div> | ||
| 53 | + <?= Html::a('Вход',['/site/login']) ?> | ||
| 54 | + <?= Html::a('Регистрация',['/site/registration']) ?> | ||
| 55 | + </div> | ||
| 56 | + | ||
| 51 | <?php else : ?> | 57 | <?php else : ?> |
| 52 | - <div class="header-cabinet-foto"><img src="/images/ded-ico.png" alt=""/></div> | 58 | + <div class="header-cabinet-foto"> |
| 59 | + <img src="/images/ded-ico.png" alt=""/> | ||
| 60 | + </div> | ||
| 53 | <div class="header-cabinet-profile">Профиль</div> | 61 | <div class="header-cabinet-profile">Профиль</div> |
| 54 | <?= Html::a(Yii::$app->user->identity->email,['accounts/cabinet']) ?> | 62 | <?= Html::a(Yii::$app->user->identity->email,['accounts/cabinet']) ?> |
| 55 | <?php endif; ?> | 63 | <?php endif; ?> |
frontend/views/site/registration.php
| @@ -71,15 +71,17 @@ | @@ -71,15 +71,17 @@ | ||
| 71 | 71 | ||
| 72 | 72 | ||
| 73 | <div class="check-radio-wr"> | 73 | <div class="check-radio-wr"> |
| 74 | - <div class="custom-form-buttons"> | ||
| 75 | - <input class="custom-check" id="custom-check-1" type="checkbox" checked> | ||
| 76 | - <label for="custom-check-1"><span></span>Я - Фрилансер</label> | ||
| 77 | - </div> | ||
| 78 | - | ||
| 79 | - <div class="custom-form-buttons"> | ||
| 80 | - <input class="custom-check" id="custom-check-2" type="checkbox"> | ||
| 81 | - <label for="custom-check-2"><span></span>Я - Заказчик</label> | ||
| 82 | - </div> | 74 | + <?= $form->field($model, 'is_freelancer', [ 'template' => "{input}\n{label}\n{error}" , 'options'=>['class'=>'custom-form-buttons'] ]) |
| 75 | + ->label('<span></span>Я - Фрилансер') | ||
| 76 | + ->checkbox([ | ||
| 77 | + 'class' => 'custom-check', | ||
| 78 | + ], false); ?> | ||
| 79 | + | ||
| 80 | + <?= $form->field($model, 'is_customer', [ 'template' => "{input}\n{label}\n{error}", 'options'=>['class'=>'custom-form-buttons'] ]) | ||
| 81 | + ->label('<span></span>Я - заказчик') | ||
| 82 | + ->checkbox([ | ||
| 83 | + 'class' => 'custom-check', | ||
| 84 | + ], false); ?> | ||
| 83 | </div> | 85 | </div> |
| 84 | 86 | ||
| 85 | 87 | ||
| @@ -93,25 +95,29 @@ | @@ -93,25 +95,29 @@ | ||
| 93 | <?= $form->field($model, 'lastname')->textInput(['class'=>'custom-input-2'])?> | 95 | <?= $form->field($model, 'lastname')->textInput(['class'=>'custom-input-2'])?> |
| 94 | </div> | 96 | </div> |
| 95 | </div> | 97 | </div> |
| 98 | + <div class="input-blocks-wrapper"> | ||
| 99 | + <div class="input-blocks"> | ||
| 100 | + <?= | ||
| 101 | + $form->field($model, 'city')->widget(Select2::classname(), [ | ||
| 102 | + 'options' => ['placeholder' => 'Выбор города ...'], | ||
| 103 | + 'pluginOptions' => [ | ||
| 104 | + 'allowClear' => true, | ||
| 105 | + 'minimumInputLength' => 3, | ||
| 106 | + 'ajax' => [ | ||
| 107 | + 'url' => \yii\helpers\Url::to(['site/city']), | ||
| 108 | + 'dataType' => 'json', | ||
| 109 | + 'data' => new JsExpression('function(params) { return {q:params.term}; }') | ||
| 110 | + ], | ||
| 111 | + 'escapeMarkup' => new JsExpression('function (markup) { return markup; }'), | ||
| 112 | + 'templateResult' => new JsExpression('function(city) { return city.text; }'), | ||
| 113 | + 'templateSelection' => new JsExpression('function (city) { return city.text; }'), | ||
| 114 | + ], | ||
| 115 | + ]); | ||
| 116 | + ?> | ||
| 117 | + </div> | ||
| 118 | + </div> | ||
| 96 | 119 | ||
| 97 | - <?= | ||
| 98 | - $form->field($model, 'location')->widget(Select2::classname(), [ | ||
| 99 | - 'options' => ['placeholder' => 'Search for a city ...'], | ||
| 100 | - 'pluginOptions' => [ | ||
| 101 | - 'allowClear' => true, | ||
| 102 | - 'minimumInputLength' => 3, | ||
| 103 | - 'ajax' => [ | ||
| 104 | - 'url' => \yii\helpers\Url::to(['site/city']), | ||
| 105 | - 'dataType' => 'json', | ||
| 106 | - 'data' => new JsExpression('function(params) { return {q:params.term}; }') | ||
| 107 | - ], | ||
| 108 | - 'escapeMarkup' => new JsExpression('function (markup) { return markup; }'), | ||
| 109 | - 'templateResult' => new JsExpression('function(city) { return city.text; }'), | ||
| 110 | - 'templateSelection' => new JsExpression('function (city) { return city.text; }'), | ||
| 111 | - ], | ||
| 112 | - ]); | ||
| 113 | - ?> | ||
| 114 | - | 120 | + |
| 115 | 121 | ||
| 116 | 122 | ||
| 117 | 123 | ||
| @@ -122,22 +128,24 @@ | @@ -122,22 +128,24 @@ | ||
| 122 | </div> | 128 | </div> |
| 123 | <div class="form-help-two">Если вашего города нет в списке, введите его. </div> | 129 | <div class="form-help-two">Если вашего города нет в списке, введите его. </div> |
| 124 | </div> | 130 | </div> |
| 125 | - <div class="input-blocks-wrapper"> | ||
| 126 | - <?= $form->field($model, 'verifyCode')->widget(Captcha::className(), [ | ||
| 127 | - 'template' => ' | ||
| 128 | - <div class="input-blocks-wrapper"> | ||
| 129 | - <div class="input-blocks"> | ||
| 130 | - <label for="input-txt-8">Введите проверочный код</label> | ||
| 131 | - {input} | 131 | + <div class="input-blocks-wrapper captcha-wr"> |
| 132 | + <?= $form->field($model, 'verifyCode')->widget(Captcha::className(), [ | ||
| 133 | + 'options' => ['class' => 'custom-input-2'], | ||
| 134 | + 'template' => ' | ||
| 135 | + <div class="input-blocks-wrapper captcha"> | ||
| 136 | + <div class="input-blocks-captcha"> | ||
| 137 | + {image} | ||
| 138 | + </div> | ||
| 132 | </div> | 139 | </div> |
| 133 | - </div> | ||
| 134 | - <div class="input-blocks-wrapper captcha"> | ||
| 135 | - <div class="input-blocks-captcha"> | ||
| 136 | - {image} | 140 | + <div class="input-blocks-wrapper"> |
| 141 | + <div class="input-blocks"> | ||
| 142 | + <label for="signupform-verifycode">Введите проверочный код</label> | ||
| 143 | + {input} | ||
| 144 | + </div> | ||
| 137 | </div> | 145 | </div> |
| 138 | - </div>', | ||
| 139 | - ])->label(false) ?> | ||
| 140 | - </div> | 146 | + ', |
| 147 | + ])->label(false) ?> | ||
| 148 | + </div> | ||
| 141 | <div class="input-blocks-wrapper button"> | 149 | <div class="input-blocks-wrapper button"> |
| 142 | <button type="submit" value="Submit">Зарегистрироваться</button> | 150 | <button type="submit" value="Submit">Зарегистрироваться</button> |
| 143 | </div> | 151 | </div> |
frontend/web/css/style.css
| @@ -7,6 +7,7 @@ body { | @@ -7,6 +7,7 @@ body { | ||
| 7 | font-weight: 400; | 7 | font-weight: 400; |
| 8 | font-size: 15px; | 8 | font-size: 15px; |
| 9 | color: #333; | 9 | color: #333; |
| 10 | + line-height: 1.2; | ||
| 10 | } | 11 | } |
| 11 | img { | 12 | img { |
| 12 | border: none; | 13 | border: none; |
| @@ -4911,8 +4912,8 @@ input.disabled.admin-check:checked + label, input.disabled.admin-check:checked + | @@ -4911,8 +4912,8 @@ input.disabled.admin-check:checked + label, input.disabled.admin-check:checked + | ||
| 4911 | padding-left: 8px; | 4912 | padding-left: 8px; |
| 4912 | } | 4913 | } |
| 4913 | .help-block { | 4914 | .help-block { |
| 4914 | - width: 330px; | ||
| 4915 | - margin-left: -20px; | 4915 | + width: 320px; |
| 4916 | + margin-left: -10px; | ||
| 4916 | text-align: center; | 4917 | text-align: center; |
| 4917 | position: relative; | 4918 | position: relative; |
| 4918 | border: 1px solid #c1c1c1; | 4919 | border: 1px solid #c1c1c1; |
| @@ -4921,7 +4922,8 @@ input.disabled.admin-check:checked + label, input.disabled.admin-check:checked + | @@ -4921,7 +4922,8 @@ input.disabled.admin-check:checked + label, input.disabled.admin-check:checked + | ||
| 4921 | padding: 15px 0; | 4922 | padding: 15px 0; |
| 4922 | display: none; | 4923 | display: none; |
| 4923 | } | 4924 | } |
| 4924 | -.has-error .help-block {display: block} | 4925 | +.input-blocks-wrapper.captcha-wr .help-block {float: left} |
| 4926 | +.has-error .help-block {display: block ;color: inherit} | ||
| 4925 | .help-block:before { | 4927 | .help-block:before { |
| 4926 | content: ''; | 4928 | content: ''; |
| 4927 | width: 20px; | 4929 | width: 20px; |
| @@ -4957,7 +4959,7 @@ input.disabled.admin-check:checked + label, input.disabled.admin-check:checked + | @@ -4957,7 +4959,7 @@ input.disabled.admin-check:checked + label, input.disabled.admin-check:checked + | ||
| 4957 | left: -15px; | 4959 | left: -15px; |
| 4958 | width: 15px; | 4960 | width: 15px; |
| 4959 | } | 4961 | } |
| 4960 | - | 4962 | +.has-success label {color: inherit !important;} |
| 4961 | .input-blocks .has-success:before { | 4963 | .input-blocks .has-success:before { |
| 4962 | 4964 | ||
| 4963 | } | 4965 | } |
| @@ -5318,6 +5320,7 @@ ul.menu-admin li.logout-li, ul.menu-admin li.logout-li a, ul.menu-admin li:last- | @@ -5318,6 +5320,7 @@ ul.menu-admin li.logout-li, ul.menu-admin li.logout-li a, ul.menu-admin li:last- | ||
| 5318 | color: #fff; | 5320 | color: #fff; |
| 5319 | font-size: 13px; | 5321 | font-size: 13px; |
| 5320 | } | 5322 | } |
| 5323 | +.select2-selection__rendered{padding-right: 23px; box-sizing: border-box} | ||
| 5321 | .select2-container--krajee .select2-search--dropdown .select2-search__field {border-radius: 0} | 5324 | .select2-container--krajee .select2-search--dropdown .select2-search__field {border-radius: 0} |
| 5322 | .select2-container--krajee .select2-dropdown {margin-top: -6px} | 5325 | .select2-container--krajee .select2-dropdown {margin-top: -6px} |
| 5323 | .has-success.select2-container--krajee .select2-dropdown, .has-success .select2-container--krajee .select2-selection, .select2-container--krajee .select2-dropdown { | 5326 | .has-success.select2-container--krajee .select2-dropdown, .has-success .select2-container--krajee .select2-selection, .select2-container--krajee .select2-dropdown { |
| @@ -5335,16 +5338,21 @@ ul.menu-admin li.logout-li, ul.menu-admin li.logout-li a, ul.menu-admin li:last- | @@ -5335,16 +5338,21 @@ ul.menu-admin li.logout-li, ul.menu-admin li.logout-li a, ul.menu-admin li:last- | ||
| 5335 | border-color: #dcdcdc; | 5338 | border-color: #dcdcdc; |
| 5336 | box-shadow: none; | 5339 | box-shadow: none; |
| 5337 | } | 5340 | } |
| 5341 | +.select2-container .select2-selection--single .select2-selection__clear{margin-top: 3px;margin-right: 0} | ||
| 5338 | 5342 | ||
| 5343 | +.select2-results__option.select2-results__message {padding-right: 0 !important;} | ||
| 5339 | 5344 | ||
| 5340 | - | ||
| 5341 | - | ||
| 5342 | - | ||
| 5343 | - | ||
| 5344 | - | ||
| 5345 | - | ||
| 5346 | - | ||
| 5347 | - | ||
| 5348 | - | ||
| 5349 | - | ||
| 5350 | -/*end-select-new*/ | ||
| 5351 | \ No newline at end of file | 5345 | \ No newline at end of file |
| 5346 | +.select2-selection__rendered {margin-right: 30px} | ||
| 5347 | +/*end-select-new*/ | ||
| 5348 | +.fix-marg {margin-top: 17px} | ||
| 5349 | +.conacts-admin { | ||
| 5350 | + font-size: 13px; | ||
| 5351 | + margin-top: 11px; | ||
| 5352 | + color: #b7b7b7} | ||
| 5353 | +.header-cabinet-profile.not-login { | ||
| 5354 | + margin-top: -3px; | ||
| 5355 | +} | ||
| 5356 | +.header-cabinet-profile.not-login > div {width: 116px; float: right} | ||
| 5357 | +.admin-avatar .file-uploader-block {width: 180px; float: left} | ||
| 5358 | +.admin-pattern.admin-avatar .file-uploader-block {width: 100%} | ||
| 5359 | +.file-help-1 {width: 520px; float: right;height: 130px} | ||
| 5352 | \ No newline at end of file | 5360 | \ No newline at end of file |