Blame view

artweb/artbox-core/views/profile/index.php 2.74 KB
326af919   mzavalniuk   add artbox-core t...
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
  <?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 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="text-center">
      <div class="col-xs-12 col-lg-6 col-lg-offset-3">
          <?php
              $xPanel = Panel::begin(
                  [
                      'header' => \Yii::t('core', 'Profile information'),
                  ]
              );
              echo Collapse::widget(
                  [
                      'items'        => [
                          [
                              'label'          => Html::tag(
                                  'p',
                                  \Yii::t('core', 'Personal information'),
                                  [
                                      'class' => 'collapse_toggle_text',
                                  ]
                              ),
                              'content'        => $this->render(
                                  '_profile_info',
                                  [
                                      'user'     => $user,
                                      'userData' => $userData,
                                  ]
                              ),
                              'contentOptions' => [ 'class' => $changePasswordModel->hasErrors() ? '' : 'in' ],
                          ],
                          [
                              'label'          => Html::tag(
                                  'p',
                                  \Yii::t('core', 'Change password'),
                                  [
                                      'class' => 'collapse_toggle_text',
                                  ]
                              ),
                              'content'        => $this->render(
                                  '_change_password',
                                  [
                                      'changePasswordModel' => $changePasswordModel,
                                  ]
                              ),
                              'contentOptions' => [ 'class' => $changePasswordModel->hasErrors() ? 'in' : '' ],
                          ],
                      ],
                      'options'      => [
                          'class' => 'accordion profile_info_accordion',
                      ],
                      'encodeLabels' => false,
                  ]
              );
              $xPanel::end();
          ?>
      </div>
      <div class="clearfix"></div>
  </div>