Ajax dialog button handling should be more flexible

Created on 23 October 2019, over 4 years ago
Updated 6 February 2024, 5 months ago

dialog.ajax.es6.js has this nugget:

    prepareDialogButtons($dialog) {
      const buttons = [];
      const $buttons = $dialog.find(
        '.form-actions input[type=submit], .form-actions a.button',
      );

It always copies the buttons in a .form-actions area into the dialog's button pane. Full stop. No chance to get in front of that. Unfortunately, that breaks the Media Library, and therefore necessitated an unfortunate workaround.

This behavior really should be configurable, so that if needed, it can be bypassed.

✨ Feature request
Status

Needs work

Version

11.0 πŸ”₯

Component
JavascriptΒ  β†’

Last updated less than a minute ago

Created by

πŸ‡ΊπŸ‡ΈUnited States phenaproxima Massachusetts

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    This issue is being reviewed by the kind folks in Slack, #needs-review-queue-initiative. We are working to keep the size of Needs Review queue [2700+ issues] to around 400 (1 month or less), following Review a patch or merge request β†’ as a guide.

    Unfortunately, that breaks the Media Library, and therefore necessitated an unfortunate workaround.

    This makes it sound like a bug no? Think test coverage will be needed.

  • πŸ‡ΊπŸ‡ΈUnited States pookmish

    I encountered this problem while using Layout Paragraphs module. Fields with unlimited value fields would have their "Add More" buttons moved into the dialog button pane. The suggestion from #13 didn't solve the issue.

    What I did find to solve my specific problem was to just provide an overridden template for the field-multiple-value-form.html.twig. In the Claro theme, the "Add More" button is wrapped with the form-actions class. So I simply remove that from the template and it solves the problem with fields.

  • πŸ‡©πŸ‡ͺGermany mmbk Meißen

    PAtch #13 does not apply to D10.2.2 anymore. Attached the patch without functional changes

  • πŸ‡©πŸ‡ͺGermany mmbk Meißen

    Sorry #17 had a wrong base, patch corrected

Production build 0.69.0 2024