Blame view

frontend/views/accounts/general.php 5.29 KB
51e0a262   Yarik   test
1
2
3
4
5
6
7
8
9
10
  <?php
      /**
       * @var UserInfo    $user_info
       * @var User        $user
       * @var CompanyInfo $company_info
       */
      use common\models\CompanyInfo;
      use common\models\Option;
      use common\models\User;
      use common\models\UserInfo;
f819c230   Yarik   test
11
      use common\widgets\ImageUploader;
51e0a262   Yarik   test
12
13
14
15
16
17
18
      use yii\helpers\Html;
      use yii\widgets\ActiveForm;
      use \common\widgets\MultiLangForm;
  
      $this->title = 'Учетные данные';
      $this->params['breadcrumbs'][] = $this->title;
  ?>
d8e2d677   Виталий   tokar commit
19
20
  <div class="login-left-column-title"><?= $this->title ?></div>
  
51e0a262   Yarik   test
21
  <div class="" id="form_definition">
9b69b051   Administrator   add Vitaliy's wid...
22
      <?php  $form = ActiveForm::begin ();
d8e2d677   Виталий   tokar commit
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
  
  
  
  
  //    echo $form->field ($user, 'isPerformer', ['template' => "{label}:\n{input}\n{hint}\n{error}"])
  //        ->label ('<span></span>Я - исполнитель')
  //        ->hint ('Отображается если указать специализации услуг в личном кабинете.')
  //        ->checkbox (['class'=> 'test', 'disabled'=>'disabled'], false);
  //    echo $form->field ($user, 'isCustomer', ['template' => "{label}:\n{input}\n{hint}\n{error}"])
  //        ->label ('Я - заказчик')
  //        ->hint ('Отображается если созданы заказы.')
  //        ->checkbox ([], false);
  //    echo $form->field ($user, 'type')
  //        ->label ('Кто вы')
  //        ->radioList ([1 => 'Частное лицо', 2 => 'Компания'],['class'=>'test']);
  
  
  
  
  
  
          echo $form->field ($user, 'isPerformer', ['template' => "{input}\n{label}\n{hint}\n{error}"])
a7142d16   Виталий   first commit
45
                    ->label ('<span></span>Я - исполнитель')
51e0a262   Yarik   test
46
                    ->hint ('Отображается если указать специализации услуг в личном кабинете.')
d8e2d677   Виталий   tokar commit
47
48
49
                    ->checkbox (['class'=> 'custom-check disabled', 'disabled'=>'disabled'], false);
          echo $form->field ($user, 'isCustomer', ['template' => "{input}\n{label}\n{hint}\n{error}"])
                    ->label ('<span></span>Я - заказчик')
51e0a262   Yarik   test
50
                    ->hint ('Отображается если созданы заказы.')
d8e2d677   Виталий   tokar commit
51
                      ->checkbox (['class'=> 'custom-check', 'disabled'=>'disabled'], false);
51e0a262   Yarik   test
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
          echo $form->field ($user, 'type')
                    ->label ('Кто вы')
                    ->radioList ([1 => 'Частное лицо', 2 => 'Компания']);
          echo $form->field ($company_info, 'name', ['options' => ['class' => 'form-group company_info']])
                    ->label ('Название компании')
                    ->textInput ();
          echo $form->field ($company_info, 'staff', ['options' => ['class' => 'form-group company_info']])
                    ->label ('Количество сотрудников')
                    ->input ('number');
          echo '<div class="company_info">Контакты представителя</div>';
          echo $form->field ($user, 'lastname')
                    ->label ('Фамилия')
                    ->textInput ();
          echo $form->field ($user, 'firstname')
                    ->label ('Имя')
                    ->textInput ();
          echo $form->field ($user_info, 'country')
                    ->label ('Ваша страна')
                    ->textInput ();
          echo $form->field ($user_info, 'city')
                    ->label ('Ваш город')
                    ->textInput ();
          echo $form->field ($company_info, 'street', ['options' => ['class' => 'form-group company_info']])
                    ->label ('Улица')
                    ->textInput ();
          echo $form->field ($company_info, 'house', ['options' => ['class' => 'form-group company_info']])
                    ->label ('Дом')
                    ->textInput ();
          echo $form->field ($user, 'email')
                    ->label ('Email')
                    ->textInput (['disabled' => 'disabled']);
          echo $form->field ($company_info, 'hide_mail', ['options' => ['class' => 'form-group company_info'], 'template' => "{input}{label}\n{hint}\n{error}"])
                    ->label ('Не публиковать Email')
                    ->checkbox ([], false);
          echo $form->field ($user_info, 'busy')
                    ->label ('Статус')
                    ->radioList ([0 => 'Свободен', 1 => 'Занят']);
          echo $form->field ($user_info, 'member')
                    ->label ('Членство в МФП')
                    ->hint ('Выберите если хотите стать членом МФП и наш менеджер свяжется с Вами.')
                    ->radioList ([0 => 'Не хочу', 1 => 'Хочу стать']);
f819c230   Yarik   test
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
          echo ImageUploader::widget([
              'model'=> $user_info,
              'field'=>'image',
              'width'=>100,
              'height'=>100,
              'multi'=>false,
              'gallery' =>$user_info->image,
              'name' => 'Загрузить аватар'
          ]);
          echo ImageUploader::widget([
              'model'=> $user_info,
              'field'=>'poster',
              'width'=>1200,
              'height'=>600,
              'multi'=>false,
              'gallery' =>$user_info->poster,
              'name' => 'Загрузить постер'
          ]);
51e0a262   Yarik   test
111
112
113
114
          echo Html::submitButton('Обновить', ['class' => 'btn btn-primary']);
          $form->end ();
      ?>
  </div>