forms-modal-login.php
2.03 KB
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
<?php
use common\models\LoginForm;
use yii\helpers\Html;
use yii\widgets\ActiveForm;
use yii\helpers\Url;
/**
* @var LoginForm $model
*/
?>
<div id="modal_form_login">
<div class="closed-form"></div>
<div class="form-resume-wr question">
<div class="form-resume-sub style">Авторизация</div>
<?php $form = ActiveForm::begin([
'action' => Url::toRoute('/site/login'),
'options' => [
'class' => 'form-horizontal',
'id' => 'login-form',
],
]); ?>
<?php echo $form->field(new LoginForm(), 'username', [ 'template' => "{label}\n{input}\n{error}" ])
->label('Логин')
->textInput (['class'=> 'custom-input-2']); ?>
<?php echo $form->field(new LoginForm(), 'password', [ 'template' => "{label}\n{input}\n{error}" ])
->label('Пароль')
->textInput (['class'=> 'custom-input-2','type'=>'password']); ?>
<div class="login-check-remember">
<?php echo $form->field(new LoginForm(), 'rememberMe', [ 'template' => "{input}\n{label}\n{error}" ])
->label('<span></span>Запомнить меня')
->checkbox([
'class' => 'custom-check',
'checked' => 'checked',
], false); ?>
</div>
<div class="form-actions style">
<?php echo Html::submitButton('Вход', [ 'class' => 'login-button' ]); ?>
</div>
<div class="style" style="margin-top: 14px; font-size: 13px; text-decoration: underline; text-align: center">
<?= Html::a('Забыли пароль?', [ 'site/request-password-reset' ]) ?>
</div>
<div class="style" style="margin-top: 9px; font-size: 13px; text-decoration: underline; text-align: center">
<?= Html::a('Регистрация', [ 'site/registration' ]) ?>
</div>
<?php ActiveForm::end(); ?>
<div class="res_form_line new-res_form_line"></div>
</div>
</div>