Skip to content

Commit

Permalink
IBX-5565: Add reusable delete confirmation modal
Browse files Browse the repository at this point in the history
  • Loading branch information
GrabowskiM committed Apr 21, 2023
1 parent d29ffea commit a1fb0b6
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 10 deletions.
15 changes: 5 additions & 10 deletions src/bundle/Resources/translations/content_type.en.xliff
Original file line number Diff line number Diff line change
Expand Up @@ -816,16 +816,6 @@
<target state="new">Password must contain at least one non-alphanumeric character</target>
<note>key: field_definition.ezuser.require_at_least_one_non_alphanumeric_character</note>
</trans-unit>
<trans-unit id="283d87c7f3e760a02fde52274ed0a4a8523d2a0d" resname="field_definition.ezuser.require_not_compromised_password">
<source>Password must not be contained in a public breach.</source>
<target state="new">Password must not be contained in a public breach.</target>
<note>key: field_definition.ezuser.require_not_compromised_password</note>
</trans-unit>
<trans-unit id="99aa2f672dfd9206b58ddf5d78e6a695ceb9ebf1" resname="field_definition.ezuser.require_not_compromised_password_help">
<source>This uses the API at %link% to securely check breach data. The password is not transmitted to the API.</source>
<target state="new">This uses the API at %link% to securely check breach data. The password is not transmitted to the API.</target>
<note>key: field_definition.ezuser.require_not_compromised_password_help</note>
</trans-unit>
<trans-unit id="26cb6ab7ae7e190a9d8d8b0411512b531c8c42ff" resname="field_definition.ezuser.require_at_least_one_numeric_character">
<source>Password must contain at least one number</source>
<target state="new">Password must contain at least one number</target>
Expand All @@ -841,6 +831,11 @@
<target state="new">Prevent reusing old password</target>
<note>key: field_definition.ezuser.require_new_password</note>
</trans-unit>
<trans-unit id="fdcfd21005fcd975636d979b1be61e28bb88d875" resname="field_definition.ezuser.require_not_compromised_password">
<source>Password must not be contained in a public breach.</source>
<target state="new">Password must not be contained in a public breach.</target>
<note>key: field_definition.ezuser.require_not_compromised_password</note>
</trans-unit>
<trans-unit id="100096c9b93ce532e7bf2f184d8e3f43374ae921" resname="field_definition.ezuser.require_unique_email">
<source>Email must be unique</source>
<target state="new">Email must be unique</target>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{% set confirm_button_rendered %}
{%- block confirm_button -%}
<button
class="btn ibexa-btn ibexa-btn--primary ibexa-btn--trigger"
data-click="{{ data_click }}"
>
{{ 'modal.delete'|trans|desc('Delete') }}
</button>
{% endblock %}
{% endset %}

{% set cancel_button_rendered %}
{%- block cancel_button -%}
<button
type="button"
class="btn ibexa-btn ibexa-btn--secondary"
data-bs-dismiss="modal"
>
{{ 'modal.cancel'|trans|desc('Cancel') }}
</button>
{% endblock %}
{% endset %}

{% embed '@ibexadesign/ui/component/modal/modal.html.twig' with {
no_header: true,
id,
} %}
{% block body_content %}
{{ message }}
{% endblock %}
{% block footer_content %}
{{ confirm_button_rendered }}
{{ cancel_button_rendered }}
{% endblock %}
{% endembed %}

0 comments on commit a1fb0b6

Please sign in to comment.