Blame view

frontend/views/accounts/general.php 8.46 KB
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;
f819c230   Yarik   test
11
      use common\widgets\ImageUploader;
51e0a262   Yarik   test
12
13
      use yii\helpers\Html;
      use yii\widgets\ActiveForm;
51e0a262   Yarik   test
14
      use \common\widgets\MultiLangForm;
51e0a262   Yarik   test
15
16
  
      $this->title = 'Учетные данные';
51e0a262   Yarik   test
17
      $this->params['breadcrumbs'][] = $this->title;
51e0a262   Yarik   test
18
  ?>
d8e2d677   Виталий   tokar commit
19
20
  <div class="login-left-column-title"><?= $this->title ?></div>
  
51e0a262   Yarik   test
21
  <div class="" id="form_definition">
766bd93b   Yarik   test
22
      <?php $form = ActiveForm::begin(); ?>
d8e2d677   Виталий   tokar commit
23
  
0dfdb6ef   Виталий   tokar commit
24
25
      <div class="general-check-wr style">
          <div class="general-check">
d8e2d677   Виталий   tokar commit
26
  
0dfdb6ef   Виталий   tokar commit
27
              <div class="general-check-left">
766bd93b   Yarik   test
28
29
30
31
32
33
                  <?= $form->field($user, 'isPerformer', [ 'template' => "{input}\n{label}\n{error}" ])
                           ->label('<span></span>Я - исполнитель')
                           ->checkbox([
                               'class'    => 'custom-check disabled admin-check',
                               'disabled' => 'disabled',
                           ], false); ?>
0dfdb6ef   Виталий   tokar commit
34
35
36
37
38
39
40
41
              </div>
              <div class="general-check-right">
                  <div class="general-check-right-txt">Обязательно должны быть указаны специализации услуг, что бы вы попали в рейтинг исполнителей</div>
              </div>
          </div>
  
          <div class="general-check">
              <div class="general-check-left">
766bd93b   Yarik   test
42
43
44
45
46
47
                  <?= $form->field($user, 'isCustomer', [ 'template' => "{input}\n{label}\n{error}" ])
                           ->label('<span></span>Я - заказчик')
                           ->checkbox([
                               'class'    => 'custom-check disabled admin-check',
                               'disabled' => 'disabled',
                           ], false); ?>
0dfdb6ef   Виталий   tokar commit
48
49
50
51
52
53
54
55
56
              </div>
              <div class="general-check-right">
                  <div class="general-check-right-txt">Обязательно должны быть созданы проекты вами, что бы вы попали в рейтинг исполнителей</div>
              </div>
          </div>
  
      </div>
      <div class="general-who style border-general">
          <div class="general-who-title gen-admin-title">Кто вы:</div>
f0f915df   Administrator   add Vitaliy's wid...
57
  
0dfdb6ef   Виталий   tokar commit
58
          <?= $form->field ($user, 'type')
f0f915df   Administrator   add Vitaliy's wid...
59
60
61
62
63
              ->label (false)
              ->radioList (
                  [1 => 'Частное лицо', 2 => 'Компания'],
                  [
                      'item' => function($index, $label, $name, $checked, $value) {
b9769b49   Виталий   tokar commit
64
65
                          $return = '<div class="admin-who-check">';
                          $return .= '<input class="custom-radio" id="select_admin_'.$value.'" type="radio" name="' . $name . '" value="' . $value . '" '.($checked ? "checked" :"").' >';
c8ee4f73   Administrator   add Vitaliy's wid...
66
                          $return .= '<label for="select_admin_'.$value.'" >';
f0f915df   Administrator   add Vitaliy's wid...
67
68
                          $return .= '<span></span>' . ucwords($label);
                          $return .= '</label>';
b9769b49   Виталий   tokar commit
69
                          $return .= '</div>';
f0f915df   Administrator   add Vitaliy's wid...
70
71
72
73
                          return $return;
                      }
                  ]
              );
0dfdb6ef   Виталий   tokar commit
74
          ?>
0dfdb6ef   Виталий   tokar commit
75
  
0dfdb6ef   Виталий   tokar commit
76
77
  
      </div>
b9769b49   Виталий   tokar commit
78
79
      <div class="input-blocks-wrapper">
          <div class="input-blocks">
0dfdb6ef   Виталий   tokar commit
80
          <?= $form->field ($company_info, 'name', ['options' => ['class' => 'form-group company_info']])
51e0a262   Yarik   test
81
                    ->label ('Название компании')
b9769b49   Виталий   tokar commit
82
                    ->textInput (['class'=> 'custom-input-2']);
0dfdb6ef   Виталий   tokar commit
83
          ?>
b9769b49   Виталий   tokar commit
84
85
86
87
          </div>
      </div>
      <div class="input-blocks-wrapper">
          <div class="input-blocks">
0dfdb6ef   Виталий   tokar commit
88
          <?= $form->field ($company_info, 'staff', ['options' => ['class' => 'form-group company_info']])
51e0a262   Yarik   test
89
                    ->label ('Количество сотрудников')
b9769b49   Виталий   tokar commit
90
                    ->textInput (['class'=> 'custom-input-2','type'=>'number']);
0dfdb6ef   Виталий   tokar commit
91
          ?>
b9769b49   Виталий   tokar commit
92
93
          </div>
      </div>
0dfdb6ef   Виталий   tokar commit
94
  
0dfdb6ef   Виталий   tokar commit
95
96
97
98
      <div class="input-blocks-wrapper">
          <div class="input-blocks">
              <?= $form->field ($user, 'firstname')
                  ->label ('Имя')
b9769b49   Виталий   tokar commit
99
                  ->textInput (['class'=> 'custom-input-2']);
0dfdb6ef   Виталий   tokar commit
100
101
102
              ?>
          </div>
      </div>
0dfdb6ef   Виталий   tokar commit
103
104
105
  
      <div class="input-blocks-wrapper">
          <div class="input-blocks">
b9769b49   Виталий   tokar commit
106
107
108
109
              <?= $form->field ($user, 'lastname')
                  ->label ('Фамилия')
                  ->textInput (['class'=> 'custom-input-2']);
              ?>
0dfdb6ef   Виталий   tokar commit
110
111
          </div>
      </div>
b9769b49   Виталий   tokar commit
112
113
      <div class="input-blocks-wrapper">
          <div class="input-blocks">
0dfdb6ef   Виталий   tokar commit
114
          <?= $form->field ($user_info, 'country')
51e0a262   Yarik   test
115
                    ->label ('Ваша страна')
b9769b49   Виталий   tokar commit
116
                    ->textInput (['class'=> 'custom-input-2']);
0dfdb6ef   Виталий   tokar commit
117
          ?>
b9769b49   Виталий   tokar commit
118
119
120
121
          </div>
      </div>
      <div class="input-blocks-wrapper">
          <div class="input-blocks">
0dfdb6ef   Виталий   tokar commit
122
          <?= $form->field ($user_info, 'city')
51e0a262   Yarik   test
123
                    ->label ('Ваш город')
b9769b49   Виталий   tokar commit
124
                    ->textInput (['class'=> 'custom-input-2']);
0dfdb6ef   Виталий   tokar commit
125
          ?>
b9769b49   Виталий   tokar commit
126
          </div>
6a82a223   Виталий   tokar commit
127
128
129
130
131
132
  
          <div class="input-blocks street-input">
              <?= $form->field ($company_info, 'street', ['options' => ['class' => 'form-group company_info']])
                  ->label ('Улица')
                  ->textInput (['class'=> 'custom-input-2']);
              ?>
b9769b49   Виталий   tokar commit
133
          </div>
6a82a223   Виталий   tokar commit
134
135
136
137
138
139
  
          <div class="input-blocks home-input">
              <?= $form->field ($company_info, 'house', ['options' => ['class' => 'form-group company_info']])
                  ->label ('Дом')
                  ->textInput (['class'=> 'custom-input-2']);
              ?>
b9769b49   Виталий   tokar commit
140
141
          </div>
      </div>
6a82a223   Виталий   tokar commit
142
  
b9769b49   Виталий   tokar commit
143
144
      <div class="input-blocks-wrapper">
          <div class="input-blocks">
0dfdb6ef   Виталий   tokar commit
145
          <?= $form->field ($user, 'email')
51e0a262   Yarik   test
146
                    ->label ('Email')
b9769b49   Виталий   tokar commit
147
                    ->textInput (['class'=> 'custom-input-2','disabled' => 'disabled']);
0dfdb6ef   Виталий   tokar commit
148
          ?>
6a82a223   Виталий   tokar commit
149
150
151
152
153
          </div>
          <div class="input-blocks hide-mail-check">
          <?= $form->field ($company_info, 'hide_mail', ['options' => ['class' => 'form-group company_info', ], 'template' => "{input}{label}\n{hint}\n{error}"])
                    ->label ('<span></span>не публиковать Email')
                    ->checkbox (['checked'=>'checked', 'class'=> 'custom-check'], false);
0dfdb6ef   Виталий   tokar commit
154
          ?>
b9769b49   Виталий   tokar commit
155
156
          </div>
      </div>
6a82a223   Виталий   tokar commit
157
158
159
160
  
      <div class="input-blocks-wrapper">
          <div class="input-blocks">
          <div class="general-who-title gen-admin-title">Кто вы:</div>
0dfdb6ef   Виталий   tokar commit
161
          <?= $form->field ($user_info, 'busy')
6a82a223   Виталий   tokar commit
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
                    ->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;
                            }
                        ]
                    );
0dfdb6ef   Виталий   tokar commit
177
          ?>
6a82a223   Виталий   tokar commit
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
          </div>
      </div>
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
0dfdb6ef   Виталий   tokar commit
196
          <?= $form->field ($user_info, 'member')
51e0a262   Yarik   test
197
198
199
                    ->label ('Членство в МФП')
                    ->hint ('Выберите если хотите стать членом МФП и наш менеджер свяжется с Вами.')
                    ->radioList ([0 => 'Не хочу', 1 => 'Хочу стать']);
0dfdb6ef   Виталий   tokar commit
200
201
          ?>
          <?= ImageUploader::widget([
f819c230   Yarik   test
202
203
204
205
206
207
208
209
              'model'=> $user_info,
              'field'=>'image',
              'width'=>100,
              'height'=>100,
              'multi'=>false,
              'gallery' =>$user_info->image,
              'name' => 'Загрузить аватар'
          ]);
0dfdb6ef   Виталий   tokar commit
210
211
          ?>
          <?= ImageUploader::widget([
f819c230   Yarik   test
212
213
214
215
216
217
218
219
              'model'=> $user_info,
              'field'=>'poster',
              'width'=>1200,
              'height'=>600,
              'multi'=>false,
              'gallery' =>$user_info->poster,
              'name' => 'Загрузить постер'
          ]);
0dfdb6ef   Виталий   tokar commit
220
          ?>
b9769b49   Виталий   tokar commit
221
222
223
      <div class="input-blocks-wrapper">
          <div class="input-blocks">
          <?= Html::submitButton('Обновить', ['class' => 'input-blocks-wrapper button']);
51e0a262   Yarik   test
224
          $form->end ();
0dfdb6ef   Виталий   tokar commit
225
          ?>
b9769b49   Виталий   tokar commit
226
227
          </div>
      </div>
51e0a262   Yarik   test
228
  </div>