Commit 5860e30d267f3bd424389473a1f3f4958919c26d
Merge remote-tracking branch 'origin/master'
# Conflicts: # frontend/views/accounts/general.php
Showing
4 changed files
with
142 additions
and
88 deletions
Show diff stats
backend/web/js/option.js
| @@ -17,6 +17,7 @@ function checkboxerInit() { | @@ -17,6 +17,7 @@ function checkboxerInit() { | ||
| 17 | $(value).trigger('change'); | 17 | $(value).trigger('change'); |
| 18 | }); | 18 | }); |
| 19 | } | 19 | } |
| 20 | + | ||
| 20 | function accountRedraw() { | 21 | function accountRedraw() { |
| 21 | var type = $('input[name="User[type]"]:checked').val(); | 22 | var type = $('input[name="User[type]"]:checked').val(); |
| 22 | console.log(type); | 23 | console.log(type); |
| @@ -26,6 +27,7 @@ function accountRedraw() { | @@ -26,6 +27,7 @@ function accountRedraw() { | ||
| 26 | $('#form_definition').addClass('form_for_company'); | 27 | $('#form_definition').addClass('form_for_company'); |
| 27 | } | 28 | } |
| 28 | } | 29 | } |
| 30 | + | ||
| 29 | $(function() { | 31 | $(function() { |
| 30 | var counter = 0; | 32 | var counter = 0; |
| 31 | $(document).on('click', '.add_row', function() { | 33 | $(document).on('click', '.add_row', function() { |
common/config/.gitignore
frontend/views/accounts/general.php
| @@ -14,12 +14,13 @@ | @@ -14,12 +14,13 @@ | ||
| 14 | use \common\widgets\MultiLangForm; | 14 | use \common\widgets\MultiLangForm; |
| 15 | 15 | ||
| 16 | $this->title = 'Учетные данные'; | 16 | $this->title = 'Учетные данные'; |
| 17 | - $this->params[ 'breadcrumbs' ][] = $this->title; | 17 | + $this->params['breadcrumbs'][] = $this->title; |
| 18 | ?> | 18 | ?> |
| 19 | <div class="login-left-column-title"><?= $this->title ?></div> | 19 | <div class="login-left-column-title"><?= $this->title ?></div> |
| 20 | 20 | ||
| 21 | <div class="" id="form_definition"> | 21 | <div class="" id="form_definition"> |
| 22 | <?php $form = ActiveForm::begin(); ?> | 22 | <?php $form = ActiveForm::begin(); ?> |
| 23 | + | ||
| 23 | <div class="general-check-wr style"> | 24 | <div class="general-check-wr style"> |
| 24 | <div class="general-check"> | 25 | <div class="general-check"> |
| 25 | 26 | ||
| @@ -54,97 +55,139 @@ | @@ -54,97 +55,139 @@ | ||
| 54 | <div class="general-who style border-general"> | 55 | <div class="general-who style border-general"> |
| 55 | <div class="general-who-title gen-admin-title">Кто вы:</div> | 56 | <div class="general-who-title gen-admin-title">Кто вы:</div> |
| 56 | 57 | ||
| 57 | - <?= $form->field($user, 'type') | ||
| 58 | - ->label(false) | ||
| 59 | - ->radioList([ | ||
| 60 | - 1 => 'Частное лицо', | ||
| 61 | - 2 => 'Компания', | ||
| 62 | - ], [ | ||
| 63 | - 'item' => function($index, $label, $name, $checked, $value) { | ||
| 64 | - $return = '<label>'; | ||
| 65 | - $return .= '<input type="radio" name="' . $name . '" value="' . $value . '" ' . ( $checked ? "checked" : "" ) . ' >'; | ||
| 66 | - $return .= '<span></span>' . ucwords($label); | ||
| 67 | - $return .= '</label>'; | ||
| 68 | - | ||
| 69 | - return $return; | ||
| 70 | - }, | ||
| 71 | - ]); ?> | 58 | + <?= $form->field ($user, 'type') |
| 59 | + ->label (false) | ||
| 60 | + ->radioList ( | ||
| 61 | + [1 => 'Частное лицо', 2 => 'Компания'], | ||
| 62 | + [ | ||
| 63 | + 'item' => function($index, $label, $name, $checked, $value) { | ||
| 64 | + $return = '<div class="admin-who-check">'; | ||
| 65 | + $return .= '<input class="custom-radio" id="select_admin_'.$value.'" type="radio" name="' . $name . '" value="' . $value . '" '.($checked ? "checked" :"").' >'; | ||
| 66 | + $return .= '<label for="select_admin_'.$value.'" >'; | ||
| 67 | + $return .= '<span></span>' . ucwords($label); | ||
| 68 | + $return .= '</label>'; | ||
| 69 | + $return .= '</div>'; | ||
| 70 | + return $return; | ||
| 71 | + } | ||
| 72 | + ] | ||
| 73 | + ); | ||
| 74 | + ?> | ||
| 72 | 75 | ||
| 73 | 76 | ||
| 74 | </div> | 77 | </div> |
| 78 | + <div class="input-blocks-wrapper"> | ||
| 79 | + <div class="input-blocks"> | ||
| 80 | + <?= $form->field ($company_info, 'name', ['options' => ['class' => 'form-group company_info']]) | ||
| 81 | + ->label ('Название компании') | ||
| 82 | + ->textInput (['class'=> 'custom-input-2']); | ||
| 83 | + ?> | ||
| 84 | + </div> | ||
| 85 | + </div> | ||
| 86 | + <div class="input-blocks-wrapper"> | ||
| 87 | + <div class="input-blocks"> | ||
| 88 | + <?= $form->field ($company_info, 'staff', ['options' => ['class' => 'form-group company_info']]) | ||
| 89 | + ->label ('Количество сотрудников') | ||
| 90 | + ->textInput (['class'=> 'custom-input-2','type'=>'number']); | ||
| 91 | + ?> | ||
| 92 | + </div> | ||
| 93 | + </div> | ||
| 75 | 94 | ||
| 76 | - <?= $form->field($company_info, 'name', [ 'options' => [ 'class' => 'form-group company_info' ] ]) | ||
| 77 | - ->label('Название компании') | ||
| 78 | - ->textInput(); ?> | ||
| 79 | - <?= $form->field($company_info, 'staff', [ 'options' => [ 'class' => 'form-group company_info' ] ]) | ||
| 80 | - ->label('Количество сотрудников') | ||
| 81 | - ->input('number'); ?> | ||
| 82 | - <?= '<div class="company_info">Контакты представителя</div>'; ?> | ||
| 83 | - | 95 | + <div class="input-blocks-wrapper"> |
| 96 | + <div class="input-blocks"> | ||
| 97 | + <?= $form->field ($user, 'firstname') | ||
| 98 | + ->label ('Имя') | ||
| 99 | + ->textInput (['class'=> 'custom-input-2']); | ||
| 100 | + ?> | ||
| 101 | + </div> | ||
| 102 | + </div> | ||
| 84 | 103 | ||
| 85 | <div class="input-blocks-wrapper"> | 104 | <div class="input-blocks-wrapper"> |
| 86 | <div class="input-blocks"> | 105 | <div class="input-blocks"> |
| 87 | - <?= $form->field($user, 'firstname') | ||
| 88 | - ->label('Имя') | ||
| 89 | - ->textInput(); ?> | 106 | + <?= $form->field ($user, 'lastname') |
| 107 | + ->label ('Фамилия') | ||
| 108 | + ->textInput (['class'=> 'custom-input-2']); | ||
| 109 | + ?> | ||
| 90 | </div> | 110 | </div> |
| 91 | </div> | 111 | </div> |
| 112 | + <div class="input-blocks-wrapper"> | ||
| 113 | + <div class="input-blocks"> | ||
| 114 | + <?= $form->field ($user_info, 'country') | ||
| 115 | + ->label ('Ваша страна') | ||
| 116 | + ->textInput (['class'=> 'custom-input-2']); | ||
| 117 | + ?> | ||
| 118 | + </div> | ||
| 119 | + </div> | ||
| 120 | + <div class="input-blocks-wrapper"> | ||
| 121 | + <div class="input-blocks"> | ||
| 122 | + <?= $form->field ($user_info, 'city') | ||
| 123 | + ->label ('Ваш город') | ||
| 124 | + ->textInput (['class'=> 'custom-input-2']); | ||
| 125 | + ?> | ||
| 126 | + </div> | ||
| 127 | + </div> | ||
| 128 | + <div class="input-blocks-wrapper"> | ||
| 129 | + <div class="input-blocks"> | ||
| 130 | + <?= $form->field ($company_info, 'street', ['options' => ['class' => 'form-group company_info']]) | ||
| 131 | + ->label ('Улица') | ||
| 132 | + ->textInput (['class'=> 'custom-input-2']); | ||
| 133 | + ?> | ||
| 134 | + </div> | ||
| 135 | + </div> | ||
| 136 | + <div class="input-blocks-wrapper"> | ||
| 137 | + <div class="input-blocks"> | ||
| 138 | + <?= $form->field ($company_info, 'house', ['options' => ['class' => 'form-group company_info']]) | ||
| 139 | + ->label ('Дом') | ||
| 140 | + ->textInput (['class'=> 'custom-input-2']); | ||
| 141 | + ?> | ||
| 142 | + </div> | ||
| 143 | + </div> | ||
| 144 | + <div class="input-blocks-wrapper"> | ||
| 145 | + <div class="input-blocks"> | ||
| 146 | + <?= $form->field ($user, 'email') | ||
| 147 | + ->label ('Email') | ||
| 148 | + ->textInput (['class'=> 'custom-input-2','disabled' => 'disabled']); | ||
| 149 | + ?> | ||
| 92 | 150 | ||
| 93 | - <?= $form->field($user, 'lastname') | ||
| 94 | - ->label('Фамилия') | ||
| 95 | - ->textInput(); ?> | ||
| 96 | - <?= $form->field($user_info, 'country') | ||
| 97 | - ->label('Ваша страна') | ||
| 98 | - ->textInput(); ?> | ||
| 99 | - <?= $form->field($user_info, 'city') | ||
| 100 | - ->label('Ваш город') | ||
| 101 | - ->textInput(); ?> | ||
| 102 | - <?= $form->field($company_info, 'street', [ 'options' => [ 'class' => 'form-group company_info' ] ]) | ||
| 103 | - ->label('Улица') | ||
| 104 | - ->textInput(); ?> | ||
| 105 | - <?= $form->field($company_info, 'house', [ 'options' => [ 'class' => 'form-group company_info' ] ]) | ||
| 106 | - ->label('Дом') | ||
| 107 | - ->textInput(); ?> | ||
| 108 | - <?= $form->field($user, 'email') | ||
| 109 | - ->label('Email') | ||
| 110 | - ->textInput([ 'disabled' => 'disabled' ]); ?> | ||
| 111 | - <?= $form->field($company_info, 'hide_mail', [ | ||
| 112 | - 'options' => [ 'class' => 'form-group company_info' ], | ||
| 113 | - 'template' => "{input}{label}\n{hint}\n{error}", | ||
| 114 | - ]) | ||
| 115 | - ->label('Не публиковать Email') | ||
| 116 | - ->checkbox([ 'checked' => 'checked' ], false); ?> | ||
| 117 | - <?= $form->field($user_info, 'busy') | ||
| 118 | - ->label('Статус') | ||
| 119 | - ->radioList([ | ||
| 120 | - 0 => 'Свободен', | ||
| 121 | - 1 => 'Занят', | ||
| 122 | - ]); ?> | ||
| 123 | - <?= $form->field($user_info, 'member') | ||
| 124 | - ->label('Членство в МФП') | ||
| 125 | - ->hint('Выберите если хотите стать членом МФП и наш менеджер свяжется с Вами.') | ||
| 126 | - ->radioList([ | ||
| 127 | - 0 => 'Не хочу', | ||
| 128 | - 1 => 'Хочу стать', | ||
| 129 | - ]); ?> | ||
| 130 | - <?= ImageUploader::widget([ | ||
| 131 | - 'model' => $user_info, | ||
| 132 | - 'field' => 'image', | ||
| 133 | - 'width' => 100, | ||
| 134 | - 'height' => 100, | ||
| 135 | - 'multi' => false, | ||
| 136 | - 'gallery' => $user_info->image, | ||
| 137 | - 'name' => 'Загрузить аватар', | ||
| 138 | - ]); ?> | ||
| 139 | - <?= ImageUploader::widget([ | ||
| 140 | - 'model' => $user_info, | ||
| 141 | - 'field' => 'poster', | ||
| 142 | - 'width' => 1200, | ||
| 143 | - 'height' => 600, | ||
| 144 | - 'multi' => false, | ||
| 145 | - 'gallery' => $user_info->poster, | ||
| 146 | - 'name' => 'Загрузить постер', | ||
| 147 | - ]); ?> | ||
| 148 | - <?= Html::submitButton('Обновить', [ 'class' => 'btn btn-primary' ]); | ||
| 149 | - $form->end(); ?> | 151 | + <?= $form->field ($company_info, 'hide_mail', ['options' => ['class' => 'form-group company_info'], 'template' => "{input}{label}\n{hint}\n{error}"]) |
| 152 | + ->label ('Не публиковать Email') | ||
| 153 | + ->checkbox (['checked'=>'checked'], false); | ||
| 154 | + ?> | ||
| 155 | + </div> | ||
| 156 | + </div> | ||
| 157 | + <?= $form->field ($user_info, 'busy') | ||
| 158 | + ->label ('Статус') | ||
| 159 | + ->radioList ([0 => 'Свободен', 1 => 'Занят']); | ||
| 160 | + ?> | ||
| 161 | + <?= $form->field ($user_info, 'member') | ||
| 162 | + ->label ('Членство в МФП') | ||
| 163 | + ->hint ('Выберите если хотите стать членом МФП и наш менеджер свяжется с Вами.') | ||
| 164 | + ->radioList ([0 => 'Не хочу', 1 => 'Хочу стать']); | ||
| 165 | + ?> | ||
| 166 | + <?= ImageUploader::widget([ | ||
| 167 | + 'model'=> $user_info, | ||
| 168 | + 'field'=>'image', | ||
| 169 | + 'width'=>100, | ||
| 170 | + 'height'=>100, | ||
| 171 | + 'multi'=>false, | ||
| 172 | + 'gallery' =>$user_info->image, | ||
| 173 | + 'name' => 'Загрузить аватар' | ||
| 174 | + ]); | ||
| 175 | + ?> | ||
| 176 | + <?= ImageUploader::widget([ | ||
| 177 | + 'model'=> $user_info, | ||
| 178 | + 'field'=>'poster', | ||
| 179 | + 'width'=>1200, | ||
| 180 | + 'height'=>600, | ||
| 181 | + 'multi'=>false, | ||
| 182 | + 'gallery' =>$user_info->poster, | ||
| 183 | + 'name' => 'Загрузить постер' | ||
| 184 | + ]); | ||
| 185 | + ?> | ||
| 186 | + <div class="input-blocks-wrapper"> | ||
| 187 | + <div class="input-blocks"> | ||
| 188 | + <?= Html::submitButton('Обновить', ['class' => 'input-blocks-wrapper button']); | ||
| 189 | + $form->end (); | ||
| 190 | + ?> | ||
| 191 | + </div> | ||
| 192 | + </div> | ||
| 150 | </div> | 193 | </div> |
frontend/web/css/style.css
| @@ -5105,6 +5105,7 @@ ul.menu-admin li.logout-li, ul.menu-admin li.logout-li a, ul.menu-admin li:last- | @@ -5105,6 +5105,7 @@ ul.menu-admin li.logout-li, ul.menu-admin li.logout-li a, ul.menu-admin li:last- | ||
| 5105 | .form-group{margin-bottom: 0} | 5105 | .form-group{margin-bottom: 0} |
| 5106 | .border-general { | 5106 | .border-general { |
| 5107 | border-bottom: 1px solid #dbdbdb; | 5107 | border-bottom: 1px solid #dbdbdb; |
| 5108 | + padding-bottom: 27px; | ||
| 5108 | } | 5109 | } |
| 5109 | .general-check-wr {padding-top: 20px} | 5110 | .general-check-wr {padding-top: 20px} |
| 5110 | .general-check-left { | 5111 | .general-check-left { |
| @@ -5127,9 +5128,18 @@ ul.menu-admin li.logout-li, ul.menu-admin li.logout-li a, ul.menu-admin li:last- | @@ -5127,9 +5128,18 @@ ul.menu-admin li.logout-li, ul.menu-admin li.logout-li a, ul.menu-admin li:last- | ||
| 5127 | vertical-align: middle; | 5128 | vertical-align: middle; |
| 5128 | height: 19px; | 5129 | height: 19px; |
| 5129 | } | 5130 | } |
| 5130 | - | 5131 | +.general-check input.custom-check + label span {margin-top: 4px;} |
| 5131 | .gen-admin-title { | 5132 | .gen-admin-title { |
| 5132 | font-size: 18px; | 5133 | font-size: 18px; |
| 5133 | color: inherit; | 5134 | color: inherit; |
| 5134 | } | 5135 | } |
| 5135 | -.general-who-title {margin-top: 49px} | ||
| 5136 | \ No newline at end of file | 5136 | \ No newline at end of file |
| 5137 | +.general-who-title {margin-top: 49px} | ||
| 5138 | +.admin-who-check { | ||
| 5139 | + height: 21px; | ||
| 5140 | + width: 100%; | ||
| 5141 | + float: left; | ||
| 5142 | + margin-top: 4px; | ||
| 5143 | +} | ||
| 5144 | +.admin-who-check input.custom-radio + label span{ | ||
| 5145 | + margin-top: 5px; | ||
| 5146 | +} |