diff --git a/core/includes/theme.inc b/core/includes/theme.inc index 2786774..bd03b24 100644 --- a/core/includes/theme.inc +++ b/core/includes/theme.inc @@ -837,11 +837,6 @@ function template_preprocess_time(&$variables) { $variables['html'] = FALSE; } } - - // Add a 'datetime' class. - $variables['attributes']['class'][] = 'datetime'; - - $variables['attributes'] = new Attribute($variables['attributes']); } /** @@ -896,13 +891,11 @@ function template_preprocess_datetime_wrapper(&$variables) { $variables['description'] = $element['#description']; } - $title_attributes = array('class' => array('label')); // For required datetime fields a 'form-required' class is appended to the // label attributes. if (!empty($element['#required'])) { - $title_attributes['class'][] = 'form-required'; + $variables['required'] = TRUE; } - $variables['title_attributes'] = new Attribute($title_attributes); $variables['content'] = $element['#children']; } diff --git a/core/modules/system/templates/datetime-form.html.twig b/core/modules/system/templates/datetime-form.html.twig index fef4b5e..bf31668 100644 --- a/core/modules/system/templates/datetime-form.html.twig +++ b/core/modules/system/templates/datetime-form.html.twig @@ -12,6 +12,6 @@ * @ingroup themeable */ #} -