From 99bd1da6a61763d3a7d54200bcd216cd1b55b351 Mon Sep 17 00:00:00 2001
From: Martin Mares <mj@ucw.cz>
Date: Fri, 24 Jan 2025 23:51:42 +0100
Subject: [PATCH] =?UTF-8?q?DSN:=20Na=20d=C5=AFle=C5=BEit=C3=BDch=20str?=
=?UTF-8?q?=C3=A1nk=C3=A1ch=20upozor=C5=88ujeme=20na=20nefunk=C4=8Dnost=20?=
=?UTF-8?q?e-mailu?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Vesměs to jsou vstupní body, ale také settings.
---
mo/web/templates/org_index.html | 2 ++
mo/web/templates/parts/check_dsn.html | 13 +++++++++++++
mo/web/templates/settings.html | 2 ++
mo/web/templates/user_index.html | 2 ++
mo/web/templates/user_join_list.html | 2 ++
5 files changed, 21 insertions(+)
create mode 100644 mo/web/templates/parts/check_dsn.html
diff --git a/mo/web/templates/org_index.html b/mo/web/templates/org_index.html
index d14d84b7..a0229652 100644
--- a/mo/web/templates/org_index.html
+++ b/mo/web/templates/org_index.html
@@ -3,6 +3,8 @@
{% block title %}Přístup pro organizátory{% endblock %}
{% block body %}
+{% include "parts/check_dsn.html" %}
+
{% if overview %}
<h3>Moje soutěže</h3>
diff --git a/mo/web/templates/parts/check_dsn.html b/mo/web/templates/parts/check_dsn.html
new file mode 100644
index 00000000..d32bb5d2
--- /dev/null
+++ b/mo/web/templates/parts/check_dsn.html
@@ -0,0 +1,13 @@
+{% if g.user.dsn %}
+
+<div class="alert alert-danger">
+ <p>E-mailová adresa spojená s tímto účtem není funkční – pošta se vrací jako nedoručitelná.</p>
+
+ <p>
+ <a class='btn btn-xs btn-primary' href='{{ url_for('user_validate_email') }}'>Ověřit e-mail</a>
+ <a class='btn btn-xs btn-primary' href='{{ url_for('user_settings_personal') }}'>Změnit e-mail</a>
+ <a class='btn btn-xs btn-default' href='{{ url_for('user_dsn') }}'>Detaily problémů</a>
+ </p>
+</div>
+
+{% endif %}
diff --git a/mo/web/templates/settings.html b/mo/web/templates/settings.html
index 50335f12..14350ca3 100644
--- a/mo/web/templates/settings.html
+++ b/mo/web/templates/settings.html
@@ -3,6 +3,8 @@
{% block title %}Uživatel {{ user.full_name() }}{% endblock %}
{% block body %}
+{% include "parts/check_dsn.html" %}
+
<h3>Osobní údaje</h3>
<table class=table>
diff --git a/mo/web/templates/user_index.html b/mo/web/templates/user_index.html
index ad3bf137..46d89241 100644
--- a/mo/web/templates/user_index.html
+++ b/mo/web/templates/user_index.html
@@ -2,6 +2,8 @@
{% block title %}Vítejte{% endblock %}
{% block body %}
+{% include "parts/check_dsn.html" %}
+
{% if pions %}
<p>Účastníte se následujících kol MO:
diff --git a/mo/web/templates/user_join_list.html b/mo/web/templates/user_join_list.html
index d6af6b73..c45c8e62 100644
--- a/mo/web/templates/user_join_list.html
+++ b/mo/web/templates/user_join_list.html
@@ -2,6 +2,8 @@
{% block title %}Přihláška do MO{% endblock %}
{% block body %}
+{% include "parts/check_dsn.html" %}
+
{% if available_rounds %}
<p>Zde si můžete vybrat, do kterých kategorií olympiády se přihlásíte.
--
GitLab