1
|
|
|
<?php |
2
|
|
|
/** |
3
|
|
|
* @var \inblank\activeuser\models\forms\RestoreForm $model |
4
|
|
|
* @var string $error error message |
5
|
|
|
*/ |
6
|
|
|
use yii\helpers\Html; |
7
|
|
|
use yii\widgets\ActiveForm; |
8
|
|
|
|
9
|
|
|
$this->title = Yii::t('activeuser_frontend', 'New password enter'); |
10
|
|
|
$this->params['breadcrumbs'][] = $this->title; |
11
|
|
|
?> |
12
|
|
|
<div class="row"> |
13
|
|
|
<div class="col-md-6 col-md-offset-3 col-sm-8 col-sm-offset-2"> |
14
|
|
|
<div id="form-resend" class="panel panel-warning"> |
15
|
|
|
<div class="panel-heading"> |
16
|
|
|
<h3 class="panel-title"><?= Html::encode($this->title) ?></h3> |
17
|
|
|
</div> |
18
|
|
|
<div class="panel-body"> |
19
|
|
|
<?php $form = ActiveForm::begin([ |
20
|
|
|
'enableAjaxValidation' => false, |
21
|
|
|
'enableClientValidation' => false, |
22
|
|
|
'enableClientScript' => false, |
23
|
|
|
'validateOnBlur' => false, |
24
|
|
|
'validateOnType' => false, |
25
|
|
|
'validateOnChange' => false, |
26
|
|
|
]) ?> |
27
|
|
|
|
28
|
|
|
<?= $form->field($model, 'password')->passwordInput([ |
29
|
|
|
'inputOptions' => [ |
30
|
|
|
'autofocus' => 'autofocus', |
31
|
|
|
'class' => 'form-control', |
32
|
|
|
'tabindex' => '1', |
33
|
|
|
], |
34
|
|
|
]) ?> |
35
|
|
|
|
36
|
|
|
<?= Html::submitButton(Yii::t('activeuser_frontend', 'Change password'), [ |
37
|
|
|
'class' => 'btn btn-warning btn-block', 'tabindex' => '2' |
38
|
|
|
]) ?> |
39
|
|
|
|
40
|
|
|
<?php ActiveForm::end(); ?> |
41
|
|
|
</div> |
42
|
|
|
</div> |
43
|
|
|
<div class="text-center"> |
44
|
|
|
<p class="activeuser-login"> |
45
|
|
|
<?= Html::a(Yii::t('activeuser_frontend', 'Sign in'), ['/activeuser/account/login'], ['tabindex' => '3']) ?> |
46
|
|
|
</p> |
47
|
|
View Code Duplication |
<?php if ($model->module->enableRegistration): ?> |
|
|
|
|
48
|
|
|
<p class="activeuser-register"> |
49
|
|
|
<?= Html::a(Yii::t('activeuser_frontend', "Don't have an account? Sign up!"), ['/activeuser/account/register'], ['tabindex' => '4']) ?> |
50
|
|
|
</p> |
51
|
|
|
<?php endif ?> |
52
|
|
|
</div> |
53
|
|
|
</div> |
54
|
|
|
</div> |
55
|
|
|
|
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.