Skip to content

Commit

Permalink
Moved div tags from translation to template
Browse files Browse the repository at this point in the history
  • Loading branch information
glye committed Apr 17, 2023
1 parent 6c997f2 commit 2c2e591
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
4 changes: 2 additions & 2 deletions src/bundle/Resources/translations/content_type.en.xliff
Original file line number Diff line number Diff line change
Expand Up @@ -822,8 +822,8 @@
<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>%begin%This uses the API at %link% to securely check breach data. The password is not transmitted to the API.%end%</source>
<target state="new">%begin%This uses the API at %link% to securely check breach data. The password is not transmitted to the API.%end%</target>
<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">
Expand Down
24 changes: 13 additions & 11 deletions src/bundle/Resources/views/themes/admin/ui/form_fields.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -387,19 +387,21 @@
<svg class="ibexa-icon ibexa-icon--small ibexa-form-help__icon">
<use xlink:href="{{ ibexa_icon_path('system-information') }}"></use>
</svg>
{%- if translation_domain is same as(false) -%}
{%- if help_html is same as(false) -%}
{{- help -}}
<div class="ibexa-form-help__content">
{%- if translation_domain is same as(false) -%}
{%- if help_html is same as(false) -%}
{{- help -}}
{%- else -%}
{{- help|raw -}}
{%- endif -%}
{%- else -%}
{{- help|raw -}}
{%- if help_html is same as(false) -%}
{{- help|trans(help_translation_parameters, translation_domain) -}}
{%- else -%}
{{- help|trans(help_translation_parameters, translation_domain)|raw -}}
{%- endif -%}
{%- endif -%}
{%- else -%}
{%- if help_html is same as(false) -%}
{{- help|trans(help_translation_parameters, translation_domain) -}}
{%- else -%}
{{- help|trans(help_translation_parameters, translation_domain)|raw -}}
{%- endif -%}
{%- endif -%}
</div>
</small>
{%- endif -%}
{%- endblock form_help %}
Expand Down
6 changes: 2 additions & 4 deletions src/lib/FieldType/Mapper/UserAccountFormMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,11 @@ public function mapFieldDefinitionForm(FormInterface $fieldDefinitionForm, Field
'property_path' => $validatorPropertyPathPrefix . '[requireNotCompromisedPassword]',
'label' => /** @Desc("Password must not be contained in a public breach.") */
'field_definition.ezuser.require_not_compromised_password',
'help' => /** @Desc("%begin%This uses the API at %link% to securely check breach data.
* The password is not transmitted to the API.%end%") */
'help' => /** @Desc("This uses the API at %link% to securely check breach data.
* The password is not transmitted to the API.") */
'field_definition.ezuser.require_not_compromised_password_help',
'help_translation_parameters' => [
'%begin%' => '<div>',
'%link%' => '<a href="https://haveibeenpwned.com/" target="_blank">https://haveibeenpwned.com/</a>',
'%end%' => '</div>',
],
'help_html' => true,
]);
Expand Down

0 comments on commit 2c2e591

Please sign in to comment.