When changing the order of CCK fields associated with a node, the original weight value of the body field can become changed from it's default/original value. Since the image picker weight value is assigned as '1' (one), this can cause the image picker fieldset to become confusingly disassociated with the body field (way too far down the screen).
I propose associating the image picker fieldset to the bottom of the body field (right below the image format fieldset).
Please consider the following change to the code:
diff --git a/imagepicker.module b/imagepicker.module
index 93bf3aa..ebdcf06 100755
--- a/imagepicker.module
+++ b/imagepicker.module
@@ -166,14 +166,15 @@ function imagepicker_form_alter(&$form, &$form_state, $form_id) {
}
if (user_access('use imagepicker')) {
if (($node_type && preg_match('/node_form$/i', $form_id) ) || $comment ) {
- $form['body_filter']['file_upload'] = array(
+ $form['body_field']['body_filter']['file_upload'] = array(
'#type' => 'fieldset',
'#title' => t('Image picker'),
'#collapsible' => 1,
'#collapsed' => variable_get('imagepicker_advanced_collapsed', 0),
'#weight' => $weight,
);
- $form['body_filter']['file_upload']['mpframe'] = array(
+ $form['body_field']['body_filter']['#weight'] = 2;
+ $form['body_field']['body_filter']['file_upload']['mpframe'] = array(
'#type' => 'markup',
'#value' => '<div><iframe id="imagepicker" style="width: '. variable_get('imagepicker_advanced_iframe_width', "100%") .';
);
Thanks,
Paul
Comments
Comment #1
hutch commentedThis looks like a good fix, I will add it to dev versions
Thanks!
Comment #2
hutch commentedincorporated into the current 2.x series