Issue #3105583 by Hardik_Patel_12, kostyashupenko, hash6, siddhant.bhosale, lauriii, andypost: Move HTML classes from claro_preprocess_radios to a template

(cherry picked from commit cf8b8a4577)
merge-requests/64/head
Lauri Eskola 2020-02-17 15:08:06 +02:00
parent 269d77dd32
commit eadd5cae57
No known key found for this signature in database
GPG Key ID: 37E6EF00B7EEF188
2 changed files with 13 additions and 7 deletions

View File

@ -878,13 +878,6 @@ function claro_preprocess_form_element__password(&$variables) {
}
}
/**
* Implements template_preprocess_HOOK() for radios.
*/
function claro_preprocess_radios(&$variables) {
$variables['attributes']['class'][] = 'form-boolean-group';
}
/**
* Implements template_preprocess_HOOK() for filter_tips.
*/

View File

@ -0,0 +1,13 @@
{#
/**
* @file
* Theme override for a 'radios' #type form element.
*
* Available variables
* - attributes: A list of HTML attributes for the wrapper element.
* - children: The rendered radios.
*
* @see template_preprocess_radios()
*/
#}
<div{{ attributes.addClass('form-radios','form-boolean-group') }}>{{ children }}</div>