1
|
|
|
<?php |
2
|
|
|
/** |
3
|
|
|
* @var \inblank\activeuser\models\User $user user |
4
|
|
|
* @var \inblank\activeuser\models\forms\ChangePasswordForm $model change password form |
5
|
|
|
*/ |
6
|
|
|
|
7
|
|
|
use yii\helpers\Html; |
8
|
|
|
use yii\widgets\ActiveForm; |
9
|
|
|
|
10
|
|
|
$this->title = Yii::t('activeuser_frontend', 'Change Password'); |
11
|
|
|
$this->params['breadcrumbs'][] = ['label' => $user->name, 'url' => ['index']]; |
12
|
|
|
$this->params['breadcrumbs'][] = $this->title; |
13
|
|
|
?> |
14
|
|
|
<div class="user-change-password"> |
15
|
|
|
|
16
|
|
|
<h1><?= Yii::t('activeuser_frontend', 'Change Password') ?></h1> |
17
|
|
|
<div class="row"> |
18
|
|
|
<div class="col-xs-12 col-md-2"> |
19
|
|
|
<div class="thumbnail"> |
20
|
|
|
<?= Html::img($user->imageUrl, ['alt' => $user->name, 'title' => $user->name]); ?> |
|
|
|
|
21
|
|
|
</div> |
22
|
|
|
</div> |
23
|
|
|
<div class="col-xs-12 col-md-10"> |
24
|
|
|
<?php $form = ActiveForm::begin() ?> |
25
|
|
|
<?= $form->field($model, 'oldPassword', [ |
26
|
|
|
'inputOptions' => [ |
27
|
|
|
'autofocus' => 'autofocus', |
28
|
|
|
'autocomplete' => 'new-password', |
29
|
|
|
'class' => 'form-control', |
30
|
|
|
'tabindex' => '1', |
31
|
|
|
], |
32
|
|
|
])->passwordInput() ?> |
33
|
|
|
<?= $form->field($model, 'newPassword', [ |
34
|
|
|
'inputOptions' => [ |
35
|
|
|
'class' => 'form-control', |
36
|
|
|
'tabindex' => '2' |
37
|
|
|
] |
38
|
|
|
])->passwordInput() ?> |
39
|
|
|
<div class="form-group"> |
40
|
|
|
<?= Html::submitButton(Yii::t('activeuser_frontend', 'Change'), [ |
41
|
|
|
'class' => 'btn btn-primary', 'tabindex' => '3' |
42
|
|
|
]) ?> |
43
|
|
|
<?= Html::a(Yii::t('activeuser_frontend', 'Cancel'), |
44
|
|
|
['view'], |
45
|
|
|
['class' => 'btn btn-warning', 'tabindex' => '4'] |
46
|
|
|
) |
47
|
|
|
?> |
48
|
|
|
</div> |
49
|
|
|
<?php ActiveForm::end(); ?> |
50
|
|
|
</div> |
51
|
|
|
</div> |
52
|
|
|
</div> |
53
|
|
|
|
Since your code implements the magic getter
_get
, this function will be called for any read access on an undefined variable. You can add the@property
annotation to your class or interface to document the existence of this variable.If the property has read access only, you can use the @property-read annotation instead.
Of course, you may also just have mistyped another name, in which case you should fix the error.
See also the PhpDoc documentation for @property.