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

EZP-31241: Changed behaviour for showing not checked value in checkbox #1187

Conversation

GrabowskiM
Copy link
Contributor

@GrabowskiM GrabowskiM commented Jan 13, 2020

Question Answer
Tickets https://jira.ez.no/browse/EZP-31241
Bug fix? no
New feature? yes
BC breaks? no
Tests pass? yes
Doc needed? no
License GPL-2.0

Show 'No' in content view when checkbox is empty.

Checklist:

  • Coding standards ($ composer fix-cs)
  • Ready for Code Review

@@ -19,7 +19,9 @@
<div class="ez-content-field">
<p class="ez-content-field-name">{{ fieldDefinition.name }}:</p>
<div class="ez-content-field-value">
{% if ez_is_field_empty(content, fieldDefinition.identifier) %}
{% if ez_is_field_empty(content, fieldDefinition.identifier) and fieldDefinition.fieldTypeIdentifier is same as('ezboolean') %}
<em>{{ 'ezboolean.no'|trans|desc('No') }}</em>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if this is the way. I think in the case of ezboolean the field should be rendered even if it's empty.

@GrabowskiM GrabowskiM requested a review from dew326 January 14, 2020 09:38
@katarzynazawada
Copy link

Now there's small inconsistency - No (with capital letter) and yes (with lowercase letter)

@GrabowskiM
Copy link
Contributor Author

Now there's small inconsistency - No (with capital letter) and yes (with lowercase letter)

That's inconsistency that we have in whole system, as these are translation from xliff file: https://github.com/ezsystems/ezplatform-admin-ui/blob/1.5/src/bundle/Resources/translations/fieldtypes_preview.en.xliff#L10
As I see, it's only in 2.5 version (1.5 of module), as it was fixed in 3.0: https://github.com/ezsystems/ezplatform-admin-ui/pull/1115/files#diff-63de7c5f52281012572e3a2b3685d538
So @DominikaK , should I change it in translation file? In theory it will affect whole system.

@DominikaK
Copy link
Contributor

True, the recent changes in labels were introduced in 3.0 only, so I don't think the change is necessary

@lserwatka lserwatka merged commit c6d88b6 into ezsystems:1.5 Jan 16, 2020
@lserwatka
Copy link
Member

@GrabowskiM could you merge it up?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

6 participants