Unverified Commit 5a9de596 authored by Lauri Timmanee's avatar Lauri Timmanee
Browse files

Issue #3105580 by Hardik_Patel_12, siddhant.bhosale: Move HTML classes from...

Issue #3105580 by Hardik_Patel_12, siddhant.bhosale: Move HTML classes from claro_preprocess_checkboxes to a template
parent 73b8d101
Loading
Loading
Loading
Loading
+0 −7
Changes for core/themes/claro/claro.theme: 0 added lines, 7 removed lines.
Original line number Diff line number Diff line
@@ -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.
 */
+15 −0
Changes for core/themes/claro/templates/form/checkboxes.html.twig: 15 added lines, 0 removed lines.
Original line number Diff line number Diff line
{#
/**
 * @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>