Warning in offline settings when more than one puzzle
This commit is contained in:
@@ -1,20 +1,27 @@
|
|||||||
= render "settings_nav"
|
= render "settings_nav"
|
||||||
|
|
||||||
= form_with model: @contest, url: "/contests/#{@contest.id}/settings/offline" do |form|
|
- if @contest.puzzles.length > 1
|
||||||
.row.mt-2.mb-3
|
.row
|
||||||
.col
|
.col
|
||||||
- if @contest.puzzles.length <= 1
|
.alert.alert-warning
|
||||||
.form-check.form-switch
|
= t("contests.form.offline_single_puzzle_warning")
|
||||||
= form.check_box :offline_form, class: "form-check-input"
|
|
||||||
= form.label :offline_form
|
- if @contest.puzzles.length <= 1
|
||||||
.form-text = t("activerecord.attributes.contest.offline_form_warning")
|
= form_with model: @contest, url: "/contests/#{@contest.id}/settings/offline" do |form|
|
||||||
.form-text = t("activerecord.attributes.contest.offline_form_description")
|
.row.mt-2.mb-3
|
||||||
- else
|
.col
|
||||||
.form-check.form-switch
|
- if @contest.puzzles.length <= 1
|
||||||
= form.check_box :offline_form_fake, class: "form-check-input", disabled: true
|
.form-check.form-switch
|
||||||
= form.label :offline_form
|
= form.check_box :offline_form, class: "form-check-input"
|
||||||
.form-text = t("activerecord.attributes.contest.offline_form_warning")
|
= form.label :offline_form
|
||||||
.form-text = t("activerecord.attributes.contest.offline_form_description")
|
.form-text = t("activerecord.attributes.contest.offline_form_warning")
|
||||||
.row.mt-4
|
.form-text = t("activerecord.attributes.contest.offline_form_description")
|
||||||
.col
|
- else
|
||||||
= form.submit t("helpers.buttons.update"), class: "btn btn-primary"
|
.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.mt-4
|
||||||
|
.col
|
||||||
|
= form.submit t("helpers.buttons.update"), class: "btn btn-primary"
|
||||||
@@ -177,6 +177,7 @@ en:
|
|||||||
categories: Participant categories
|
categories: Participant categories
|
||||||
general: General parameters
|
general: General parameters
|
||||||
offline: Offline participation
|
offline: Offline participation
|
||||||
|
offline_single_puzzle_warning: This is not available for contests with more than one puzzle
|
||||||
index:
|
index:
|
||||||
title: Welcome %{username}!
|
title: Welcome %{username}!
|
||||||
manage_contests: Manage my contests
|
manage_contests: Manage my contests
|
||||||
|
|||||||
@@ -148,6 +148,7 @@ fr:
|
|||||||
categories: Catégories de participant.e.s
|
categories: Catégories de participant.e.s
|
||||||
general: Paramètres généraux
|
general: Paramètres généraux
|
||||||
offline: Participation hors-ligne
|
offline: Participation hors-ligne
|
||||||
|
offline_single_puzzle_warning: Ce n'est pas activable pour les concours avec plusieurs puzzles
|
||||||
index:
|
index:
|
||||||
title: Bienvenue %{username} !
|
title: Bienvenue %{username} !
|
||||||
manage_contests: Mes concours de puzzle
|
manage_contests: Mes concours de puzzle
|
||||||
|
|||||||
Reference in New Issue
Block a user