From df7bf5c09ac43345ee6bbd12e13d6b2ee698c92b Mon Sep 17 00:00:00 2001 From: Martin Mares <mj@ucw.cz> Date: Mon, 12 Jul 2021 15:32:19 +0200 Subject: [PATCH] =?UTF-8?q?Registrace:=20Nastaven=C3=AD=20kola?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mo/web/org_round.py | 4 ++++ mo/web/templates/org_round.html | 2 ++ 2 files changed, 6 insertions(+) diff --git a/mo/web/org_round.py b/mo/web/org_round.py index b4da3657..7fc300ec 100644 --- a/mo/web/org_round.py +++ b/mo/web/org_round.py @@ -446,6 +446,8 @@ class RoundEditForm(FlaskForm): "Přesnost bodování", choices=db.round_points_step_choices, coerce=decimal.Decimal, description="Ovlivňuje možnost zadávání nových bodů, již uložené body nezmění" ) + enroll_mode = wtforms.SelectField("Režim přihlašování", choices=db.RoundEnrollMode.choices(), coerce=db.RoundEnrollMode.coerce) + enroll_advert = wtforms.StringField("Popis v přihlášce") has_messages = wtforms.BooleanField("Zprávičky pro účastníky (aktivuje možnost vytvářet novinky zobrazované účastníkům)") submit = wtforms.SubmitField('Uložit') @@ -483,6 +485,8 @@ def org_round_edit(id: int): del form.score_winner_limit del form.score_successful_limit del form.points_step + # ani nastavení přihlašování + del form.enroll_mode if form.validate_on_submit(): form.populate_obj(round) diff --git a/mo/web/templates/org_round.html b/mo/web/templates/org_round.html index 2d13b181..ddddc7df 100644 --- a/mo/web/templates/org_round.html +++ b/mo/web/templates/org_round.html @@ -34,6 +34,8 @@ {% with state=round.ct_state() %} <tr><td>Stav pro účastníky<td class='rstate-{{state.name}}'>{{ state.friendly_name() }} {% endwith %} + <tr><td>Režim přihlašování<td>{{ round.enroll_mode.friendly_name() }} + <tr><td>Popis v přihlášce<td>{{ round.enroll_advert }} </table> <table class=data style="float: left;"> <thead> -- GitLab