diff --git a/modules/book.module b/modules/book.module index 7ec687751c0..ceee6659cfb 100644 --- a/modules/book.module +++ b/modules/book.module @@ -249,7 +249,10 @@ function book_form(&$node) { $form = array_merge($form, filter_form($node->format)); $form['log'] = array( - '#type' => 'textarea', '#title' => t('Log message'), '#default_value' => $node->log, '#rows' => 5, '#weight' => 18, + '#type' => 'fieldset', '#title' => t('Log message'), '#collapsible' => TRUE, '#collapsed' => TRUE + ); + $form['log']['message'] = array( + '#type' => 'textarea', '#default_value' => $node->log, '#rows' => 5, '#weight' => 18, '#description' => t('An explanation of the additions or updates being made to help other authors understand your motivations.') ); diff --git a/modules/book/book.module b/modules/book/book.module index 7ec687751c0..ceee6659cfb 100644 --- a/modules/book/book.module +++ b/modules/book/book.module @@ -249,7 +249,10 @@ function book_form(&$node) { $form = array_merge($form, filter_form($node->format)); $form['log'] = array( - '#type' => 'textarea', '#title' => t('Log message'), '#default_value' => $node->log, '#rows' => 5, '#weight' => 18, + '#type' => 'fieldset', '#title' => t('Log message'), '#collapsible' => TRUE, '#collapsed' => TRUE + ); + $form['log']['message'] = array( + '#type' => 'textarea', '#default_value' => $node->log, '#rows' => 5, '#weight' => 18, '#description' => t('An explanation of the additions or updates being made to help other authors understand your motivations.') ); diff --git a/modules/menu.module b/modules/menu.module index ac7d10fbb31..2648094cc64 100644 --- a/modules/menu.module +++ b/modules/menu.module @@ -543,7 +543,7 @@ function menu_node_form($edit = array()) { } } - $form['menu'] = array('#type' => 'fieldset', '#title' => t('Menu item settings'), '#collapsible' => TRUE, '#collapsed' => TRUE, '#tree' => TRUE); + $form['menu'] = array('#type' => 'fieldset', '#title' => t('Menu settings'), '#collapsible' => TRUE, '#collapsed' => TRUE, '#tree' => TRUE); $form['menu']['title'] = array('#type' => 'textfield', '#title' => t('Title'), '#default_value' => $item['title'], '#size' => 60, '#maxlength' => 128, '#description' => t('The name to display for this link.')); diff --git a/modules/menu/menu.module b/modules/menu/menu.module index ac7d10fbb31..2648094cc64 100644 --- a/modules/menu/menu.module +++ b/modules/menu/menu.module @@ -543,7 +543,7 @@ function menu_node_form($edit = array()) { } } - $form['menu'] = array('#type' => 'fieldset', '#title' => t('Menu item settings'), '#collapsible' => TRUE, '#collapsed' => TRUE, '#tree' => TRUE); + $form['menu'] = array('#type' => 'fieldset', '#title' => t('Menu settings'), '#collapsible' => TRUE, '#collapsed' => TRUE, '#tree' => TRUE); $form['menu']['title'] = array('#type' => 'textfield', '#title' => t('Title'), '#default_value' => $item['title'], '#size' => 60, '#maxlength' => 128, '#description' => t('The name to display for this link.')); diff --git a/modules/node.module b/modules/node.module index fd385d38ed7..05257640ddf 100644 --- a/modules/node.module +++ b/modules/node.module @@ -1615,8 +1615,8 @@ function node_form($node) { */ if (user_access('administer nodes')) { - $form['author'] = array('#type' => 'fieldset', '#title' => t('Authoring information'), '#collapsible' => TRUE, '#collapsed' => TRUE, '#weight' => -18); - $form['author']['name'] = array('#type' => 'textfield', '#title' => t('Authored by'), '#maxlength' => 60, '#autocomplete_path' => 'user/autocomplete', '#default_value' => $node->name, '#weight' => -1); + $form['author'] = array('#type' => 'fieldset', '#title' => t('Authoring information'), '#collapsible' => TRUE, '#collapsed' => TRUE, '#weight' => -5); + $form['author']['name'] = array('#type' => 'textfield', '#title' => t('Authored by'), '#maxlength' => 60, '#autocomplete_path' => 'user/autocomplete', '#required' => TRUE, '#default_value' => $node->name, '#weight' => -1); $form['author']['date'] = array('#type' => 'textfield', '#title' => t('Authored on'), '#maxlength' => 25, '#required' => TRUE, '#default_value' => $node->date); $node_options = variable_get('node_options_'. $node->type, array('status', 'promote')); @@ -1624,7 +1624,7 @@ function node_form($node) { /** * Node options */ - $form['options'] = array('#type' => 'fieldset', '#title' => t('Publishing options'), '#collapsible' => TRUE, '#collapsed' => TRUE, '#weight' => -18); + $form['options'] = array('#type' => 'fieldset', '#title' => t('Publishing options'), '#collapsible' => TRUE, '#collapsed' => TRUE, '#weight' => -5); $form['options']['status'] = array('#type' => 'checkbox', '#title' => t('Published'), '#default_value' => in_array('status', $node_options)); $form['options']['moderate'] = array('#type' => 'checkbox', '#title' => t('In moderation queue'), '#default_value' => in_array('moderate', $node_options)); $form['options']['promote'] = array('#type' => 'checkbox', '#title' => t('Promoted to front page'), '#default_value' => in_array('promote', $node_options)); @@ -1632,18 +1632,17 @@ function node_form($node) { $form['options']['revision'] = array('#type' => 'checkbox', '#title' =>t('Create new revision'), '#default_value' => in_array('revision', $node_options)); } - $nodeapi = node_invoke_nodeapi($node, 'form'); if (is_array($nodeapi)) { foreach ($nodeapi as $key => $element) { - $nodeapi[$key]['#weight'] = isset($nodeapi[$key]['#weight']) ? $nodeapi[$key]['#weight'] : -18; + $nodeapi[$key]['#weight'] = isset($nodeapi[$key]['#weight']) ? $nodeapi[$key]['#weight'] : -4; } // Append extra node form elements. $form = array_merge($form, $nodeapi); } - $form['title']['#weight'] = isset($form['title']['#weight']) ? $form['title']['#weight'] : -17; - $form['body']['#weight'] = isset($form['body']['#weight']) ? $form['body']['#weight'] : -5; + $form['title']['#weight'] = isset($form['title']['#weight']) ? $form['title']['#weight'] : -18; + $form['body']['#weight'] = isset($form['body']['#weight']) ? $form['body']['#weight'] : -17; // Add the buttons. $form['preview'] = array('#type' => 'button', '#value' => t('Preview'), '#weight' => 19); @@ -1671,6 +1670,9 @@ function theme_node_form($form) { $output .= form_render($form['node_preview']); } + $output .= '
'; + $output .= form_render($form); + $output .= '
'; $output .= '
'; $output .= '
'; $output .= form_render($form['author']); @@ -1678,9 +1680,6 @@ function theme_node_form($form) { $output .= '
'; $output .= form_render($form['options']); $output .= '
'; - $output .= '
'; - $output .= '
'; - $output .= form_render($form); $output .= '
'; $output .= '
'; return $output; diff --git a/modules/node/node.module b/modules/node/node.module index fd385d38ed7..05257640ddf 100644 --- a/modules/node/node.module +++ b/modules/node/node.module @@ -1615,8 +1615,8 @@ function node_form($node) { */ if (user_access('administer nodes')) { - $form['author'] = array('#type' => 'fieldset', '#title' => t('Authoring information'), '#collapsible' => TRUE, '#collapsed' => TRUE, '#weight' => -18); - $form['author']['name'] = array('#type' => 'textfield', '#title' => t('Authored by'), '#maxlength' => 60, '#autocomplete_path' => 'user/autocomplete', '#default_value' => $node->name, '#weight' => -1); + $form['author'] = array('#type' => 'fieldset', '#title' => t('Authoring information'), '#collapsible' => TRUE, '#collapsed' => TRUE, '#weight' => -5); + $form['author']['name'] = array('#type' => 'textfield', '#title' => t('Authored by'), '#maxlength' => 60, '#autocomplete_path' => 'user/autocomplete', '#required' => TRUE, '#default_value' => $node->name, '#weight' => -1); $form['author']['date'] = array('#type' => 'textfield', '#title' => t('Authored on'), '#maxlength' => 25, '#required' => TRUE, '#default_value' => $node->date); $node_options = variable_get('node_options_'. $node->type, array('status', 'promote')); @@ -1624,7 +1624,7 @@ function node_form($node) { /** * Node options */ - $form['options'] = array('#type' => 'fieldset', '#title' => t('Publishing options'), '#collapsible' => TRUE, '#collapsed' => TRUE, '#weight' => -18); + $form['options'] = array('#type' => 'fieldset', '#title' => t('Publishing options'), '#collapsible' => TRUE, '#collapsed' => TRUE, '#weight' => -5); $form['options']['status'] = array('#type' => 'checkbox', '#title' => t('Published'), '#default_value' => in_array('status', $node_options)); $form['options']['moderate'] = array('#type' => 'checkbox', '#title' => t('In moderation queue'), '#default_value' => in_array('moderate', $node_options)); $form['options']['promote'] = array('#type' => 'checkbox', '#title' => t('Promoted to front page'), '#default_value' => in_array('promote', $node_options)); @@ -1632,18 +1632,17 @@ function node_form($node) { $form['options']['revision'] = array('#type' => 'checkbox', '#title' =>t('Create new revision'), '#default_value' => in_array('revision', $node_options)); } - $nodeapi = node_invoke_nodeapi($node, 'form'); if (is_array($nodeapi)) { foreach ($nodeapi as $key => $element) { - $nodeapi[$key]['#weight'] = isset($nodeapi[$key]['#weight']) ? $nodeapi[$key]['#weight'] : -18; + $nodeapi[$key]['#weight'] = isset($nodeapi[$key]['#weight']) ? $nodeapi[$key]['#weight'] : -4; } // Append extra node form elements. $form = array_merge($form, $nodeapi); } - $form['title']['#weight'] = isset($form['title']['#weight']) ? $form['title']['#weight'] : -17; - $form['body']['#weight'] = isset($form['body']['#weight']) ? $form['body']['#weight'] : -5; + $form['title']['#weight'] = isset($form['title']['#weight']) ? $form['title']['#weight'] : -18; + $form['body']['#weight'] = isset($form['body']['#weight']) ? $form['body']['#weight'] : -17; // Add the buttons. $form['preview'] = array('#type' => 'button', '#value' => t('Preview'), '#weight' => 19); @@ -1671,6 +1670,9 @@ function theme_node_form($form) { $output .= form_render($form['node_preview']); } + $output .= '
'; + $output .= form_render($form); + $output .= '
'; $output .= '
'; $output .= '
'; $output .= form_render($form['author']); @@ -1678,9 +1680,6 @@ function theme_node_form($form) { $output .= '
'; $output .= form_render($form['options']); $output .= '
'; - $output .= '
'; - $output .= '
'; - $output .= form_render($form); $output .= '
'; $output .= '
'; return $output; diff --git a/modules/page.module b/modules/page.module index b9749105e00..155521b1b49 100644 --- a/modules/page.module +++ b/modules/page.module @@ -82,9 +82,11 @@ function page_form(&$node) { ); $form = array_merge($form, filter_form($node->format)); - $form['log'] = array( - '#type' => 'textarea', '#title' => t('Log message'), '#default_value' => $node->log, '#rows' => 5, + '#type' => 'fieldset', '#title' => t('Log message'), '#collapsible' => TRUE, '#collapsed' => TRUE + ); + $form['log']['message'] = array( + '#type' => 'textarea', '#default_value' => $node->log, '#rows' => 5, '#description' => t('An explanation of the additions or updates being made to help other authors understand your motivations.') ); diff --git a/modules/page/page.module b/modules/page/page.module index b9749105e00..155521b1b49 100644 --- a/modules/page/page.module +++ b/modules/page/page.module @@ -82,9 +82,11 @@ function page_form(&$node) { ); $form = array_merge($form, filter_form($node->format)); - $form['log'] = array( - '#type' => 'textarea', '#title' => t('Log message'), '#default_value' => $node->log, '#rows' => 5, + '#type' => 'fieldset', '#title' => t('Log message'), '#collapsible' => TRUE, '#collapsed' => TRUE + ); + $form['log']['message'] = array( + '#type' => 'textarea', '#default_value' => $node->log, '#rows' => 5, '#description' => t('An explanation of the additions or updates being made to help other authors understand your motivations.') ); diff --git a/modules/path.module b/modules/path.module index 2ef57f1906e..078900a253f 100644 --- a/modules/path.module +++ b/modules/path.module @@ -192,9 +192,10 @@ function path_nodeapi(&$node, $op, $arg) { break; case 'form': - $form['path'] = array('#type' => 'textfield', '#title' => t('Path alias'), '#weight' => -16, '#default_value' => $node->path, '#size' => 60, '#maxlength' => 250, '#description' => t('Optionally specify an alternative URL by which this node can be accessed. For example, type "about" when writing an about page. Use a relative path and don\'t add a trailing slash or the URL alias won\'t work.')); + $form['path'] = array('#type' => 'fieldset', '#title' => t('URL path settings'), '#collapsible' => TRUE, '#collapsed' => TRUE); + $form['path']['alias'] = array('#type' => 'textfield', '#default_value' => $node->path, '#size' => 60, '#maxlength' => 250, '#collapsible' => TRUE, '#collapsed' => TRUE, '#description' => t('Optionally specify an alternative URL by which this node can be accessed. For example, type "about" when writing an about page. Use a relative path and don\'t add a trailing slash or the URL alias won\'t work.')); if ($node->path) { - $form['pid'] = array('#type' => 'hidden', '#value' => db_result(db_query("SELECT pid FROM {url_alias} WHERE dst = '%s'", $node->path))); + $form['path']['pid'] = array('#type' => 'hidden', '#value' => db_result(db_query("SELECT pid FROM {url_alias} WHERE dst = '%s'", $node->path))); } return $form; diff --git a/modules/path/path.module b/modules/path/path.module index 2ef57f1906e..078900a253f 100644 --- a/modules/path/path.module +++ b/modules/path/path.module @@ -192,9 +192,10 @@ function path_nodeapi(&$node, $op, $arg) { break; case 'form': - $form['path'] = array('#type' => 'textfield', '#title' => t('Path alias'), '#weight' => -16, '#default_value' => $node->path, '#size' => 60, '#maxlength' => 250, '#description' => t('Optionally specify an alternative URL by which this node can be accessed. For example, type "about" when writing an about page. Use a relative path and don\'t add a trailing slash or the URL alias won\'t work.')); + $form['path'] = array('#type' => 'fieldset', '#title' => t('URL path settings'), '#collapsible' => TRUE, '#collapsed' => TRUE); + $form['path']['alias'] = array('#type' => 'textfield', '#default_value' => $node->path, '#size' => 60, '#maxlength' => 250, '#collapsible' => TRUE, '#collapsed' => TRUE, '#description' => t('Optionally specify an alternative URL by which this node can be accessed. For example, type "about" when writing an about page. Use a relative path and don\'t add a trailing slash or the URL alias won\'t work.')); if ($node->path) { - $form['pid'] = array('#type' => 'hidden', '#value' => db_result(db_query("SELECT pid FROM {url_alias} WHERE dst = '%s'", $node->path))); + $form['path']['pid'] = array('#type' => 'hidden', '#value' => db_result(db_query("SELECT pid FROM {url_alias} WHERE dst = '%s'", $node->path))); } return $form; diff --git a/modules/upload.module b/modules/upload.module index 50f795bc280..67069b902ee 100644 --- a/modules/upload.module +++ b/modules/upload.module @@ -395,7 +395,7 @@ function upload_form($node) { $form['attachments'] = array( '#type' => 'fieldset', '#title' => t('File attachments'), '#collapsible' => TRUE, '#collapsed' => empty($node->files), '#description' => t('Changes made to the attachments are not permanent until you save this post. The first "listed" file will be included in RSS feeds.'), - '#prefix' => '
', '#suffix' => '
', '#weight' => 15 + '#prefix' => '
', '#suffix' => '
' ); $form['attachments'] += _upload_form($node); diff --git a/modules/upload/upload.module b/modules/upload/upload.module index 50f795bc280..67069b902ee 100644 --- a/modules/upload/upload.module +++ b/modules/upload/upload.module @@ -395,7 +395,7 @@ function upload_form($node) { $form['attachments'] = array( '#type' => 'fieldset', '#title' => t('File attachments'), '#collapsible' => TRUE, '#collapsed' => empty($node->files), '#description' => t('Changes made to the attachments are not permanent until you save this post. The first "listed" file will be included in RSS feeds.'), - '#prefix' => '
', '#suffix' => '
', '#weight' => 15 + '#prefix' => '
', '#suffix' => '
' ); $form['attachments'] += _upload_form($node);