mirror of
https://github.com/MarijnDoeve/TijdVoorDeTest.git
synced 2026-07-07 08:00:15 +02:00
feat: add bank question via modal + dirty modal guard
- Add question in question bank now opens a modal instead of navigating to a full-page form, consistent with the edit modal pattern - Modal closes are blocked by static backdrop once the user has made any change (input, checkbox, drag-reorder, sort, randomize, remove answer) - Dirty state resets when the modal is fully hidden
This commit is contained in:
@@ -1,7 +1,12 @@
|
||||
<div class="row">
|
||||
<div class="col-md-8 col-12" data-controller="bo--modal-form">
|
||||
<div class="mb-3">
|
||||
<a class="btn btn-sm btn-outline-primary" href="{{ path('tvdt_backoffice_question_bank_new', {seasonCode: season.seasonCode}) }}">{{ 'Add question'|trans }}</a>
|
||||
<button class="btn btn-sm btn-outline-primary"
|
||||
data-action="click->bo--modal-form#open"
|
||||
data-url="{{ path('tvdt_backoffice_question_bank_new', {seasonCode: season.seasonCode}) }}"
|
||||
data-modal-title="{{ 'Add question'|trans }}">
|
||||
{{ 'Add question'|trans }}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="d-flex align-items-center flex-wrap gap-2 mb-3">
|
||||
|
||||
Reference in New Issue
Block a user