diff --git a/core/themes/claro/claro.theme b/core/themes/claro/claro.theme index 5f772396ef1d08f46ce068569bfa5b8d3f6c90f7..ad36e76cbc0a8a05dd506a6176f426ee4acda46b 100644 --- a/core/themes/claro/claro.theme +++ b/core/themes/claro/claro.theme @@ -861,13 +861,6 @@ function claro_preprocess_form_element__password(&$variables) { } } -/** - * Implements template_preprocess_HOOK() for checkboxes. - */ -function claro_preprocess_checkboxes(&$variables) { - $variables['attributes']['class'][] = 'form-boolean-group'; -} - /** * Implements template_preprocess_HOOK() for radios. */ diff --git a/core/themes/claro/templates/form/checkboxes.html.twig b/core/themes/claro/templates/form/checkboxes.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..b7bbb9148ff2d52458d39f177a3468414c54bc6b --- /dev/null +++ b/core/themes/claro/templates/form/checkboxes.html.twig @@ -0,0 +1,15 @@ +{# +/** + * @file + * Theme override for a 'checkboxes' #type form element. + * + * Available variables + * - attributes: A list of HTML attributes for the wrapper element. + * - children: The rendered checkboxes. + * + * @see template_preprocess_checkboxes() + */ + @todo: remove this file once https://www.drupal.org/node/1819284 is resolved. + This is identical to core/modules/system/templates/container.html.twig +#} +<div{{ attributes.addClass('form-checkboxes','form-boolean-group') }}>{{ children }}</div>