sto 6f07ec802f
Some checks failed
CI / scan_ruby (push) Has been cancelled
CI / scan_js (push) Has been cancelled
CI / lint (push) Has been cancelled
CI / test (push) Has been cancelled
Allow to delete puzzles
2025-03-16 15:00:54 +01:00

15 lines
587 B
Plaintext

= form_with model: puzzle, url: url, method: method 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-text Select an image
= form.file_field :image, accept: "image/*", class: "form-control"
.row.mt-4
.col
- if method == :patch
= link_to "Delete", contest_puzzle_path(contest, puzzle), data: { turbo_method: :delete }, class: "btn btn-danger me-2"
= form.submit submit_text, class: "btn btn-primary"