personal_area_php/frontend/views/site/login.php
2024-04-24 18:02:58 +03:00

64 lines
2.7 KiB
PHP

<?php
use yii\helpers\Html;
?>
<div class="card">
<div class="card-body login-card-body">
<p class="login-box-msg">Авторизируйтесь для начала работы</p>
<?php $form = \yii\bootstrap4\ActiveForm::begin(['id' => 'login-form']) ?>
<?= $form->field($model,'username', [
'options' => ['class' => 'form-group has-feedback'],
'inputTemplate' => '{input}<div class="input-group-append"><div class="input-group-text"><span class="fas fa-envelope"></span></div></div>',
'template' => '{beginWrapper}{input}{error}{endWrapper}',
'wrapperOptions' => ['class' => 'input-group mb-3']
])
->label(false)
->textInput(['placeholder' => $model->getAttributeLabel('username')]) ?>
<?= $form->field($model, 'password', [
'options' => ['class' => 'form-group has-feedback'],
'inputTemplate' => '{input}<div class="input-group-append"><div class="input-group-text"><span class="fas fa-lock"></span></div></div>',
'template' => '{beginWrapper}{input}{error}{endWrapper}',
'wrapperOptions' => ['class' => 'input-group mb-3']
])
->label(false)
->passwordInput(['placeholder' => $model->getAttributeLabel('password')]) ?>
<div class="row">
<div class="col-8">
<?= $form->field($model, 'rememberMe')->checkbox([
'template' => '<div class="icheck-primary">{input}{label}</div>',
'labelOptions' => [
'class' => ''
],
'uncheck' => null
]) ?>
</div>
<div class="col-4">
<?= Html::submitButton('Вход', ['class' => 'btn btn-primary btn-block']) ?>
</div>
</div>
<?php \yii\bootstrap4\ActiveForm::end(); ?>
<!-- <div class="social-auth-links text-center mb-3">-->
<!-- <p>- OR -</p>-->
<!-- <a href="#" class="btn btn-block btn-primary">-->
<!-- <i class="fab fa-facebook mr-2"></i> Sign in using Facebook-->
<!-- </a>-->
<!-- <a href="#" class="btn btn-block btn-danger">-->
<!-- <i class="fab fa-google-plus mr-2"></i> Sign in using Google+-->
<!-- </a>-->
<!-- </div>-->
<!-- /.social-auth-links -->
<p class="mb-1">
<a href="forgot-password.html">Забыл пароль</a>
</p>
<p class="mb-0">
<?= Html::a("Регистрация", \yii\helpers\Url::to(['site/signup']), ['class' => 'text-center']) ?>
</p>
</div>
<!-- /.login-card-body -->
</div>