Add hidden setting to puzzles
All checks were successful
CI / scan_ruby (push) Successful in 16s
CI / scan_js (push) Successful in 13s
CI / lint (push) Successful in 14s
CI / test (push) Successful in 36s

#19
This commit is contained in:
sto
2025-12-04 11:35:41 +01:00
parent a2a8a9fcef
commit 51e55f0828
11 changed files with 36 additions and 10 deletions

View File

@@ -21,6 +21,13 @@
.form-floating
= form.number_field :pieces, autocomplete: "off", class: "form-control"
= form.label :pieces, class: "required"
.row.mb-3
.col
.form-check.form-switch
= form.check_box :hidden, class: "form-check-input"
= form.label :hidden
.form-text
= t("activerecord.attributes.puzzle.hidden_description")
.row.mb-3
.col
.form-text.mb-1
@@ -42,7 +49,7 @@
}
setMaxUploadSize();
.row.mt-4
.row.mt-4.mb-5
.col
- if method == :patch
= link_to t("helpers.buttons.delete"), contest_puzzle_path(contest, puzzle), data: { turbo_method: :delete }, class: "btn btn-danger me-2"