Blame view

backend/views/profile/index.php 3.56 KB
c237629a   Anastasia   first commit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
  <?php
      use artbox\core\models\ChangePassword;
      use artbox\core\models\User;
      use artbox\core\models\UserData;
      use yii\bootstrap\Collapse;
      use yii\bootstrap\Html;
      use yii\web\View;
      use yii\widgets\ActiveForm;
      use yiister\gentelella\widgets\Panel;
      
      /**
       * @var User           $user
       * @var UserData       $userData
       * @var ChangePassword $changePasswordModel
       * @var View           $this
       */
      
      $this->title = 'Profile';
      
      $this->params[ 'breadcrumbs' ][] = $this->title;
  ?>
  
      <div class="adm-index settings-admin">
          <div class="x_panel">
              <div class="x_title"><h2><?php echo $this->title;?></h2><div class="clearfix"></div></div>
              <div class="x_content settings-admin-content">
                  <?php
  
                  $form = ActiveForm::begin(
                      [
                          'action'        => [ 'update' ],
                          'method'        => 'POST',
                          'errorCssClass' => 'has-error bad',
                      ]
                  );
                  echo $form->field(
                      $userData,
                      'email',
                      [
                          'options'       => [
                              'class' => 'form-group item',
                          ],
                          'inputOptions'  => [
                              'class'       => 'form-control has-feedback-left',
                              'placeholder' => $userData->getAttributeLabel('email'),
                          ],
                          'errorOptions'  => [
                              'class' => 'help-block alert',
                          ],
                      ]
                  )
                      ->textInput();
  
                  echo $form->field(
                      $changePasswordModel,
                      'oldPassword',
                      [
                          'options'      => [
                              'class' => 'form-group item',
                          ],
                          'errorOptions' => [
                              'class' => 'help-block alert',
                          ],
                      ]
                  )
                      ->passwordInput();
                  echo $form->field(
                      $changePasswordModel,
                      'newPassword',
                      [
                          'options'      => [
                              'class' => 'form-group item',
                          ],
                          'errorOptions' => [
                              'class' => 'help-block alert',
                          ],
                      ]
                  )
                      ->passwordInput();
                  echo $form->field(
                      $changePasswordModel,
                      'newPasswordRepeat',
                      [
                          'options'      => [
                              'class' => 'form-group item',
                          ],
                          'errorOptions' => [
                              'class' => 'help-block alert',
                          ],
                      ]
                  );
                  ?>
                  <div class="style buttons-page-wr">
                      <?php
                      echo Html::submitButton(
                          \Yii::t('core', 'Submit'),
                          [
                              'class' => 'btn btn-success personal_info_submit_button',
                          ]
                      );
                      ?>
                  </div>
              </div>
          </div>
              <?php
              $form::end();
  
          ?>
      </div>