58 lines
2.5 KiB
HTML
58 lines
2.5 KiB
HTML
{% extends "base.html" %}
|
|
{% block title %}Вход — Тестирование{% endblock %}
|
|
|
|
{% block content %}
|
|
{% set fio_as_login = dev_fio_enabled or hr_auth_enabled %}
|
|
<div class="login-page">
|
|
<div class="login-shell">
|
|
<div class="login-logo">
|
|
<img src="{{ url_for('static', filename='img/clinic-logo.png') }}"
|
|
alt="Логотип клиники" class="login-logo__img" />
|
|
<h1 class="font-headline">Тестирование</h1>
|
|
</div>
|
|
|
|
{% with messages = get_flashed_messages(with_categories=true) %}
|
|
{% if messages %}
|
|
<div class="callout callout--error" style="margin-bottom: 1rem;">
|
|
{% for category, msg in messages %}
|
|
{% if category == 'error' %}{{ msg }}{% endif %}
|
|
{% endfor %}
|
|
</div>
|
|
{% endif %}
|
|
{% endwith %}
|
|
|
|
<div class="login-card">
|
|
{% if dev_fio_enabled %}
|
|
<p style="font-size:0.8rem; color:#4b7b78; margin-bottom:0.75rem; line-height:1.4;">
|
|
Введите <b>ФИО</b> из кадровой системы и общий dev-пароль — или обычный логин/пароль.
|
|
</p>
|
|
{% elif hr_auth_enabled %}
|
|
<p style="font-size:0.8rem; color:#4b7b78; margin-bottom:0.75rem; line-height:1.4;">
|
|
Можно ввести <b>логин</b> из HR или <b>ФИО</b> (как в кадровой системе), если совпадение одно, и пароль учётной записи HR.
|
|
</p>
|
|
{% endif %}
|
|
<form method="post" action="{{ url_for('auth.login_submit') }}" novalidate>
|
|
<input type="hidden" name="next" value="{{ next or '/' }}">
|
|
|
|
<div class="form-field">
|
|
<label class="form-label" for="login-username">
|
|
{% if fio_as_login %}ФИО или логин{% else %}Логин{% endif %}
|
|
</label>
|
|
<input id="login-username" class="form-input" type="text" name="login"
|
|
value="{{ login or '' }}" required autofocus autocomplete="username"
|
|
placeholder="{% if fio_as_login %}Иванов Иван Иванович{% endif %}" />
|
|
</div>
|
|
|
|
<div class="form-field">
|
|
<label class="form-label" for="login-password">Пароль</label>
|
|
<input id="login-password" class="form-input" type="password" name="password"
|
|
required autocomplete="current-password" />
|
|
</div>
|
|
|
|
<button type="submit" class="btn btn-primary">Войти</button>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|