Blame view

frontend/views/accounts/general.php 4.34 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
19
20
21
22
23
      use yii\helpers\Html;
      use yii\widgets\ActiveForm;
      use \common\widgets\MultiLangForm;
  
      $this->title = 'Учетные данные';
      $this->params['breadcrumbs'][] = $this->title;
  ?>
  <h1><?= $this->title ?></h1>
  <div class="" id="form_definition">
      <?php
          $form = ActiveForm::begin ();
          echo $form->field ($user, 'isPerformer', ['template' => "{label}:\n{input}\n{hint}\n{error}"])
a7142d16   Виталий   first commit
24
                    ->label ('<span></span>Я - исполнитель')
51e0a262   Yarik   test
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
                    ->hint ('Отображается если указать специализации услуг в личном кабинете.')
                    ->checkbox ([], 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 => 'Компания']);
          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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
          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
90
91
92
93
          echo Html::submitButton('Обновить', ['class' => 'btn btn-primary']);
          $form->end ();
      ?>
  </div>