Make public contestant forms activated only when organizers code are set
#20
This commit is contained in:
@@ -144,7 +144,7 @@ class ContestantsController < ApplicationController
|
||||
skip_authorization
|
||||
|
||||
@contestant = Contestant.find(params[:contestant_id])
|
||||
if !@contestant
|
||||
if !@contestant || !@contestant.contest.code.present?
|
||||
not_found and return
|
||||
end
|
||||
@contest = @contestant.contest
|
||||
@@ -161,7 +161,7 @@ class ContestantsController < ApplicationController
|
||||
skip_authorization
|
||||
|
||||
@contestant = Contestant.find(params[:contestant_id])
|
||||
if !@contestant
|
||||
if !@contestant || !@contestant.contest.code.present?
|
||||
not_found and return
|
||||
end
|
||||
@contest = @contestant.contest
|
||||
@@ -191,7 +191,7 @@ class ContestantsController < ApplicationController
|
||||
skip_authorization
|
||||
|
||||
@contestant = Contestant.find(params[:contestant_id])
|
||||
if !@contestant
|
||||
if !@contestant || !@contestant.contest.code.present?
|
||||
not_found and return
|
||||
end
|
||||
I18n.locale = @contestant.contest.lang
|
||||
|
||||
@@ -55,7 +55,7 @@ en:
|
||||
remaining_pieces: Remaining pieces (not completed puzzle)
|
||||
contest:
|
||||
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_description: Format h:mm or hh:mm
|
||||
lang: Language for the public scoreboard
|
||||
|
||||
@@ -26,7 +26,7 @@ fr:
|
||||
remaining_pieces: Pièces restantes (puzzle non fini)
|
||||
contest:
|
||||
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_description: Format h:mm ou hh:mm
|
||||
lang: Langue pour le classement public
|
||||
|
||||
Reference in New Issue
Block a user