Preserve delete and other action buttons in sidebar

This commit is contained in:
Paul Weidner 2024-01-21 11:26:06 -08:00 committed by Michael Stenta
parent fa5724e035
commit bacf11f295
1 changed files with 4 additions and 2 deletions

View File

@ -190,8 +190,10 @@ class GinContentFormBase extends ContentEntityForm implements RenderCallbackInte
*/
public function processContentForm(array $form, FormStateInterface $form_state): array {
// Disable the default meta group provided by Gin.
unset($form['meta']);
// Increase weight of Gin's meta group to bottom of the sidebar.
// This group has special styling and includes additional action
// buttons like Delete that should be included on the page.
$form['meta']['#weight'] = 500;
// Assign correct status group after GinContentFormHelper.
if (isset($form['status']) && isset($form['meta_field_group'])) {