{* Страница входа пользователя *}
{$meta_title = "Вход" scope=parent}

{literal}
	<script src="https://www.google.com/recaptcha/api.js?render=6LegdywdAAAAADKhWf40ZE7xYCwRlvVg_mg3Ot0q"></script>
	<script>
		grecaptcha.ready(function () {
			grecaptcha.execute('6LegdywdAAAAADKhWf40ZE7xYCwRlvVg_mg3Ot0q', { action: 'contact' }).then(function (token) {
				var recaptchaResponse = document.getElementById('recaptchaResponseLogin');
				recaptchaResponse.value = token;
			});
		});
	</script>
{/literal}

<div class="title">Вход</div>
<div class="well">
{if $error}
<div class="message_error">
	{if $error == 'recaptcha'}Вы не прошли проверку защиты
	{elseif $error == 'login_incorrect'}Неверный логин или пароль
	{elseif $error == 'user_disabled'}Ваш аккаунт еще не активирован.
	{else}{$error}{/if}
</div>
{/if}

<form class="form login_form form-horizontal" method="post">
<div class="form-group">
	<label for="email" class="col-sm-2 control-label">Email</label>
	<div class="col-sm-10"><input class="form-control" type="text" name="email" data-format="email" data-notice="Введите email" value="{$email|escape}" maxlength="255" /></div>
</div>
<div class="form-group">
    <label for="password" class="col-sm-2 control-label">Пароль (<a href="/user/password_remind/">напомнить</a>)</label>
    <div class="col-sm-10"><input class="form-control" type="password" name="password" data-format=".+" data-notice="Введите пароль" value="" /></div>
</div>
	<input type="hidden" name="recaptcha_response" id="recaptchaResponseLogin">
	<input type="submit" class="btn btn-danger pull-right" name="login" value="Войти">
</form>
</div>