diff --git a/core/modules/options/lib/Drupal/options/Tests/OptionsFieldUITest.php b/core/modules/options/lib/Drupal/options/Tests/OptionsFieldUITest.php index dd6d13e..0bd1721 100644 --- a/core/modules/options/lib/Drupal/options/Tests/OptionsFieldUITest.php +++ b/core/modules/options/lib/Drupal/options/Tests/OptionsFieldUITest.php @@ -340,7 +340,7 @@ function testNodeDisplay() { $output = '1'; } - $elements = $this->xpath('//div[text()="' . $output . '"]'); + $elements = $this->xpath('//div[text()=:output]', array(':output' => $output)); $this->assertEqual(count($elements), 1, 'Correct options found.'); } } diff --git a/core/modules/system/templates/field.html.twig b/core/modules/system/templates/field.html.twig index a0d527a..ecf4406 100644 --- a/core/modules/system/templates/field.html.twig +++ b/core/modules/system/templates/field.html.twig @@ -29,13 +29,26 @@ * @ingroup themeable */ #} - - {% if not label_hidden %} -
{{ label }}: 
- {% endif %} -
- {% for delta, item in items %} -
{{ item }}
- {% endfor %} +{% if items.length > 1 %} +
+ {% if not label_hidden %} +
{{ label }}
+ {% endif %} +
    + {% for delta, item in items %} +
  • {{ item }}
  • + {% endfor %} +
-
+{% else %} + {% for delta, item in items %} + {% if not label_hidden %} +
+
{{ label }}
+ {{ item }}
+ + {% else %} +
{{ item }}
+ {% endif %} + {% endfor %} +{% endif %}