Restrict offline participation to single-puzzle
Some checks failed
CI / scan_ruby (push) Failing after 17s
CI / scan_js (push) Successful in 13s
CI / lint (push) Successful in 14s
CI / test (push) Has been cancelled

contests
This commit is contained in:
sto
2025-11-07 09:30:04 +01:00
parent ae5082fff6
commit a1736ff076
7 changed files with 20 additions and 9 deletions

View File

@@ -17,9 +17,18 @@ h4.mt-5 = t("contests.form.general")
= form.label :public
.row.mb-3
.col
.form-check.form-switch
= form.check_box :offline_form, class: "form-check-input"
= form.label :offline_form
- if @contest.puzzles.length <= 1
.form-check.form-switch
= form.check_box :offline_form, class: "form-check-input"
= form.label :offline_form
.form-text = t("activerecord.attributes.contest.offline_form_warning")
.form-text = t("activerecord.attributes.contest.offline_form_description")
- else
.form-check.form-switch
= form.check_box :offline_form_fake, class: "form-check-input", disabled: true
= form.label :offline_form
.form-text = t("activerecord.attributes.contest.offline_form_warning")
.form-text = t("activerecord.attributes.contest.offline_form_description")
.row.mb-3
.col
.form-check.form-switch