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', 'Restore forgotten password'); |
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 if (!empty($error)): ?> |
20
|
|
|
<div class="alert alert-danger"><?= $error ?></div> |
21
|
|
|
<?php endif; ?> |
22
|
|
|
<?php $form = ActiveForm::begin([ |
23
|
|
|
'enableAjaxValidation' => false, |
24
|
|
|
'enableClientValidation' => false, |
25
|
|
|
'enableClientScript' => false, |
26
|
|
|
'validateOnBlur' => false, |
27
|
|
|
'validateOnType' => false, |
28
|
|
|
'validateOnChange' => false, |
29
|
|
|
]) ?> |
30
|
|
|
|
31
|
|
|
<?= $form->field($model, 'email', [ |
32
|
|
|
'inputOptions' => [ |
33
|
|
|
'autofocus' => 'autofocus', |
34
|
|
|
'class' => 'form-control', |
35
|
|
|
'tabindex' => '1', |
36
|
|
|
], |
37
|
|
|
]) ?> |
38
|
|
|
|
39
|
|
|
<?= Html::submitButton(Yii::t('activeuser_frontend', 'Send message'), [ |
40
|
|
|
'class' => 'btn btn-warning btn-block', 'tabindex' => '2' |
41
|
|
|
]) ?> |
42
|
|
|
|
43
|
|
|
<?php ActiveForm::end(); ?> |
44
|
|
|
</div> |
45
|
|
|
</div> |
46
|
|
|
<div class="text-center"> |
47
|
|
|
<p class="activeuser-login"> |
48
|
|
|
<?= Html::a(Yii::t('activeuser_frontend', 'Sign in'), ['/activeuser/account/login'], ['tabindex' => '3']) ?> |
49
|
|
|
</p> |
50
|
|
View Code Duplication |
<?php if ($model->module->enableRegistration): ?> |
|
|
|
|
51
|
|
|
<p class="activeuser-register"> |
52
|
|
|
<?= Html::a(Yii::t('activeuser_frontend', "Don't have an account? Sign up!"), ['/activeuser/account/register'], ['tabindex' => '4']) ?> |
53
|
|
|
</p> |
54
|
|
|
<?php endif ?> |
55
|
|
|
</div> |
56
|
|
|
</div> |
57
|
|
|
</div> |
58
|
|
|
|
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.