51e0a262
Yarik
test
|
1
2
3
4
5
6
7
|
<?php
/**
* @var UserInfo $user_info
* @var User $user
* @var CompanyInfo $company_info
*/
use common\models\CompanyInfo;
|
51e0a262
Yarik
test
|
8
|
use common\models\Option;
|
51e0a262
Yarik
test
|
9
10
|
use common\models\User;
use common\models\UserInfo;
|
8c448b56
Administrator
add yii jquery
|
11
|
use common\modules\file\widgets\ImageUploader;
|
51e0a262
Yarik
test
|
12
13
|
use yii\helpers\Html;
use yii\widgets\ActiveForm;
|
51e0a262
Yarik
test
|
14
|
use \common\widgets\MultiLangForm;
|
3364fb6a
Виталий
tokar commit
|
15
16
|
use kartik\select2\Select2;
use yii\web\JsExpression;
|
51e0a262
Yarik
test
|
17
18
|
$this->title = 'Учетные данные';
|
229730f9
Yarik
test
|
19
|
$this->params[ 'breadcrumbs' ][] = $this->title;
|
51e0a262
Yarik
test
|
20
|
?>
|
d8e2d677
Виталий
tokar commit
|
21
22
|
<div class="login-left-column-title"><?= $this->title ?></div>
|
51e0a262
Yarik
test
|
23
|
<div class="" id="form_definition">
|
766bd93b
Yarik
test
|
24
|
<?php $form = ActiveForm::begin(); ?>
|
d8e2d677
Виталий
tokar commit
|
25
|
|
0dfdb6ef
Виталий
tokar commit
|
26
27
|
<div class="general-check-wr style">
<div class="general-check">
|
0dfdb6ef
Виталий
tokar commit
|
28
|
<div class="general-check-left">
|
35b03e57
Administrator
add yii jquery
|
29
|
<?= $form->field($user_info, 'is_freelancer', [ 'template' => "{input}\n{label}\n{error}" ])
|
766bd93b
Yarik
test
|
30
|
->label('<span></span>Я - исполнитель')
|
766bd93b
Yarik
test
|
31
|
->checkbox([
|
229730f9
Yarik
test
|
32
|
'class' => 'custom-check admin-check',
|
766bd93b
Yarik
test
|
33
|
], false); ?>
|
0dfdb6ef
Виталий
tokar commit
|
34
35
|
</div>
<div class="general-check-right">
|
62fd6713
Виталий
tokar commit
|
36
|
<div class="general-check-right-txt general-check-right-txt-fix">Обязательно должны быть указаны специализации услуг, что бы вы попали в рейтинг исполнителей</div>
|
0dfdb6ef
Виталий
tokar commit
|
37
38
|
</div>
</div>
|
008e0a77
Yarik
test
|
39
40
41
42
43
44
|
<div>
<p>
<?php
if(!empty($user->specializations)) {
echo "<p>В Вашем профиле указаны специализации: ".count($user->specializations)."</p>";
} else {
|
788e40d8
Yarik
test
|
45
|
echo "<p>В Вашем профиле не указаны специализации. Чтобы указать - перейдите по ".Html::a('ссылке', ['accounts/service'], ['target' => '_blank'])."</p>";
|
008e0a77
Yarik
test
|
46
47
48
49
|
}
?>
</p>
</div>
|
0dfdb6ef
Виталий
tokar commit
|
50
51
|
<div class="general-check">
<div class="general-check-left">
|
35b03e57
Administrator
add yii jquery
|
52
|
<?= $form->field($user_info, 'is_customer', [ 'template' => "{input}\n{label}\n{error}" ])
|
766bd93b
Yarik
test
|
53
54
|
->label('<span></span>Я - заказчик')
->checkbox([
|
229730f9
Yarik
test
|
55
|
'class' => 'custom-check admin-check',
|
766bd93b
Yarik
test
|
56
|
], false); ?>
|
0dfdb6ef
Виталий
tokar commit
|
57
58
|
</div>
<div class="general-check-right">
|
615503fb
Виталий
tokar commit
|
59
|
<div class="general-check-right-txt general-check-right-txt-fix">Обязательно должны быть созданы проекты вами, что бы вы попали в рейтинг заказчиков</div>
|
0dfdb6ef
Виталий
tokar commit
|
60
61
|
</div>
</div>
|
008e0a77
Yarik
test
|
62
63
64
65
66
67
|
<div>
<p>
<?php
if(!empty($user->projects)) {
echo "<p>В Вашем профиле добавлены проекты: ".count($user->projects)."</p>";
} else {
|
788e40d8
Yarik
test
|
68
|
echo "<p>В Вашем профиле не добавлены проекты. Чтобы добавить - перейдите по ".Html::a('ссылке', ['accounts/projects'], ['target' => '_blank'])."</p>";
|
008e0a77
Yarik
test
|
69
70
71
72
|
}
?>
</p>
</div>
|
0dfdb6ef
Виталий
tokar commit
|
73
74
75
|
</div>
<div class="general-who style border-general">
<div class="general-who-title gen-admin-title">Кто вы:</div>
|
f0f915df
Administrator
add Vitaliy's wid...
|
76
|
|
229730f9
Yarik
test
|
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
|
<?= $form->field($user, 'type')
->label(false)
->radioList([
1 => 'Частное лицо',
2 => 'Компания',
], [
'item' => function($index, $label, $name, $checked, $value) {
$return = '<div class="admin-who-check">';
$return .= '<input class="custom-radio" id="select_admin_' . $value . '" type="radio" name="' . $name . '" value="' . $value . '" ' . ( $checked ? "checked" : "" ) . ' >';
$return .= '<label for="select_admin_' . $value . '" >';
$return .= '<span></span>' . ucwords($label);
$return .= '</label>';
$return .= '</div>';
return $return;
},
]); ?>
|
0dfdb6ef
Виталий
tokar commit
|
93
|
|
0dfdb6ef
Виталий
tokar commit
|
94
95
|
</div>
|
3364fb6a
Виталий
tokar commit
|
96
97
98
99
|
<div class="style border-general" style="margin-top: 11px">
<div class="hidden-input-admin-general">
<div class="input-blocks-wrapper">
<div class="input-blocks">
|
5d627502
Yarik
test
|
100
|
<?= $form->field($company_info, 'name', [ 'options' => [ 'class' => 'form-group company_info' ], 'enableClientValidation' => false ])
|
78ab7436
Yarik
test
|
101
|
->textInput([ 'class' => 'custom-input-2 no-client-validation' ]); ?>
|
3364fb6a
Виталий
tokar commit
|
102
103
104
105
|
</div>
</div>
<div class="input-blocks-wrapper">
<div class="input-blocks">
|
229730f9
Yarik
test
|
106
107
108
109
110
|
<?= $form->field($company_info, 'staff', [ 'options' => [ 'class' => 'form-group company_info' ] ])
->textInput([
'class' => 'custom-input-2',
'type' => 'number',
]); ?>
|
3364fb6a
Виталий
tokar commit
|
111
112
|
</div>
</div>
|
fe41f4ed
Виталий
tokar commit
|
113
|
<div class="conacts-admin style">Контакты представителя:</div>
|
b9769b49
Виталий
tokar commit
|
114
|
</div>
|
0dfdb6ef
Виталий
tokar commit
|
115
|
|
3364fb6a
Виталий
tokar commit
|
116
117
|
<div class="input-blocks-wrapper">
<div class="input-blocks">
|
229730f9
Yarik
test
|
118
119
120
|
<?= $form->field($user, 'firstname')
->label('Имя')
->textInput([ 'class' => 'custom-input-2' ]); ?>
|
3364fb6a
Виталий
tokar commit
|
121
|
</div>
|
0dfdb6ef
Виталий
tokar commit
|
122
|
</div>
|
0dfdb6ef
Виталий
tokar commit
|
123
|
|
3364fb6a
Виталий
tokar commit
|
124
125
|
<div class="input-blocks-wrapper">
<div class="input-blocks">
|
229730f9
Yarik
test
|
126
127
128
|
<?= $form->field($user, 'lastname')
->label('Фамилия')
->textInput([ 'class' => 'custom-input-2' ]); ?>
|
3364fb6a
Виталий
tokar commit
|
129
|
</div>
|
b9769b49
Виталий
tokar commit
|
130
|
</div>
|
3364fb6a
Виталий
tokar commit
|
131
132
|
<div class="input-blocks-wrapper">
<div class="input-blocks">
|
229730f9
Yarik
test
|
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
|
<?= $form->field($user_info, 'country')
->widget(Select2::classname(), [
'options' => [ 'placeholder' => 'Выбор страны ...', ],
'pluginOptions' => [
'allowClear' => true,
'minimumInputLength' => 3,
'ajax' => [
'url' => \yii\helpers\Url::to([ 'site/country' ]),
'dataType' => 'json',
'data' => new JsExpression('function(params) { return {q:params.term}; }'),
],
'escapeMarkup' => new JsExpression('function (markup) { return markup; }'),
'templateResult' => new JsExpression('function(country) { return country.text; }'),
'templateSelection' => new JsExpression('function (country) { return country.text; }'),
],
]); ?>
|
3364fb6a
Виталий
tokar commit
|
149
|
</div>
|
b9769b49
Виталий
tokar commit
|
150
|
</div>
|
3364fb6a
Виталий
tokar commit
|
151
152
|
<div class="input-blocks-wrapper">
<div class="input-blocks">
|
229730f9
Yarik
test
|
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
|
<?= $form->field($user_info, 'city')
->widget(Select2::classname(), [
'options' => [ 'placeholder' => 'Выбор города ...' ],
'pluginOptions' => [
'allowClear' => true,
'minimumInputLength' => 3,
'ajax' => [
'url' => \yii\helpers\Url::to([ 'site/city' ]),
'dataType' => 'json',
'data' => new JsExpression('function(params) { return {q:params.term}; }'),
],
'escapeMarkup' => new JsExpression('function (markup) { return markup; }'),
'templateResult' => new JsExpression('function(city) { return city.text; }'),
'templateSelection' => new JsExpression('function (city) { return city.text; }'),
],
]); ?>
|
6a82a223
Виталий
tokar commit
|
169
|
|
3364fb6a
Виталий
tokar commit
|
170
171
172
|
</div>
<div class="input-blocks street-input">
|
229730f9
Yarik
test
|
173
174
|
<?= $form->field($company_info, 'street', [ 'options' => [ 'class' => 'form-group company_info' ] ])
->textInput([ 'class' => 'custom-input-2' ]); ?>
|
3364fb6a
Виталий
tokar commit
|
175
176
177
|
</div>
<div class="input-blocks home-input">
|
229730f9
Yarik
test
|
178
179
|
<?= $form->field($company_info, 'house', [ 'options' => [ 'class' => 'form-group company_info' ] ])
->textInput([ 'class' => 'custom-input-2' ]); ?>
|
3364fb6a
Виталий
tokar commit
|
180
|
</div>
|
6a82a223
Виталий
tokar commit
|
181
|
</div>
|
3364fb6a
Виталий
tokar commit
|
182
183
184
|
<div class="input-blocks-wrapper ">
<div class="input-blocks">
|
229730f9
Yarik
test
|
185
186
187
188
189
|
<?= $form->field($user_info, 'email')
->textInput([
'class' => 'custom-input-2',
'value' => empty( $user_info->email ) ? $user->email : $user_info->email,
]); ?>
|
3364fb6a
Виталий
tokar commit
|
190
191
|
</div>
<div class="input-blocks hide-mail-check">
|
229730f9
Yarik
test
|
192
193
194
195
196
197
198
199
200
|
<?= $form->field($user_info, 'hide_mail', [
'options' => [ 'class' => 'form-group', ],
'template' => "{input}{label}\n{hint}\n{error}",
])
->label('<span></span>не публиковать Email')
->checkbox([
'checked' => 'checked',
'class' => 'custom-check',
], false); ?>
|
3364fb6a
Виталий
tokar commit
|
201
|
</div>
|
b9769b49
Виталий
tokar commit
|
202
203
|
</div>
</div>
|
fe41f4ed
Виталий
tokar commit
|
204
|
<div class="input-blocks-wrapper border-general fix-marg">
|
3364fb6a
Виталий
tokar commit
|
205
|
<div class="input-blocks weight-normal">
|
229730f9
Yarik
test
|
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
|
<div class="gen-admin-title">Статус:</div>
<?= $form->field($user_info, 'busy')
->label(false)
->radioList([
0 => 'Свободен',
1 => 'Занят',
], [
'item' => function($index, $label, $name, $checked, $value) {
$return = '<div class="admin-who-check">';
$return .= '<input class="custom-radio" id="select_admin_status' . $value . '" type="radio" name="' . $name . '" value="' . $value . '" ' . ( $checked ? "checked" : "" ) . ' >';
$return .= '<label for="select_admin_status' . $value . '" >';
$return .= '<span></span>' . ucwords($label);
$return .= '</label>';
$return .= '</div>';
return $return;
},
]); ?>
|
6a82a223
Виталий
tokar commit
|
223
224
225
226
|
</div>
</div>
|
3364fb6a
Виталий
tokar commit
|
227
228
229
|
<div class="style border-general">
<div class="input-blocks-wrapper admin-avatar">
<div class="gen-admin-title">Аватар</div>
|
229730f9
Yarik
test
|
230
231
232
233
|
<div class="file-help-1">
<div>Формат: PNG, JPG, GIF<br/>Размер: 180x180 px<br/>Файлы большего размера и других пропорций будут конвертироваться
</div>
</div>
|
3364fb6a
Виталий
tokar commit
|
234
|
<?= ImageUploader::widget([
|
229730f9
Yarik
test
|
235
236
237
|
'model' => $user_info,
'field' => 'image',
'size' => [
|
eb7e82fb
Administrator
29.02.16
|
238
|
[
|
229730f9
Yarik
test
|
239
240
|
'width' => 48,
'height' => 48,
|
eb7e82fb
Administrator
29.02.16
|
241
242
|
],
[
|
229730f9
Yarik
test
|
243
244
|
'width' => 180,
'height' => 180,
|
eb7e82fb
Administrator
29.02.16
|
245
246
247
|
],
],
|
229730f9
Yarik
test
|
248
249
250
251
|
'multi' => false,
'gallery' => $user_info->image,
'name' => 'Выбрать файл',
]); ?>
|
3364fb6a
Виталий
tokar commit
|
252
|
</div>
|
6a82a223
Виталий
tokar commit
|
253
|
|
3364fb6a
Виталий
tokar commit
|
254
255
|
<div class="input-blocks-wrapper admin-avatar admin-pattern">
<div class="gen-admin-title">Подложка</div>
|
229730f9
Yarik
test
|
256
257
258
259
260
261
262
|
<?= ImageUploader::widget([
'model' => $user_info,
'field' => 'poster',
'size' => [
[
'width' => 1920,
'height' => 380,
|
eb7e82fb
Administrator
29.02.16
|
263
|
],
|
229730f9
Yarik
test
|
264
265
266
267
268
|
],
'multi' => false,
'gallery' => $user_info->poster,
'name' => 'Выбрать файл',
]); ?>
|
3364fb6a
Виталий
tokar commit
|
269
|
</div>
|
6a82a223
Виталий
tokar commit
|
270
|
|
3364fb6a
Виталий
tokar commit
|
271
|
</div>
|
6a82a223
Виталий
tokar commit
|
272
273
|
|
fe41f4ed
Виталий
tokar commit
|
274
|
<div class="input-blocks-wrapper fix-marg">
|
3364fb6a
Виталий
tokar commit
|
275
276
277
|
<div class="input-blocks weight-normal">
<div class="gen-admin-title">Членство в МФП</div>
<div class="admin-fix-mfp">
|
229730f9
Yarik
test
|
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
|
<?= $form->field($user_info, 'member')
->label(false)
->radioList([
0 => 'Не хочу',
1 => 'Хочу стать',
], [
'item' => function($index, $label, $name, $checked, $value) {
$return = '<div class="admin-who-check">';
$return .= '<input class="custom-radio" id="select_admin_mfp' . $value . '" type="radio" name="' . $name . '" value="' . $value . '" ' . ( $checked ? "checked" : "" ) . ' >';
$return .= '<label for="select_admin_mfp' . $value . '" >';
$return .= '<span></span>' . ucwords($label);
$return .= '</label>';
$return .= '</div>';
return $return;
},
]); ?>
|
3364fb6a
Виталий
tokar commit
|
294
295
296
|
</div>
<div class="admin-mfp-help">Выберите если хотите стать членом МФП и наш менеджер свяжется с Вами.</div>
</div>
|
6a82a223
Виталий
tokar commit
|
297
|
|
3364fb6a
Виталий
tokar commit
|
298
|
</div>
|
6a82a223
Виталий
tokar commit
|
299
300
|
|
b9769b49
Виталий
tokar commit
|
301
|
<div class="input-blocks-wrapper">
|
3364fb6a
Виталий
tokar commit
|
302
|
<div class="admin-save-btn style">
|
229730f9
Yarik
test
|
303
304
|
<?= Html::submitButton('Сохранить', [ 'class' => 'input-blocks-wrapper button' ]);
$form->end(); ?>
|
b9769b49
Виталий
tokar commit
|
305
306
|
</div>
</div>
|
51e0a262
Yarik
test
|
307
|
</div>
|