diff --git a/core/includes/theme.inc b/core/includes/theme.inc index cfdfa89..7e311d9 100644 --- a/core/includes/theme.inc +++ b/core/includes/theme.inc @@ -500,22 +500,22 @@ function template_preprocess_datetime_wrapper(&$variables) { $variables['errors'] = NULL; if (!empty($element['#errors']) && empty($element['#error_no_message'])) { $variables['errors'] = $element['#errors']; } if (!empty($element['#description'])) { $variables['description'] = $element['#description']; } $variables['required'] = FALSE; - // For required datetime fields a 'form-required' class is appended to the - // label attributes. + // For required datetime fields 'form-required' & 'js-form-required' classes + // are appended to the label attributes. if (!empty($element['#required'])) { $variables['required'] = TRUE; } $variables['content'] = $element['#children']; } /** * Prepares variables for links templates. * * Default template: links.html.twig. @@ -1549,20 +1549,21 @@ function template_preprocess_field(&$variables, $hook) { */ function template_preprocess_field_multiple_value_form(&$variables) { $element = $variables['element']; $variables['multiple'] = $element['#cardinality_multiple']; if ($variables['multiple']) { $table_id = Html::getUniqueId($element['#field_name'] . '_values'); $order_class = $element['#field_name'] . '-delta-order'; $header_attributes = new Attribute(array('class' => array('label'))); if (!empty($element['#required'])) { + $header_attributes['class'][] = 'js-form-required'; $header_attributes['class'][] = 'form-required'; } $header = array( array( 'data' => array( '#prefix' => '