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-32397] Removed logic from ezdate.html.twig #1729

Merged
merged 4 commits into from
Apr 14, 2021

Conversation

mateuszbieniek
Copy link
Contributor

@mateuszbieniek mateuszbieniek commented Mar 30, 2021

Question Answer
Tickets https://issues.ibexa.co/browse/EZP-32397
Bugfix? yes
BC breaks? yes
Tests pass? yes
Doc needed? no
License GPL-2.0

This PR requires: ezsystems/repository-forms#344

This PR removes logic from the template https://github.com/ezsystems/ezplatform-admin-ui/blob/v1.5.17/src/bundle/Resources/views/fieldtypes/edit/ezdate.html.twig#L10 as it is no longer needed (see ezsystems/repository-forms#344)

Checklist:

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

Comment on lines 10 to 13
{% set action_type =
app.request.attributes.get('_route') is same as('ez_content_draft_edit') or
app.request.attributes.get('_route') is same as('ezplatform.content.translate') ? 'edit' : 'create'
%}
Copy link
Member

Choose a reason for hiding this comment

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

You can use in operator here:

app.request.attributes.get('_route') in ['ez_content_draft_edit', 'ezplatform.content.translate']

but TBH this logic should be placed in form value mapper or / Form type buildView method rather then in Twig template

@mateuszbieniek
Copy link
Contributor Author

Moved logic from template: ezsystems/repository-forms#344

@mateuszbieniek mateuszbieniek changed the title Added condition for content.translate in edit/ezdate.html.twig [EZP-32397] Remove logic from ezdate.html.twig Apr 6, 2021
@mateuszbieniek mateuszbieniek requested a review from Steveb-p April 6, 2021 09:36
@mateuszbieniek mateuszbieniek changed the title [EZP-32397] Remove logic from ezdate.html.twig [EZP-32397] Removed logic from ezdate.html.twig Apr 6, 2021
@piotrbisaga piotrbisaga self-assigned this Apr 14, 2021
@piotrbisaga
Copy link
Contributor

QA approved.
Checked on Ez Platform EE 2.5 & Ez Platform Commerce 2.5 with diff.

@piotrbisaga piotrbisaga removed their assignment Apr 14, 2021
@lserwatka lserwatka merged commit 1bfa43c into ezsystems:1.5 Apr 14, 2021
@lserwatka
Copy link
Member

@mateuszbieniek could you merge it up?

@mateuszbieniek
Copy link
Contributor Author

Merged up to 2.2: e318a65

@mateuszbieniek
Copy link
Contributor Author

2.3: 61b81ac

@mateuszbieniek
Copy link
Contributor Author

and master: fab43e8

lucasOsti pushed a commit to lucasOsti/ezplatform-admin-ui that referenced this pull request Apr 28, 2021
* Added condition for content.translate in edit/ezdate.html.twig

* Changes after CR#1

* Dropped merging attr

* Revert removing attrbiutes mergin from the view
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