commit e26ace05fcd7778d3b0395b06944b606918cb15c Author: Joel Pittet Date: Sat Feb 8 17:57:30 2014 -0800 re-rolled diff --git a/core/includes/form.inc b/core/includes/form.inc index b4edb74..bb6a140 100644 --- a/core/includes/form.inc +++ b/core/includes/form.inc @@ -1117,32 +1117,6 @@ function password_confirm_validate($element, &$element_state) { } /** - * Returns HTML for an #date form element. - * - * Supports HTML5 types of 'date', 'datetime', 'datetime-local', and 'time'. - * Falls back to a plain textfield. Used as a sub-element by the datetime - * element type. - * - * @param array $variables - * An associative array containing: - * - element: An associative array containing the properties of the element. - * Properties used: #title, #value, #options, #description, #required, - * #attributes, #id, #name, #type, #min, #max, #step, #value, #size. - * - * @ingroup themeable - */ -function theme_date($variables) { - $element = $variables['element']; - if (empty($element['attribute']['type'])) { - $element['attribute']['type'] = 'date'; - } - element_set_attributes($element, array('id', 'name', 'type', 'min', 'max', 'step', 'value', 'size')); - _form_set_attributes($element, array('form-' . $element['attribute']['type'])); - - return ''; -} - -/** * Adds form-specific attributes to a 'date' #type element. * * Supports HTML5 types of 'date', 'datetime', 'datetime-local', and 'time'. @@ -1163,8 +1137,8 @@ function theme_date($variables) { */ function form_pre_render_date($element) { $element['#attributes']['type'] = 'date'; - element_set_attributes($element, array('id', 'name', 'min', 'max', 'step', 'value', 'size')); - _form_set_attributes($element, array('form-date')); + element_set_attributes($element, array('id', 'name', 'type', 'min', 'max', 'step', 'value', 'size')); + _form_set_attributes($element, array('form-' . $element['attribute']['type'])); return $element; }