login.php
3.81 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
<?php
/* @var $this yii\web\View */
/* @var $form yii\bootstrap\ActiveForm */
/* @var $loginForm \common\models\LoginForm */
/* @var $signupForm \common\models\SignupForm */
use yii\bootstrap\ActiveForm;
use yii\bootstrap\Html;
use yii\helpers\Url;
$this->title = \Yii::t('app', 'registration');
$this->params[ 'breadcrumbs' ][] = $this->title;
?>
<div id="content">
<div class="container">
<div class="row">
<div class="col-md-6">
<div class="box">
<h2 class="text-uppercase"><?php echo \Yii::t('app', 'New account'); ?></h2>
<p class="lead"><?php echo \Yii::t('app', 'Not registered yet?'); ?></p>
<p class="text-muted"><?php echo \Yii::t(
'app',
'registration_text',
[
'link' => Html::a(
\Yii::t('app', 'write to us'),
[
'site/contact',
]
),
]
); ?></p>
<hr>
<?php
$formSignup = ActiveForm::begin();
echo $formSignup->field($signupForm, 'username')
->textInput();
echo $formSignup->field($signupForm, 'email')
->textInput();
echo $formSignup->field($signupForm, 'password')
->passwordInput();
echo Html::tag(
'div',
Html::submitButton(
Html::icon(
'user-md',
[
'prefix' => 'fa fa-',
]
) . \Yii::t('app', 'Register now!'),
[
'class' => 'btn btn-template-main',
]
),
[
'class' => 'text-center',
]
);
$formSignup::end();
?>
</div>
</div>
<div class="col-md-6">
<div class="box">
<h2 class="text-uppercase"><?php echo \Yii::t('app', 'Enter'); ?></h2>
<p class="lead"><?php echo \Yii::t('app', 'Already registered?'); ?></p>
<hr>
<?php
$formLogin = ActiveForm::begin();
echo $formLogin->field($loginForm, 'username')
->textInput();
echo $formLogin->field($loginForm, 'password')
->passwordInput();
echo $formLogin->field($loginForm, 'rememberMe')
->checkbox();
?>
<a class="restore_password_" href="<?= Url::to(
[
'/site/request-password-reset',
]
) ?>"><?=Yii::t('app','Restore password')?></a>
<?php
echo Html::tag(
'div',
Html::submitButton(
Html::icon(
'sign-in',
[
'prefix' => 'fa fa-',
]
) . \Yii::t('app', 'Login'),
[
'class' => 'btn btn-template-main',
]
),
[
'class' => 'text-center',
]
);
$formSignup::end();
?>
</div>
</div>
</div>
<!-- /.row -->
</div>
<!-- /.container -->
</div>