- Issue created by @mortona2k
- πΊπΈUnited States mortona2k Seattle
I added an issue for opening the entity add page to get the full list of bundles, with descriptions, which can be helpful for content entry: https://www.drupal.org/project/views_add_button/issues/3529943 β¨ Link to entity add page without bundle Active
Still using Admin Dialogs for the modal. It's working, but the links redirect to the entity form instead of reloading in the modal.
To fix, each link needs to have the use-ajax class, and drupal-dialog-type="modal".
I tested this by modifying template_preprocess_admin_block_content(), where the links are generated. It works!
To implement, we could add some js to add the attributes when the modal loads.
- πΊπΈUnited States mortona2k Seattle
Here's a working proof of concept. It uses a form alter hook (currently only articles) to add an #ajax handler to the submit button to close the modal and refresh the view after submitting.
But I have an error when ckeditor is in the form, so hide the body field before trying this.
Here's the error:
Uncaught TypeError: dialogSettings is undefined ckeditor5.js:681:23
We can configure the attributes we need for the modal in the settings form so I wouldn't need Admin Dialogs, but the drupal.dialog.ajax library needs to be loaded. That could be set with a checkbox on the config form.