login.php 2.47 KB
<?php

/* @var $this yii\web\View */
/* @var $form yii\bootstrap\ActiveForm */

/* @var $model app\models\LoginForm */

use app\assets\MainAsset;
use yii\helpers\Html;
use yii\bootstrap\ActiveForm;

$this->params['breadcrumbs'][] = $this->title;

$this->title = Yii::$app->name . ' - Авторизация';
$this->registerMetaTag(['property' => 'keywords', 'content' => 'Авторизация']);
$this->registerMetaTag(['property' => 'description', 'content' => 'Авторизация']);

//MainAsset::register($this);
?>

<section id="main-content" class="checkout-page">
    <div class="container">
        <div class="checkout-form">
            <?php $form = ActiveForm::begin([
                'id' => 'order-form',
                'options' => ['class' => 'form-bottom row'],
                'fieldConfig' => [ /* классы полей формы */
                     'options' => [
                         'tag' => false,
                     ],
                ],
            ]); ?>
            <div class="col-md-6">
                <div class="form-login">
                    <?= $form->field($model, 'username', [
                        'inputTemplate' => '{input}',
                        'template' => '<div class="field-loginform-username required">{label}{input}{error}{hint}</div>',
                    ])->textInput(['autofocus' => true])->input('text', ['placeholder' => "Логин *"])->label(false); ?>
                    <?= $form->field($model, 'password', [
                        'inputTemplate' => '{input}',
                        'template' => '<div class="field-loginform-password required">{label}{input}{error}{hint}</div>',
                    ])->passwordInput()->input('password', ['placeholder' => "Пароль *"])->label(false); ?>
                    <div class="action-login">
                        <div class="btn-login btn-theme btn-medium">
                            <?= Html::submitButton('<span>Авторизоваться</span>', ['class' => 'class="proceed-checkout btn-theme btn-lage mybtn', 'name' => 'auth']) ?>
                            <div class="radio">
                                <label> <?= $form->field($model, 'rememberMe')->checkbox(['template' => "{input} {label} {error}",]) ?></label>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="col-md-6"></div>
            <?php ActiveForm::end(); ?>
        </div>
    </div>
</section>