{# Blocking failure modal — Penguin UI's danger modal, taken from penguinui-components/modal/modal-alerts.html. Same deal as ui/alert.html: the component's copy lives in its markup, so this is the library file's danger variant with its text nodes replaced and nothing else changed. Two structural edits, both because the server, not a click, decides when this appears: - the library's trigger button is dropped, and `dangerModalIsOpen` starts `true`. The server only sends the dialog when there is something the user has to be told, so the response itself is the trigger. - the footer button dismisses instead of acting ("Back to the form"): a failure has nothing to confirm. It is Tailwind + Alpine markup; x-trap needs the focus plugin, which ui/base.html loads before Alpine itself. {% import "ui/dialog.html" as dialog %} {% call dialog::error("Could not add the column", message) %}{% endcall %} #} {% macro error(locale, title, message) %}
{% endmacro %} {# Blocking confirmation modal — Penguin UI's success modal, taken from penguinui-components/modal/modal-alerts.html. Used where a toast's own timer would leave the "did it actually finish?" question open — a long-running import in particular, where the user has been staring at a progress dialog and needs the same dialog to tell them it is done, not a notification that can appear and vanish while they are looking at the wrong corner of the screen. Dismissed the same three ways as dialog::error: the close button, Escape, or a click on the backdrop. {% import "ui/dialog.html" as dialog %} {% call dialog::success(locale, "Import complete", message) %}{% endcall %} #} {% macro success(locale, title, message) %}
{% endmacro %}