summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLee Rowlands2017-09-12 21:29:59 (GMT)
committerLee Rowlands2017-09-12 21:29:59 (GMT)
commit2e3db9155376617d78a844fdb40001afa809f63c (patch)
treea1944b9cba3cc1cd67b09f873aa6e22108e02858
parenta603e0f2403d83d6a2a186b6a2815194e17468b7 (diff)
Issue #2892304 by Manuel Garcia, amateescu: Introduce footer region to ContentEntityForm
-rw-r--r--core/lib/Drupal/Core/Entity/ContentEntityForm.php9
-rw-r--r--core/modules/node/src/NodeForm.php7
-rw-r--r--core/themes/bartik/css/components/form.css2
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 02eee80..981fb90 100644
--- a/core/lib/Drupal/Core/Entity/ContentEntityForm.php
+++ b/core/lib/Drupal/Core/Entity/ContentEntityForm.php
@@ -127,6 +127,15 @@ class ContentEntityForm extends EntityForm implements ContentEntityFormInterface
$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 4c9bbac..552e3fb 100644
--- a/core/modules/node/src/NodeForm.php
+++ b/core/modules/node/src/NodeForm.php
@@ -142,13 +142,6 @@ class NodeForm extends ContentEntityForm {
'#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 672e591..8ec05a3 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;
}