Problem/Motivation
When a form pops up in a modal window, the form includes a multi-value field and the Claro theme is in use, the "Add Another" buttons are added to the footer of the modal instead of below the input field where it belongs.
Steps to reproduce
- Enable Claro admin theme and Media/Media Library modules.
- Add a multi-value field to a media type (image), make sure the field is included in the Media Library form mode.
- Add a media reference field to a content type which uses the Media Library widget.
- Create a node of that type and add a new image in the Media Library modal.
- Note the Add Another button is in the footer of the modal rather than below the relevant field.
Same thing happens in other forms in modals using the Claro theme, such as when the Layout Builder Modal is used for Layout Builder tab.
Proposed resolution
Remove <div class="form-actions">
wrapper from around the {{ button }}
in Claro's field-multiple-value-form.html.twig
file.
Remaining tasks
None
User interface changes
None
API changes
None
Data model changes
None
Release notes snippet
Updated Claro theme's field-multiple-value-form.html.twig file to remove 'form-actions' div wrapper around the button, which was causing the buttons to be moved to the footer when the multi-value form element appeared in a modal.
Original Post
Hi, I'm using Layout Builder Modal + Layout builder admin theme. When I use the default D8 administration theme (seven) everything works fine.
If I enable "Claro" as admin theme I've a bug: I've created a custom block type with a multivalue field. The "Add another item" button related to this field is rendered after the form submit button. This happens only with Claro so I'm reporting this bug here.
The "Add another item" should be near the field, the submit button instead should be on the bottom.