Skip to content
Snippets Groups Projects
Commit 6aae7ff7 authored by Dries Buytaert's avatar Dries Buytaert
Browse files

- Patch #40927 by vhmauery: added attributes for files. Required for some...

- Patch #40927 by vhmauery: added attributes for files.  Required for some contributed modules to work.
parent b170d83d
No related branches found
No related tags found
No related merge requests found
......@@ -916,7 +916,7 @@ function theme_weight($element) {
* provided by file.inc.
*/
function theme_file($element) {
return theme('form_element', $element['#title'], '<input type="file" class="'. _form_get_class('form-file', $element['#required'], form_get_error($element)) .'" name="'. $element['#name'] .'" id="'. form_clean_id($element['#id']) .'" size="'. $element['#size'] ."\" />\n", $element['#description'], $element['#id'], $element['#required'], form_get_error($element));
return theme('form_element', $element['#title'], '<input type="file" class="'. _form_get_class('form-file', $element['#required'], form_get_error($element)) .'" name="'. $element['#name'] .'"'. ($element['#attributes'] ? ' '. drupal_attributes($element['#attributes']) : '') .' id="'. form_clean_id($element['#id']) .'" size="'. $element['#size'] ."\" />\n", $element['#description'], $element['#id'], $element['#required'], form_get_error($element));
}
function _form_get_class($name, $required, $error) {
return $name. ($required ? ' required' : '') . ($error ? ' error' : '');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment