From 2e3db9155376617d78a844fdb40001afa809f63c Mon Sep 17 00:00:00 2001 From: Lee Rowlands <lee.rowlands@previousnext.com.au> Date: Wed, 13 Sep 2017 07:29:59 +1000 Subject: [PATCH] Issue #2892304 by Manuel Garcia, amateescu: Introduce footer region to ContentEntityForm --- core/lib/Drupal/Core/Entity/ContentEntityForm.php | 9 +++++++++ core/modules/node/src/NodeForm.php | 7 ------- core/themes/bartik/css/components/form.css | 2 +- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/core/lib/Drupal/Core/Entity/ContentEntityForm.php b/core/lib/Drupal/Core/Entity/ContentEntityForm.php index 02eee80f1cd5..981fb90d5668 100644 --- a/core/lib/Drupal/Core/Entity/ContentEntityForm.php +++ b/core/lib/Drupal/Core/Entity/ContentEntityForm.php @@ -127,6 +127,15 @@ public function form(array $form, FormStateInterface $form_state) { $this->addRevisionableFormFields($form); } + $form['footer'] = [ + '#type' => 'container', + '#weight' => 99, + '#attributes' => [ + 'class' => ['entity-content-form-footer'] + ], + '#optional' => TRUE, + ]; + return $form; } diff --git a/core/modules/node/src/NodeForm.php b/core/modules/node/src/NodeForm.php index 4c9bbac7b659..552e3fb6bad7 100644 --- a/core/modules/node/src/NodeForm.php +++ b/core/modules/node/src/NodeForm.php @@ -142,13 +142,6 @@ public function form(array $form, FormStateInterface $form_state) { '#wrapper_attributes' => ['class' => ['entity-meta__author']], ]; - $form['footer'] = [ - '#type' => 'container', - '#weight' => 99, - '#attributes' => [ - 'class' => ['node-form-footer'] - ] - ]; $form['status']['#group'] = 'footer'; // Node author information for administrators. diff --git a/core/themes/bartik/css/components/form.css b/core/themes/bartik/css/components/form.css index 672e59118e04..8ec05a3d7fcc 100644 --- a/core/themes/bartik/css/components/form.css +++ b/core/themes/bartik/css/components/form.css @@ -172,7 +172,7 @@ input.form-submit:focus { .node-form .form-wrapper { margin-bottom: 2em; } -.node-form .node-form-footer, +.node-form .entity-content-form-footer, .node-form .field--name-status { margin-bottom: 0; } -- GitLab