diff --git a/core/modules/field/src/Tests/EntityReference/EntityReferenceFormatterTest.php b/core/modules/field/src/Tests/EntityReference/EntityReferenceFormatterTest.php index d940188..0c4deb6 100644 --- a/core/modules/field/src/Tests/EntityReference/EntityReferenceFormatterTest.php +++ b/core/modules/field/src/Tests/EntityReference/EntityReferenceFormatterTest.php @@ -177,6 +177,10 @@ public function testEntityFormatter() { $formatter = 'entity_reference_entity_view'; $build = $this->buildRenderArray([$this->referencedEntity, $this->unsavedReferencedEntity], $formatter); + // Enable the Classy theme. + \Drupal::service('theme_handler')->install(['classy']); + $this->config('system.theme')->set('default', 'classy')->save(); + // Test the first field item. $expected_rendered_name_field_1 = '
diff --git a/core/modules/rdf/src/Tests/Field/NumberFieldRdfaTest.php b/core/modules/rdf/src/Tests/Field/NumberFieldRdfaTest.php index f5974bb..49a831b 100644 --- a/core/modules/rdf/src/Tests/Field/NumberFieldRdfaTest.php +++ b/core/modules/rdf/src/Tests/Field/NumberFieldRdfaTest.php @@ -45,6 +45,11 @@ public function testIntegerFormatterWithSettings() { 'prefix' => '#', 'suffix' => ' llamas.', ); + + // Enable the Classy theme. + \Drupal::service('theme_handler')->install(['classy']); + $this->config('system.theme')->set('default', 'classy')->save(); + $this->createTestField($field_settings); $this->createTestEntity($testValue); $this->assertFormatterRdfa($formatter, 'http://schema.org/baseSalary', array('value' => $testValue)); @@ -87,6 +92,11 @@ public function testFloatFormatterWithSettings() { 'prefix' => '$', 'suffix' => ' more.', ); + + // Enable the Classy theme. + \Drupal::service('theme_handler')->install(['classy']); + $this->config('system.theme')->set('default', 'classy')->save(); + $this->createTestField($field_settings); $this->createTestEntity($testValue); $this->assertFormatterRdfa($formatter, 'http://schema.org/baseSalary', array('value' => $testValue)); @@ -129,6 +139,11 @@ public function testFloatFormatterWithScaleExercised() { ), ); $testValue = 3.1234567; + + // Enable the Classy theme. + \Drupal::service('theme_handler')->install(['classy']); + $this->config('system.theme')->set('default', 'classy')->save(); + $this->createTestField(); $this->createTestEntity($testValue); $this->assertFormatterRdfa($formatter, 'http://schema.org/baseSalary', array('value' => $testValue)); @@ -171,6 +186,11 @@ public function testDecimalFormatterWithSettings() { 'prefix' => '$', 'suffix' => ' more.', ); + + // Enable the Classy theme. + \Drupal::service('theme_handler')->install(['classy']); + $this->config('system.theme')->set('default', 'classy')->save(); + $this->createTestField($field_settings); $this->createTestEntity($testValue); $this->assertFormatterRdfa($formatter, 'http://schema.org/baseSalary', array('value' => $testValue)); diff --git a/core/modules/system/templates/feed-icon.html.twig b/core/modules/system/templates/feed-icon.html.twig index b3c10d1..a9e0f03 100644 --- a/core/modules/system/templates/feed-icon.html.twig +++ b/core/modules/system/templates/feed-icon.html.twig @@ -15,4 +15,4 @@ * @ingroup themeable */ #} -{{ icon }} +{{ icon }} diff --git a/core/modules/system/templates/field-multiple-value-form.html.twig b/core/modules/system/templates/field-multiple-value-form.html.twig index f18a853..e9370e9 100644 --- a/core/modules/system/templates/field-multiple-value-form.html.twig +++ b/core/modules/system/templates/field-multiple-value-form.html.twig @@ -20,13 +20,13 @@ */ #} {% if multiple %} -
+
{{ table }} {% if description %} -
{{ description }}
+
{{ description }}
{% endif %} {% if button %} -
{{ button }}
+
{{ button }}
{% endif %}
{% else %} diff --git a/core/modules/system/templates/field.html.twig b/core/modules/system/templates/field.html.twig index 0745f84..fd41c13 100644 --- a/core/modules/system/templates/field.html.twig +++ b/core/modules/system/templates/field.html.twig @@ -38,30 +38,18 @@ * @ingroup themeable */ #} -{% set field_name_class = field_name|clean_class %} -{% - set classes = [ - 'field', - 'field-' ~ entity_type|clean_class ~ '--' ~ field_name_class, - 'field-name-' ~ field_name_class, - 'field-type-' ~ field_type|clean_class, - 'field-label-' ~ label_display, - label_display == 'inline' ? 'clearfix', - ] -%} {% set title_classes = [ - 'field-label', label_display == 'visually_hidden' ? 'visually-hidden', ] %} - + {% if not label_hidden %} {{ label }}
{% endif %} - + {% for item in items %} - {{ item.content }}
+ {{ item.content }}
{% endfor %} diff --git a/core/modules/system/templates/fieldset.html.twig b/core/modules/system/templates/fieldset.html.twig index ab6796c..bb106d1 100644 --- a/core/modules/system/templates/fieldset.html.twig +++ b/core/modules/system/templates/fieldset.html.twig @@ -21,10 +21,9 @@ * @ingroup themeable */ #} - + {% set legend_span_classes = [ - 'fieldset-legend', required ? 'form-required', ] %} diff --git a/core/modules/system/templates/form-element-label.html.twig b/core/modules/system/templates/form-element-label.html.twig index 6ececd9..2bfd74a 100644 --- a/core/modules/system/templates/form-element-label.html.twig +++ b/core/modules/system/templates/form-element-label.html.twig @@ -16,7 +16,6 @@ #} {% set classes = [ - title_display == 'after' ? 'option', title_display == 'invisible' ? 'visually-hidden', required ? 'form-required', ] diff --git a/core/modules/system/templates/form-element.html.twig b/core/modules/system/templates/form-element.html.twig index a961801..f4be6cc 100644 --- a/core/modules/system/templates/form-element.html.twig +++ b/core/modules/system/templates/form-element.html.twig @@ -47,16 +47,11 @@ #} {% set classes = [ - 'form-item', - 'form-type-' ~ type|clean_class, - 'form-item-' ~ name|clean_class, - title_display not in ['after', 'before'] ? 'form-no-label', disabled == 'disabled' ? 'form-disabled', ] %} {% set description_classes = [ - 'description', description_display == 'invisible' ? 'visually-hidden', ] %} @@ -65,7 +60,7 @@ {{ label }} {% endif %} {% if prefix is not empty %} - {{ prefix }} + {{ prefix }} {% endif %} {% if description_display == 'before' and description.content %} @@ -74,7 +69,7 @@ {% endif %} {{ children }} {% if suffix is not empty %} - {{ suffix }} + {{ suffix }} {% endif %} {% if label_display == 'after' %} {{ label }} diff --git a/core/themes/classy/templates/system/fieldset.html.twig b/core/themes/classy/templates/system/fieldset.html.twig index ab6796c..5564850 100644 --- a/core/themes/classy/templates/system/fieldset.html.twig +++ b/core/themes/classy/templates/system/fieldset.html.twig @@ -21,10 +21,9 @@ * @ingroup themeable */ #} - + {% set legend_span_classes = [ - 'fieldset-legend', required ? 'form-required', ] %} @@ -32,7 +31,7 @@ {{ legend.title }} -
+
{% if prefix %} {{ prefix }} {% endif %}