sto 2b1a2c9296
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
Add "public" setting to contests
2025-06-25 10:07:27 +02:00

31 lines
1.0 KiB
Plaintext

= form_with model: contest do |form|
.row.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.select :lang, Languages::AVAILABLE_LANGUAGES.map { |lang| [ lang[:name], lang[:id] ] }, {}, class: "form-select"
= form.label :lang
.row.mb-3
.col
.form-check.form-switch
= form.check_box :public, class: "form-check-input"
= form.label :public
.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
.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
.col
= form.submit submit_text, class: "btn btn-primary"