commit 5c7aa56a7cf9df486609fa58adf3d2a72fc5956f Author: Joel Pittet Date: Sun May 19 16:58:02 2013 -0700 removed drupal_render_children as per #1920886 and new Attribute() as per #1982024 diff --git a/core/modules/datetime/datetime.module b/core/modules/datetime/datetime.module index b949318..89ce482 100644 --- a/core/modules/datetime/datetime.module +++ b/core/modules/datetime/datetime.module @@ -324,20 +324,17 @@ function datetime_date_default_time($date) { * @see form_process_datetime() */ function template_preprocess_datetime_form(&$variables) { - $element = $variables['element']; - $attributes = array(); if (isset($element['#id'])) { - $attributes['id'] = $element['#id']; + $variables['attributes']['id'] = $element['#id']; } if (!empty($element['#attributes']['class'])) { - $attributes['class'] = (array) $element['#attributes']['class']; + $variables['attributes']['class'] = (array) $element['#attributes']['class']; } - $attributes['class'][] = 'container-inline'; + $variables['attributes']['class'][] = 'container-inline'; - $variables['content'] = drupal_render_children($element); - $variables['attributes'] = new Attribute($attributes); + $variables['content'] = $element; } /** @@ -352,20 +349,17 @@ function template_preprocess_datetime_form(&$variables) { * #attributes. */ function template_preprocess_datelist_form(&$variables) { - $element = $variables['element']; - $attributes = array(); if (isset($element['#id'])) { - $attributes['id'] = $element['#id']; + $variables['attributes']['id'] = $element['#id']; } if (!empty($element['#attributes']['class'])) { - $attributes['class'] = (array) $element['#attributes']['class']; + $variables['attributes']['class'] = (array) $element['#attributes']['class']; } - $attributes['class'][] = 'container-inline'; + $variables['attributes']['class'][] = 'container-inline'; - $variables['content'] = drupal_render_children($element); - $variables['attributes'] = new Attribute($attributes); + $variables['content'] = $element; } /** diff --git a/core/modules/datetime/templates/datelist-form.html.twig b/core/modules/datetime/templates/datelist-form.html.twig index 88f5c32..7e30eb0 100644 --- a/core/modules/datetime/templates/datelist-form.html.twig +++ b/core/modules/datetime/templates/datelist-form.html.twig @@ -4,7 +4,7 @@ * Default theme implementation of a datelist form element. * * Available variables: - * - attributes: Remaining HTML attributes for the datelist form element. + * - attributes: HTML attributes for the datelist form element. * - content: The datelist form element to be output. * * @see template_preprocess() diff --git a/core/modules/datetime/templates/datetime-form.html.twig b/core/modules/datetime/templates/datetime-form.html.twig index ff321d5..6a66c4c 100644 --- a/core/modules/datetime/templates/datetime-form.html.twig +++ b/core/modules/datetime/templates/datetime-form.html.twig @@ -4,7 +4,7 @@ * Default theme implementation of a datetime form element. * * Available variables: - * - attributes: Remaining HTML attributes for the datetime form element. + * - attributes: HTML attributes for the datetime form element. * - content: The datelist form element to be output. * * @see template_preprocess() diff --git a/core/modules/datetime/templates/datetime-wrapper.html.twig b/core/modules/datetime/templates/datetime-wrapper.html.twig index 295bf2f..d891817 100644 --- a/core/modules/datetime/templates/datetime-wrapper.html.twig +++ b/core/modules/datetime/templates/datetime-wrapper.html.twig @@ -6,7 +6,7 @@ * Available variables: * - content: The form element to be output, usually a datelist, or datetime. * - title: The title of the form element. - * - attributes: Remaining HTML attributes for the form wrapper. + * - attributes: HTML attributes for the form wrapper. * - required: (optional) A marker indicating that the form element is required. * * @see template_preprocess()