Make public contestant forms activated only when organizers code are set
All checks were successful
CI / scan_ruby (push) Successful in 16s
CI / scan_js (push) Successful in 13s
CI / lint (push) Successful in 13s
CI / test (push) Successful in 35s

#20
This commit is contained in:
sto
2025-12-04 10:50:10 +01:00
parent d08370f5f8
commit a2a8a9fcef
3 changed files with 5 additions and 5 deletions

View File

@@ -144,7 +144,7 @@ class ContestantsController < ApplicationController
skip_authorization skip_authorization
@contestant = Contestant.find(params[:contestant_id]) @contestant = Contestant.find(params[:contestant_id])
if !@contestant if !@contestant || !@contestant.contest.code.present?
not_found and return not_found and return
end end
@contest = @contestant.contest @contest = @contestant.contest
@@ -161,7 +161,7 @@ class ContestantsController < ApplicationController
skip_authorization skip_authorization
@contestant = Contestant.find(params[:contestant_id]) @contestant = Contestant.find(params[:contestant_id])
if !@contestant if !@contestant || !@contestant.contest.code.present?
not_found and return not_found and return
end end
@contest = @contestant.contest @contest = @contestant.contest
@@ -191,7 +191,7 @@ class ContestantsController < ApplicationController
skip_authorization skip_authorization
@contestant = Contestant.find(params[:contestant_id]) @contestant = Contestant.find(params[:contestant_id])
if !@contestant if !@contestant || !@contestant.contest.code.present?
not_found and return not_found and return
end end
I18n.locale = @contestant.contest.lang I18n.locale = @contestant.contest.lang

View File

@@ -55,7 +55,7 @@ en:
remaining_pieces: Remaining pieces (not completed puzzle) remaining_pieces: Remaining pieces (not completed puzzle)
contest: contest:
code: Code for onsite judges code: Code for onsite judges
code_description: Only useful for onsite contests, if printing QR codes on tables code_description: Optional. Used for organizers on onsite contests, when printing QR codes on tables
duration: Duration duration: Duration
duration_description: Format h:mm or hh:mm duration_description: Format h:mm or hh:mm
lang: Language for the public scoreboard lang: Language for the public scoreboard

View File

@@ -26,7 +26,7 @@ fr:
remaining_pieces: Pièces restantes (puzzle non fini) remaining_pieces: Pièces restantes (puzzle non fini)
contest: contest:
code: Code pour les organisateur.ice.s code: Code pour les organisateur.ice.s
code_description: Utile uniquement pour les concours en présentiel, si les QR codes sont imprimés et placés sur les tables code_description: Optionnel. Utilisé pour les organisateur.ices dans les concours en présentiel lorsque sont imprimés des QR codes à placer sur les tables
duration: Durée duration: Durée
duration_description: Format h:mm ou hh:mm duration_description: Format h:mm ou hh:mm
lang: Langue pour le classement public lang: Langue pour le classement public