Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge IBX-1235 #28

Merged
merged 3 commits into from
Oct 18, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 0 additions & 15 deletions src/bundle/Resources/translations/messages.en.xliff
Original file line number Diff line number Diff line change
Expand Up @@ -769,21 +769,6 @@
<target state="new">Are you sure you want to send this Content item to Trash?</target>
<note>key: trash.modal.send_to_trash.message</note>
</trans-unit>
<trans-unit id="3a46b65a9b678fb947285b2c9509943ee6764195" resname="trash.search.any_content_types">
<source>Any Content Types</source>
<target state="new">Any Content Types</target>
<note>key: trash.search.any_content_types</note>
</trans-unit>
<trans-unit id="9a88e9a17cd461dcd7d54dca50c6d3b981aba7fc" resname="trash.search.any_time">
<source>Any time</source>
<target state="new">Any time</target>
<note>key: trash.search.any_time</note>
</trans-unit>
<trans-unit id="c2b2679781ad4a22bb232e2ab34669ffe49c760b" resname="trash.search.section.any">
<source>Any Section</source>
<target state="new">Any Section</target>
<note>key: trash.search.section.any</note>
</trans-unit>
<trans-unit id="bd97a738137e75de44544db1104bab3a46222791" resname="trash_asset.modal.message_body">
<source>If you wish to delete these assets too, first make sure they are not used by other content. To check, go to the asset preview and look at its content Relations in the Relations tab.</source>
<target state="new">If you wish to delete these assets too, first make sure they are not used by other content. To check, go to the asset preview and look at its content Relations in the Relations tab.</target>
Expand Down
15 changes: 15 additions & 0 deletions src/bundle/Resources/translations/trash.en.xliff
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,21 @@
<target state="new">Restored content to its original Location.</target>
<note>key: trash.restore_original_location.success</note>
</trans-unit>
<trans-unit id="3a46b65a9b678fb947285b2c9509943ee6764195" resname="trash.search.any_content_types">
<source>Any Content Types</source>
<target state="new">Any Content Types</target>
<note>key: trash.search.any_content_types</note>
</trans-unit>
<trans-unit id="9a88e9a17cd461dcd7d54dca50c6d3b981aba7fc" resname="trash.search.any_time">
<source>Any time</source>
<target state="new">Any time</target>
<note>key: trash.search.any_time</note>
</trans-unit>
<trans-unit id="c2b2679781ad4a22bb232e2ab34669ffe49c760b" resname="trash.search.section.any">
<source>Any Section</source>
<target state="new">Any Section</target>
<note>key: trash.search.section.any</note>
</trans-unit>
<trans-unit id="8b64a1510f907791766cbccffcff7898bda76bde" resname="trash.section">
<source>Section</source>
<target state="new">Section</target>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
{% set preferred_choices = preferred_choices|default([]) %}
{% set custom_form = custom_form is defined ? custom_form : true %}
{% set translation_domain = translation_domain|default(false) %}
{% set value = value is defined ? value : null %}

<div
class="ibexa-dropdown
Expand All @@ -24,16 +25,14 @@
label: '{{ label }}',
})|e('html_attr') }}"
>
{% if value is defined %}
{% for choice in choices_flat %}
{% if custom_form ? choice.value == value : choice is selectedchoice(value) %}
{% include '@ezdesign/ui/component/dropdown_selected_item.html.twig' with {
value: choice.value,
label: translation_domain is same as(false) ? choice.label : choice.label|trans({}, translation_domain),
} %}
{% endif %}
{% endfor %}
{% endif %}
{% for choice in choices_flat %}
{% if custom_form ? choice.value == value : choice is selectedchoice(value) %}
{% include '@ezdesign/ui/component/dropdown_selected_item.html.twig' with {
value: choice.value,
label: translation_domain is same as(false) ? choice.label : choice.label|trans({}, translation_domain),
} %}
{% endif %}
{% endfor %}

{% set default_placeholder = 'dropdown.placeholder'|trans|desc("Choose an option") %}
{% set placeholder = placeholder|default(default_placeholder) %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
class="ibexa-dropdown__item {% if preferred_choice %}ibexa-dropdown__item--preferred-choice{% endif %} {% if custom_form ? choice.value == value : choice is selectedchoice(value) %}ibexa-dropdown__item--selected{% endif %}"
>
{% if multiple is defined and multiple %}
<input type="checkbox" name="dropdown-checkbox" class="ibexa-input ibexa-input--checkbox" {% if choice is selectedchoice(value) %}checked{% endif %} />
<input type="checkbox" name="dropdown-checkbox" class="ibexa-input ibexa-input--checkbox" {% if custom_form ? choice.value == value : choice is selectedchoice(value) %}checked{% endif %} />
{% endif %}
<span class="ibexa-dropdown__item-label">{{ item_label }}</span>
</li>
Expand Down
1 change: 1 addition & 0 deletions src/lib/Form/Type/Search/TrashSearchType.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ public function configureOptions(OptionsResolver $resolver)
'data_class' => TrashSearchData::class,
'method' => Request::METHOD_GET,
'csrf_protection' => false,
'translation_domain' => 'trash',
]);
}
}
Expand Down