mirror of
https://github.com/MarijnDoeve/TijdVoorDeTest.git
synced 2026-07-11 12:28:23 +02:00
feat: open candidate edit/add forms in modals with dirty-aware dismissal
Rename-candidate modal always blocked backdrop-click dismissal via a hardcoded static backdrop; wire it into the existing bo--modal controller so outside clicks/Escape only get blocked once the name field has actually been edited. Also move "Add Candidate" from a full-page navigation into the same turbo-frame modal pattern already used for editing quiz questions, keeping the full-page form as a fallback for non-JS/turbo requests.
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
<turbo-frame id="add-candidates-modal-frame">
|
||||
{{ form_start(form, {attr: {novalidate: 'novalidate'}}) }}
|
||||
<div class="modal-body">
|
||||
{{ form_row(form.candidates) }}
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">{{ 'Cancel'|trans }}</button>
|
||||
<button type="submit" class="btn btn-primary">{{ 'Submit'|trans }}</button>
|
||||
</div>
|
||||
{{ form_end(form) }}
|
||||
</turbo-frame>
|
||||
Reference in New Issue
Block a user