forked from amnah/yii2-user
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlogin.php
61 lines (48 loc) · 2 KB
/
login.php
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
<?php
use yii\helpers\Html;
use yii\widgets\ActiveForm;
/**
* @var yii\web\View $this
* @var yii\widgets\ActiveForm $form
* @var amnah\yii2\user\models\forms\LoginForm $model
*/
$this->title = Yii::t('user', 'Login');
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="user-default-login">
<h1><?= Html::encode($this->title) ?></h1>
<?php $form = ActiveForm::begin([
'id' => 'login-form',
'options' => ['class' => 'form-horizontal'],
'fieldConfig' => [
'template' => "{label}\n<div class=\"col-lg-3\">{input}</div>\n<div class=\"col-lg-7\">{error}</div>",
'labelOptions' => ['class' => 'col-lg-2 control-label'],
],
]); ?>
<?= $form->field($model, 'email') ?>
<?= $form->field($model, 'password')->passwordInput() ?>
<?= $form->field($model, 'rememberMe', [
'template' => "{label}<div class=\"col-lg-offset-2 col-lg-3\">{input}</div>\n<div class=\"col-lg-7\">{error}</div>",
])->checkbox() ?>
<div class="form-group">
<div class="col-lg-offset-2 col-lg-10">
<?= Html::submitButton(Yii::t('user', 'Login'), ['class' => 'btn btn-primary']) ?>
<br/><br/>
<?= Html::a(Yii::t("user", "Register"), ["/user/register"]) ?> /
<?= Html::a(Yii::t("user", "Forgot password") . "?", ["/user/forgot"]) ?> /
<?= Html::a(Yii::t("user", "Resend confirmation email"), ["/user/resend"]) ?>
</div>
</div>
<?php ActiveForm::end(); ?>
<?php if (Yii::$app->get("authClientCollection", false)): ?>
<div class="col-lg-offset-2 col-lg-10">
<?= yii\authclient\widgets\AuthChoice::widget([
'baseAuthUrl' => ['/user/auth/login']
]) ?>
</div>
<?php endif; ?>
<div class="col-lg-offset-2" style="color:#999;">
You may login with <strong>neo/neo</strong>.<br>
To modify the username/password, log in first and then <?= HTML::a("update your account", ["/user/account"]) ?>.
</div>
</div>