<?php

/* @var $this yii\web\View */
/* @var $form yii\bootstrap\ActiveForm */
/* @var $model \common\models\LoginForm */

use common\models\LoginForm;
use yii\helpers\Html;
use yii\bootstrap\ActiveForm;
use yii\helpers\Url;

$this->title = 'Login';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="modal_wrapper_login">
    <!-- 	<form name="login_form"> -->
    <div class="modal_window">
        <?php $form = ActiveForm::begin([
            'action'=>Url::toRoute('site/login'),
        ]); ?>
        <div class="title"><?= Yii::t('app', 'your_personal_area') ?></div>
        <div class="modal_close_btn"></div>
        <?= $form->field(new LoginForm(), 'email',
            [
                'template' => '<label>'.Yii::t('app', 'email').'{input}{error}{hint}</label>',
            ]
        )->textInput(['autofocus' => true]) ?>

        <?= $form->field(new LoginForm(), 'password',
            [
                'template' => '<label>'.Yii::t('app', 'password').'{input}{error}{hint}</label>',
            ]
        )->passwordInput() ?>


        <div class="pass_links">
            <?= $form->field(new LoginForm(), 'rememberMe',[
                'checkboxTemplate' => "{beginLabel}\n{input}\n{labelTitle}\n{endLabel}",

            ])->checkbox() ?>


            <?= Html::a(Yii::t('app', 'forgot_password'), ['site/request-password-reset'],['class'=>'forgot_pass_link']) ?>
        </div>

        <div class="for_btn_position">
            <?= Html::submitButton(Yii::t('app','enter'), ['class' => 'my_cust_btn', 'name' => 'login-button']) ?>
        </div>
        <?php ActiveForm::end(); ?>
    </div>
    <!-- 	</form> -->
</div>