From a539b0e00dedddfea36d4a96b788e42923056a78 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sat, 5 Sep 2009 15:05:05 +0000 Subject: - Patch by #565496 by dropcube, pwolanin: changed Allow dynamic attaching of other types of stuff to render() structures. --- modules/file/file.field.inc | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'modules/file/file.field.inc') diff --git a/modules/file/file.field.inc b/modules/file/file.field.inc index 48a924784..12c1b600e 100644 --- a/modules/file/file.field.inc +++ b/modules/file/file.field.inc @@ -71,9 +71,7 @@ function file_field_settings_form($field, $instance) { $defaults = field_info_field_settings($field['type']); $settings = array_merge($defaults, $field['settings']); - $form = array( - '#attached_js' => array(drupal_get_path('module', 'file') . '/file.js'), - ); + $form['#attached']['js'][] = drupal_get_path('module', 'file') . '/file.js'; $form['display_field'] = array( '#type' => 'checkbox', @@ -119,9 +117,7 @@ function file_field_settings_form($field, $instance) { function file_field_instance_settings_form($field, $instance) { $settings = $instance['settings']; - $form = array( - '#attached_js' => array(drupal_get_path('module', 'file') . '/file.js'), - ); + $form['#attached']['js'][] = drupal_get_path('module', 'file') . '/file.js'; $form['max_filesize'] = array( '#type' => 'textfield', -- cgit v1.2.3