login.php 2.63 KB
<?php
    
    /**
     * @var string        $content
     * @var \yii\web\View $this
     * @var LoginForm     $model
     */
    
    use common\models\LoginForm;
    use yii\helpers\Html;
    use yii\widgets\ActiveForm;
    
    $this->registerCssFile('/admin/core/css/login-new.css');

?>
<?php $this->beginPage(); ?>
<!DOCTYPE html>
<html lang="<?= Yii::$app->language ?>">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <meta charset="<?= Yii::$app->charset ?>"/>
        <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
        <meta name="viewport" content="width=device-width, initial-scale=1"/>
        <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Ubuntu:400,500,700" media="all">
        <?= Html::csrfMetaTags() ?>
        <title><?= Html::encode($this->title) ?></title>
        <?php $this->head() ?>
    </head>
    <body style="">
        <?php $this->beginBody(); ?>
        <!--если шоп то добавить класс ".shop"-->
        <div class="form-login-wrapp animated">
            <div class="style logo-form-wr">
                <div></div>
            </div>
            <div class="style start-form">
                <?php $form = ActiveForm::begin(
                    [
                        'id'             => 'login-form',
                        'validateOnBlur' => false,
                    ]
                ); ?>

                <div class="inputs-wrapp style">
                    <?= $form->field($model, 'username',['template' => '{input}'])
                        ->textInput()->input('text', ['placeholder' => $model->getAttributeLabel('username')])->label(false); ?>

                    <?= $form->field($model, 'password',['template' => '{input}'])
                        ->passwordInput()->input('password', ['placeholder' => $model->getAttributeLabel('password')])->label(false); ?>
                </div>
                <div class="checks-wrapp style">
                    <?= $form->field($model, 'rememberMe',['template' => '{input}{label}'])
                        ->label('<span></span>'.$model->getAttributeLabel('rememberMe'))
                        ->checkbox([], false) ?>
                </div>


                <div class="style button-wr">
                    <?= Html::submitButton(
                        'Login',
                        [
                            'name'  => 'login-button',
                        ]
                    ) ?>
                </div>

                <?php ActiveForm::end(); ?>
            </div>
        </div>
        <?php $this->endBody(); ?>
    </body>
</html>
<?php $this->endPage(); ?>