Files
puzzle-scoreboard/app/views/application/_modal.html.slim
sto 8dc45a2ca2
All checks were successful
CI / scan_ruby (push) Successful in 21s
CI / scan_js (push) Successful in 15s
CI / lint (push) Successful in 16s
CI / test (push) Successful in 40s
Allow to delete contests
2026-03-11 09:33:35 +01:00

18 lines
816 B
Plaintext

.modal id="#{modal_id}" tabindex=-1 style="position:fixed; background-color: rgba(0, 0, 0, 0.5)"
.modal-dialog.modal-dialog-centered
.modal-content style="background-color: white;width: 100%"
.modal-header
.modal-title
= modal_title
button.btn-close type="button" id="#{modal_id}_close"
.modal-body
= modal_text
.modal-footer
= link_to t("helpers.buttons.confirm"), path, data: { turbo_method: :delete }, class: "btn btn-danger"
javascript:
document.getElementById("#{modal_id}_close").addEventListener('click', (e) => {
document.getElementById("#{modal_id}").style.display = "none";
})
document.getElementById("#{modal_id}_button").addEventListener('click', (e) => {
document.getElementById("#{modal_id}").style.display = "block";
})