diff --git a/core/includes/theme.inc.rej b/core/includes/theme.inc.rej deleted file mode 100644 index a2c1811..0000000 --- a/core/includes/theme.inc.rej +++ /dev/null @@ -1,14 +0,0 @@ -diff a/core/includes/theme.inc b/core/includes/theme.inc (rejected hunks) -@@ -1146,6 +1146,12 @@ function template_preprocess_container(&$variables) { - - $variables['children'] = $element['#children']; - $variables['attributes'] = $element['#attributes']; -+ -+ // Display any error messages. -+ $variables['errors'] = NULL; -+ if (!empty($element['#errors']) && empty($element['#error_no_message'])) { -+ $variables['errors'] = $element['#errors']; -+ } - } - - /** diff --git a/core/modules/system/src/Tests/Form/ElementTest.php b/core/modules/system/src/Tests/Form/ElementTest.php index 684e13a..0ff443f 100644 --- a/core/modules/system/src/Tests/Form/ElementTest.php +++ b/core/modules/system/src/Tests/Form/ElementTest.php @@ -162,11 +162,18 @@ public function testFormAutocomplete() { } /** - * Tests form element error messages. + * Tests form details element error messages. */ - public function testFormElementErrors() { + public function testFormDetailsErrors() { $this->drupalPostForm('form_test/details-form', [], 'Submit'); $this->assertText('I am an error on the details element.'); } + /** + * Tests form container element error messages. + */ + public function testFormElementErrors() { + $this->drupalPostForm('form_test/container-form', [], 'Submit'); + $this->assertText('I am an error on the container element.'); + } } diff --git a/core/modules/system/templates/container.html.twig.rej b/core/modules/system/templates/container.html.twig.rej deleted file mode 100644 index 9f64af5..0000000 --- a/core/modules/system/templates/container.html.twig.rej +++ /dev/null @@ -1,22 +0,0 @@ -diff a/core/modules/system/templates/container.html.twig b/core/modules/system/templates/container.html.twig (rejected hunks) -@@ -12,6 +12,7 @@ - * - * Available variables: - * - attributes: HTML attributes for the containing element. -+ * - errors: (optional) Any errors for this container element, may not be set. - * - children: The rendered child elements of the container. - * - has_parent: A flag to indicate that the container has one or more parent - containers. -@@ -27,4 +28,11 @@ - has_parent ? 'form-wrapper', - ] - %} --