Files
delta_framework/templates/login.twig
T

44 lines
2.1 KiB
Twig
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{% extends 'layout.twig' %}
{% import '_icons.twig' as icons %}
{% block title %}Авторизация{% endblock %}
{% block main %}
<div class="auth-shell">
<div class="auth-card">
<div class="auth-box">
<div class="page-head-icon">{{ icons.login() }}</div>
<h1>Авторизация</h1>
<p class="page-subtitle">Войдите, чтобы продолжить работу</p>
{% if failed %}
<div class="alert alert-error">{{ icons.warning() }}<span>{{ errorMessage }}</span></div>
{% endif %}
<form action="/login/authorize" method="POST">
<input class="input" type="text" name="login" placeholder="Введите логин">
<input class="input" type="password" name="password" placeholder="Введите пароль">
{% if USE_CAPTCHA %}
<div class="input captchaInput">
<img id="captchaCode" src="{{ SITE_URL }}/core/captcha.php">
<span id="updateCaptcha" class="button button-ghost" style="vertical-align: super;">Обновить код</span>
</div>
<input type="text" class="input" name="captchaCode" placeholder="Код с картинки">
<script>
$(document).ready(function () {
let $captchaImage = $('#captchaCode'),
$captchaSrc = $captchaImage.attr('src'),
$updateBtn = $('#updateCaptcha');
$updateBtn.click(function () {
$captchaImage.attr('src', $captchaSrc + `?v=${new Date().getTime()}`);
});
});
</script>
{% endif %}
<button class="button w100" type="submit">Войти</button>
</form>
</div>
</div>
</div>
{% endblock %}