Доработки клиентского интерфейса + мелкие правки

This commit is contained in:
rsgrinko committed 2026-07-24 14:48:57 +03:00
1 parent c43bcff23f
commit 55078ddb36
21 files changed
+2172 -521

No files matched your search

+38 -29
View File
@@ -1,34 +1,43 @@
{% extends 'layout.twig' %}
{% import '_icons.twig' as icons %}
{% block title %}Авторизация{% endblock %}
{% block main %}
<h1>Авторизация</h1>
{% if failed %}
<div class="alert alert-error">{{ errorMessage }}</div>
{% endif %}
<p>
<form action="/login/authorize" method="POST">
<input class="input" type="text" name="login" placeholder="Введите логин">
<input class="input" type="password" name="password" placeholder="Введите пароль">
<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 USE_CAPTCHA %}
<div class="input captchaInput">
<img id="captchaCode" src="{{ SITE_URL }}/core/captcha.php">
<span id="updateCaptcha" class="button" style="vertical-align: super;">Обновить код</span>
{% 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>
<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>
</p>
{% endblock %}
</div>
</div>
{% endblock %}