42 lines
1.6 KiB
Plaintext
42 lines
1.6 KiB
Plaintext
= form_with model: @contest, url: "/contests/#{@contest.id}/settings/general" do |form|
|
|
.row.mt-2.mb-3
|
|
.col
|
|
.form-floating
|
|
= form.text_field :name, autocomplete: "off", class: "form-control"
|
|
= form.label :name, class: "required"
|
|
.row.mb-3
|
|
.col
|
|
.form-floating
|
|
= form.text_field :duration, autocomplete: "off", class: "form-control"
|
|
= form.label :duration, class: "required"
|
|
.form-text = t("activerecord.attributes.contest.duration_description")
|
|
.row.mb-3
|
|
.col
|
|
.form-floating
|
|
= form.select :lang, Languages::AVAILABLE_LANGUAGES.map { |lang| [ lang[:name], lang[:id] ] }, {}, class: "form-select"
|
|
= form.label :lang
|
|
.row.mt-4.mb-3
|
|
.col
|
|
.form-check.form-switch
|
|
= form.check_box :public, class: "form-check-input"
|
|
= form.label :public
|
|
.row.mb-3
|
|
.col
|
|
.form-floating
|
|
= form.select :ranking_mode, Ranking::AVAILABLE_RANKING_MODES.map { |mode| [ mode[:name], mode[:id] ] }, {}, class: "form-select"
|
|
= form.label :ranking_mode
|
|
.row.mb-3
|
|
.col
|
|
.form-check.form-switch
|
|
= form.check_box :team, class: "form-check-input"
|
|
= form.label :team
|
|
.form-text = t("activerecord.attributes.contest.team_description")
|
|
.row.mb-3 style="display: none"
|
|
.col
|
|
.form-check.form-switch
|
|
= form.check_box :allow_registration, class: "form-check-input"
|
|
= form.label :allow_registration
|
|
.form-text = t("activerecord.attributes.contest.allow_registration_description")
|
|
.row.mt-4
|
|
.col
|
|
= form.submit t("helpers.buttons.update"), class: "btn btn-primary" |