Skip to content
Snippets Groups Projects
Commit c0d9d364 authored by Martin Mareš's avatar Martin Mareš
Browse files

Stránka s nastavením soutěže umí přepnutí do stavu zadaného v URL

parent eef0cd85
No related branches found
No related tags found
1 merge request!125Průvodce soutěží pro garanty
...@@ -1632,6 +1632,14 @@ def org_contest_edit(ct_id: int): ...@@ -1632,6 +1632,14 @@ def org_contest_edit(ct_id: int):
if round.state != db.RoundState.delegate: if round.state != db.RoundState.delegate:
form.state.render_kw = {'disabled': ""} form.state.render_kw = {'disabled': ""}
form.state.description = 'Nastavení kola neumožňuje měnit stav soutěže.' form.state.description = 'Nastavení kola neumožňuje měnit stav soutěže.'
else:
new_state = request.args.get('set_state', "")
if new_state != "":
try:
form.state.data = db.RoundState.coerce(new_state)
flash(f'Žádáte změnu stavu soutěže na {form.state.data.friendly_name()}.', 'info')
except ValueError:
pass
if not ctx.rights.have_right(Right.edit_tex_hacks): if not ctx.rights.have_right(Right.edit_tex_hacks):
del form.tex_hacks del form.tex_hacks
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment