Needs work
Project:
Drupal core
Version:
main
Component:
field_ui.module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
1 Dec 2012 at 18:43 UTC
Updated:
13 Apr 2023 at 14:14 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #0.0
swentel commentedUpdated issue summary.
Comment #1
larowlanTagging
Comment #2
larowlanComment #3
larowlanGiving this a shot
Comment #4
larowlanSo the issue here is that the dialog api and jquery.ui insert the elements into the dom as a child of the tag which means they are no longer part of the
tag. Hence submitting the form in the modal doesn't result in the form being rebuilt.
So we have a few options here, none of them too pleasant
1) We use a temp store object for the display entity and each settings form modal is a separate page callback/form that manipulates this temp store object, updating the object used to generate the display overview - only updating the display entity when submitted, this seems the most robust and mimics views, but is fairly involved
2) We use some javascript to close the dialog, attach the elements inside the
tag before the modal form is submitted, this smells hacky to me
3) Leave it as is and avoid the modal
thoughts?
Comment #5
larowlanHere's the patch if you want to see what I'm talking about.

And some screenshots.
Comment #6
swentel commented2 is indeed hacky all the way, I don't we'll be able to sell that one, plus I don't like it anyway :)
I'm also not sure whether this works then if you don't have javascript enabled ?
So, a separate callback, using the tempstore, just like all callbacks in views, seems the one that will make sure it works in javascript or non javascript, no.
Additionally, we *could* also use this on manage fields too for the field settings. But let's try one step at the time.
I'm all for it, but I'm not sure, as you mention, how fast we can convert this. Maybe we should talk to the VDC guys how hard this conversion would be/is.
Comment #7
yched commentedAgreed. The tempstore seems like the most reasonable approach...
Comment #8
swentel commentedAs an addition, amateescu and I had a talk with Bojhan on IRC and only doing formatters for now is fine. So not for fields as dialog is not for wizards or long forms and a mix of both isn't ideal.
Comment #8.0
swentel commentedUpdated issue summary.
Comment #9
swentel commentedtagging
Comment #10
swentel commentedupdating tags
Comment #11
larowlanComment #11.0
larowlanUpdated issue summary.
Comment #12
amateescu commentedI wanted to check if #2094499: Convert "Manage (form) display" forms to be the official entity edit forms for EntityView[Form]Display objects will be of any help here, but the modal submit buttons are not doing anything (not even closing the modal).
Anyway, here's a reroll on top of #2094499: Convert "Manage (form) display" forms to be the official entity edit forms for EntityView[Form]Display objects if anyone wants to play with it.
Comment #25
tim.plunkett