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-29825 Change form templates merge order to let me override form fragments #720

Merged
merged 1 commit into from Dec 6, 2018

Conversation

6 participants
@StephaneDiot
Copy link
Contributor

StephaneDiot commented Nov 21, 2018

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

For a customer I need to override some specific content edit form fragment depending of the content type of the edited content. (The customer will go in 2.4 when released)

This could be achieved easily with the ViewProvider on the content_edit_view passing a form_templates param containing the specific form fragments I want to display ( see example in jira ticket )

For this I need my custom form templates to be after the standard form templates in the array used by the form_theme.

Thank you.

Checklist:

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

@sunpietro sunpietro requested review from webhdx , alongosz and lserwatka Nov 21, 2018

@andrerom

This comment has been minimized.

Copy link
Member

andrerom commented Nov 21, 2018

@webhdx Is this a bug perhaps?

@lserwatka lserwatka requested review from Nattfarinn and adamwojs Nov 21, 2018

@webhdx

This comment has been minimized.

Copy link
Contributor

webhdx commented Nov 22, 2018

@StephaneDiot you should be able to alter the order via configuration:
https://github.com/ezsystems/ezplatform-admin-ui/blob/2a14ad6e5dea3f504c15673f2b381430e2bc23f6/src/bundle/Resources/config/admin_ui_forms.yml

This change might break UI in case of file loading order change and now block from different file might be rendered.

@StephaneDiot

This comment has been minimized.

Copy link
Contributor

StephaneDiot commented Nov 22, 2018

@webhdx Thank you for your time.
I did notice that I could just override the content edit form fields fragment from here, but that wasn't very useful in my case because I must override those fragments only when editing specifics content types.

@webhdx

This comment has been minimized.

Copy link
Contributor

webhdx commented Nov 26, 2018

Yeah it's a bug and it should be fixed. My biggest concern is how destructive this change will be - it will change current behavior which might hurt some of the installations. I believe we should fix it but we need to document it first.

cc @lserwatka

@lserwatka

This comment has been minimized.

Copy link
Member

lserwatka commented Dec 4, 2018

@webhdx let's target this only for master (2.4 release) @DominikaK we need few bits of documentation here

@lserwatka

This comment has been minimized.

Copy link
Member

lserwatka commented Dec 4, 2018

Note for QA: we need sanities here.

cc @micszo

@micszo micszo self-assigned this Dec 5, 2018

@micszo
Copy link
Member

micszo left a comment

Would it be possible to rebase here with current master?

Error Cannot read property 'addEventListener' of null prevents from opening block settings in Page Builder.
screenshot 2018-12-05 at 14 36 56

@StephaneDiot StephaneDiot force-pushed the EZP-29825_Can_not_override_default_form_templates_in_content_edit_base_template branch from b489d21 to e39959e Dec 5, 2018

@StephaneDiot

This comment has been minimized.

Copy link
Contributor

StephaneDiot commented Dec 5, 2018

rebased

@micszo

micszo approved these changes Dec 6, 2018

Copy link
Member

micszo left a comment

Verified with sanities.

@micszo micszo added QA approved and removed Ready for QA labels Dec 6, 2018

@micszo micszo removed their assignment Dec 6, 2018

@lserwatka lserwatka merged commit 554ddf2 into master Dec 6, 2018

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
ezrobot/phpcsfixer Code review by ezrobot
Details

@lserwatka lserwatka deleted the EZP-29825_Can_not_override_default_form_templates_in_content_edit_base_template branch Dec 6, 2018

@lserwatka

This comment has been minimized.

Copy link
Member

lserwatka commented Dec 6, 2018

@DominikaK we need a short memo about this in the eelease note for 2.4

@DominikaK

This comment has been minimized.

Copy link

DominikaK commented Dec 6, 2018

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