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-28900: Removed view transformer from FloatFieldType #325

Merged
merged 2 commits into from
Dec 20, 2019
Merged

Conversation

pawbuj
Copy link
Contributor

@pawbuj pawbuj commented Oct 31, 2019

jira: https://jira.ez.no/browse/EZP-28900

The root of the issue is that our FloatFieldType uses view transformer : NumberToLocalizedStringTransformer. This transformer is not set explicitly but it is inherited from symfony's NumberType. Symfony NumberType needs this transformer because default form_fields.html.twig use <input type='text"> to display number_widget. AdminUI overwrites symfony's form_fields.html.twig including number_widget and number are displayed as <input type="number". So this transformer is no needed and causes problems described in the ticket.

related to : ezsystems/ezpublish-kernel#2849

@pawbuj pawbuj requested review from adamwojs and alongosz October 31, 2019 14:18
@pawbuj pawbuj self-assigned this Oct 31, 2019
@adamwojs adamwojs changed the title EZP-28900: removed view transformer from FloatFieldType EZP-28900: Removed view transformer from FloatFieldType Nov 4, 2019
@pawbuj pawbuj changed the base branch from master to 2.5 November 8, 2019 08:47
@katarzynazawada
Copy link

Now, float is shown in edit mode but there is a difference between displaying decimal separators. In preview is . and in editing , . Not sure if it is related to reported customer request or it should be reported separately as follow-up. //cc @kmadejski

@webhdx
Copy link
Contributor

webhdx commented Dec 19, 2019

@katarzynazawada I've fixed it under the same ticket but it required changes in AdminUI: ezsystems/ezplatform-admin-ui#1165

@webhdx webhdx self-assigned this Dec 19, 2019
@kmadejski
Copy link
Member

👍 for fix proposed by @webhdx

@lserwatka lserwatka merged commit 88eadde into 2.5 Dec 20, 2019
@lserwatka lserwatka deleted the EZP-28900 branch December 20, 2019 10:19
@lserwatka
Copy link
Member

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.

7 participants