| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110 |
- <?php
- /*
- * This file is part of the Dektrium project.
- *
- * (c) Dektrium project <http://github.com/dektrium>
- *
- * For the full copyright and license information, please view the LICENSE.md
- * file that was distributed with this source code.
- */
- use dektrium\user\widgets\Connect;
- use dektrium\user\models\LoginForm;
- use yii\helpers\Html;
- use yii\widgets\ActiveForm;
- /**
- * @var yii\web\View $this
- * @var dektrium\user\models\LoginForm $model
- * @var dektrium\user\Module $module
- */
- $this->title = \Yii::t('user', 'Sign in');
- $this->params['breadcrumbs'][] = $this->title;
- $this->params['body-class']['class'] = 'login-page';
- ?>
- <div class="login-box">
- <div class="login-logo">
- <?= Html::encode($this->title) ?>
- </div>
- <!-- /.login-logo -->
- <div class="card">
- <div class="card-body login-card-body">
- <?= $this->render('/_alert', ['module' => Yii::$app->getModule('user')]) ?>
- <?php $form = ActiveForm::begin([
- 'id' => 'login-form',
- 'enableAjaxValidation' => true,
- 'enableClientValidation' => false,
- 'validateOnBlur' => false,
- 'validateOnType' => false,
- 'validateOnChange' => false,
- ]) ?>
- <?php if ($module->debug): ?>
- <?= $form->field($model, 'login', [
- 'inputOptions' => [
- 'autofocus' => 'autofocus',
- 'class' => 'form-control',
- 'tabindex' => '1']])->dropDownList(LoginForm::loginList());
- ?>
- <?php else: ?>
- <?= $form->field($model, 'uuid', ['inputOptions' => ['autofocus' => 'autofocus', 'class' => 'form-control', 'tabindex' => '1']]); ?>
- <?php endif ?>
- <?php if ($module->debug): ?>
- <div class="alert alert-warning">
- <?= Yii::t('user', 'Password is not necessary because the module is in DEBUG mode.'); ?>
- </div>
- <?php else: ?>
- <?= $form->field(
- $model,
- 'password',
- ['inputOptions' => ['class' => 'form-control', 'tabindex' => '2']])
- ->passwordInput()
- ->label(
- Yii::t('user', 'Password')
- . ($module->enablePasswordRecovery ?
- ' (' . Html::a(
- Yii::t('user', 'Forgot password?'),
- ['/user/recovery/request'],
- ['tabindex' => '5']
- )
- . ')' : '')
- ) ?>
- <?php endif ?>
- <?= $form->field($model, 'rememberMe')->checkbox(['tabindex' => '3']) ?>
- <?= Html::submitButton(
- Yii::t('user', 'Sign in'),
- ['class' => 'btn btn-primary btn-block', 'tabindex' => '4']
- ) ?>
- <?php ActiveForm::end(); ?>
- <?php if ($module->enableConfirmation): ?>
- <p class="text-center">
- <?= Html::a(Yii::t('user', 'Didn\'t receive confirmation message?'), ['/user/registration/resend']) ?>
- </p>
- <?php endif ?>
- <?php if ($module->enableRegistration): ?>
- <p class="text-center">
- <?= Html::a(Yii::t('user', 'Don\'t have an account? Sign up!'), ['/user/registration/register']) ?>
- </p>
- <?php endif ?>
- <?= Connect::widget([
- 'baseAuthUrl' => ['/user/security/auth'],
- ]) ?>
- </div>
- <!-- /.login-card-body -->
- </div>
- </div>
|