Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Odevzdávací Systém MO
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Martin Mareš
Odevzdávací Systém MO
Commits
d008b7eb
You need to sign in or sign up before continuing.
Commit
d008b7eb
authored
3 years ago
by
Martin Mareš
Browse files
Options
Downloads
Patches
Plain Diff
Přepínače stavů odkazují na návod
parent
4933459f
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
mo/web/org_contest.py
+1
-0
1 addition, 0 deletions
mo/web/org_contest.py
mo/web/org_round.py
+6
-2
6 additions, 2 deletions
mo/web/org_round.py
with
7 additions
and
2 deletions
mo/web/org_contest.py
+
1
−
0
View file @
d008b7eb
...
...
@@ -1570,6 +1570,7 @@ def org_contest_edit(ct_id: int):
assert
contest
and
round
form
=
ContestEditForm
(
obj
=
contest
)
form
.
state
.
description
=
Markup
(
"
Popis stavů najdete v <a href=
'"
+
url_for
(
'
doc_org
'
)
+
"
#kola
'
>návodu</a>.
"
)
if
round
.
state
!=
db
.
RoundState
.
delegate
:
form
.
state
.
render_kw
=
{
'
disabled
'
:
""
}
form
.
state
.
description
=
'
Nastavení kola neumožňuje měnit stav soutěže.
'
...
...
This diff is collapsed.
Click to expand it.
mo/web/org_round.py
+
6
−
2
View file @
d008b7eb
from
dataclasses
import
dataclass
,
field
import
decimal
from
flask
import
render_template
,
g
,
redirect
,
flash
,
request
from
flask
import
render_template
,
g
,
redirect
,
flash
,
request
,
url_for
import
locale
import
flask_wtf.file
from
flask_wtf.form
import
FlaskForm
import
bleach
from
bleach.sanitizer
import
ALLOWED_TAGS
import
markdown
from
markupsafe
import
Markup
import
os
from
sqlalchemy.orm
import
joinedload
from
typing
import
Optional
,
List
,
Dict
,
Tuple
,
Set
...
...
@@ -381,7 +382,7 @@ class RoundEditForm(FlaskForm):
)
state
=
wtforms
.
SelectField
(
"
Stav kola
"
,
choices
=
db
.
RoundState
.
choices
(),
coerce
=
db
.
RoundState
.
coerce
,
description
=
"
Stav soutěží ve všech oblastech kola. Pokud zvolíme
'
po oblastech
'
, každá soutěž si svůj stav určuje sama.
"
,
#
description
nastaveno za běhu, protože obsahuje generované odkazy
)
# Only the desktop Firefox does not support datetime-local field nowadays,
# other browsers does provide date and time picker UI :(
...
...
@@ -416,6 +417,9 @@ def org_round_edit(round_id: int):
round
=
ctx
.
round
form
=
RoundEditForm
(
obj
=
round
)
form
.
state
.
description
=
(
"
Stav soutěží ve všech oblastech kola (viz
"
+
Markup
(
"
<a href=
'"
+
url_for
(
'
doc_org
'
)
+
"
#kola
'
>návod</a>).
"
)
+
"
Pokud zvolíme „po oblastech“, každá soutěž si svůj stav určuje sama.
"
)
if
round
.
is_subround
():
# podkolo nemá nastavení výsledkové listiny
del
form
.
score_mode
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment