login.php 1.93 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);
?>


<div class="container-fluid">
	<div class="checkout-form row">
		<?php
			$form = ActiveForm::begin(
				[
					'id' => 'order-form',
					'options' => [
							'class' => 'form-bottom col-md-6 col-md-offset-3'
					],
					'fieldConfig' => [
						 'options' => [
							 'tag' => false,
						 ]
					]
				]
			);
		?>

		<h2 class="form-signin-heading">Please sign in</h2>
		<div class="form-login">
			<?= $form->field($model, 'username', [
				'inputTemplate' => '{input}',
				'template' => '<div class="field-loginform-username required form-group form-group-lg">{label}{input}{error}{hint}</div>',
			])->textInput(['autofocus' => true])->input('text', ['placeholder' => "Login *"])->label(false); ?>
			<?= $form->field($model, 'password', [
				'inputTemplate' => '{input}',
				'template' => '<div class="field-loginform-password required form-group form-group-lg">{label}{input}{error}{hint}</div>',
			])->passwordInput()->input('password', ['placeholder' => "Password *"])->label(false); ?>
			<div class="action-login">
				<div class="btn-login btn-theme btn-medium">
					<?= Html::submitButton('<span>Login</span>', ['class' => 'class="btn btn-primary btn-lg btn-block', 'name' => 'auth']) ?>
					<div class="radio">
						<label> <?= $form->field($model, 'rememberMe')->checkbox(['template' => "{input} {label} {error}",]) ?></label>
					</div>
				</div>
			</div>
		</div>
		<?php ActiveForm::end(); ?>
	</div>
</div>