--- emthumb_orig.module 2009-07-04 15:44:12.000000000 +0000 +++ emthumb.module 2009-07-04 16:22:28.000000000 +0000 @@ -307,7 +307,7 @@ '#title' => $field['widget']['emthumb_label'] ? t('@label', array('@label' => $field['widget']['emthumb_label'])) : t('@field custom thumbnail', array('@field' => $field['widget']['label'])), '#weight' => $field['widget']['emthumb_weight'], '#collapsible' => TRUE, - '#collapsed' => FALSE, + '#collapsed' => ($field['widget']['emthumb_start_collapsed']), '#tree' => TRUE, ); $element['emthumb']['emthumb'] = array( @@ -388,9 +388,15 @@ '#default_value' => $widget['emthumb_custom_title'] ? $widget['emthumb_custom_title'] : 0, '#description' => t('Enable custom title text for custom thumbnails. Filename will be used if not checked.'), ); + $form['emthumb']['emthumb_start_collapsed'] = array( + '#type' => 'checkbox', + '#title' => t('Default display is collapsed'), + '#default_value' => $widget['emthumb_start_collapsed'] ? $widget['emthumb_start_collapsed'] : 0, + '#description' => t('Enable default display to be collapsed.'), + ); return $form; case 'save': - return array('emthumb', 'emthumb_label', 'emthumb_description', 'emthumb_max_resolution', 'emimport_image_path', 'emthumb_custom_alt', 'emthumb_custom_title'); + return array('emthumb', 'emthumb_label', 'emthumb_description', 'emthumb_max_resolution', 'emimport_image_path', 'emthumb_custom_alt', 'emthumb_custom_title', 'emthumb_start_collapsed'); } }