summaryrefslogtreecommitdiff
path: root/modules/node/node.module
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2005-10-28 14:04:20 +0000
committerDries Buytaert <dries@buytaert.net>2005-10-28 14:04:20 +0000
commitef7d2c8a9fe188ee138101ec839246303972ac0d (patch)
tree2a3a170ecf04f2a0aa82c1ced60efb4625f4f135 /modules/node/node.module
parentda1de1df9f3efe7a08901ea83b9e011637997140 (diff)
downloadbrdo-ef7d2c8a9fe188ee138101ec839246303972ac0d.tar.gz
brdo-ef7d2c8a9fe188ee138101ec839246303972ac0d.tar.bz2
- Patch #34920 by tangent: reorganized the node submission form a bit.
Diffstat (limited to 'modules/node/node.module')
-rw-r--r--modules/node/node.module19
1 files changed, 9 insertions, 10 deletions
diff --git a/modules/node/node.module b/modules/node/node.module
index fd385d38e..05257640d 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 .= ' <div class="standard">';
+ $output .= form_render($form);
+ $output .= ' </div>';
$output .= ' <div class="admin">';
$output .= ' <div class="authored">';
$output .= form_render($form['author']);
@@ -1678,9 +1680,6 @@ function theme_node_form($form) {
$output .= ' <div class="options">';
$output .= form_render($form['options']);
$output .= ' </div>';
- $output .= '</div>';
- $output .= ' <div class="standard">';
- $output .= form_render($form);
$output .= ' </div>';
$output .= '</div>';
return $output;