<?php

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


?>
<div class="modal fade" id="myAccount" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog auth" role="document">
        <div class="modal-content">

            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <span class="modal-title" id="myModalLabel">Вход в личный кабинет</span>
            </div>

            <div class="modal-body">
                <?php

                $form = ActiveForm::begin([
                    'action'=>Url::toRoute('site/login'),
                ]); ?>

                <?= $form->field(new LoginForm(), 'email' )->textInput(['autofocus' => true]) ?>

                <?= $form->field(new LoginForm(), 'password')->passwordInput() ?>


                <div class="pass_links">
                    <?= $form->field(new LoginForm(), 'rememberMe')->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>

                <ul class="ul links">
                    <li><a href="#" data-dismiss="modal" data-toggle="modal" data-target="#forgotPass">Напомнить пароль</a></li>
                    <li><a href="#" data-dismiss="modal" data-toggle="modal" data-target="#regMe">Создать новый профиль</a></li>
                </ul>
                <?php ActiveForm::end(); ?>


            </div>

            <div class="modal-footer">
            </div>

        </div>
    </div>
</div>