summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2008-08-22 12:38:02 +0000
committerDries Buytaert <dries@buytaert.net>2008-08-22 12:38:02 +0000
commitb2e725c0d41bced26f0b21437d653cdcdb5abb90 (patch)
tree13fc766836b9297c1f4a08ab604206b637fb606d
parentc15bcc0653bbeff88c44d5d9e6a199ccb35e9c22 (diff)
downloadbrdo-b2e725c0d41bced26f0b21437d653cdcdb5abb90.tar.gz
brdo-b2e725c0d41bced26f0b21437d653cdcdb5abb90.tar.bz2
- Patch #296918 by JBrauer: clean up CSS/HTML of node form.
-rw-r--r--modules/node/node.pages.inc29
1 files changed, 3 insertions, 26 deletions
diff --git a/modules/node/node.pages.inc b/modules/node/node.pages.inc
index d498a0fe0..c28927244 100644
--- a/modules/node/node.pages.inc
+++ b/modules/node/node.pages.inc
@@ -176,7 +176,7 @@ function node_form(&$form_state, $node) {
'#title' => t('Authoring information'),
'#collapsible' => TRUE,
'#collapsed' => TRUE,
- '#weight' => 20,
+ '#weight' => 90,
);
$form['author']['name'] = array(
'#type' => 'textfield',
@@ -205,7 +205,7 @@ function node_form(&$form_state, $node) {
'#title' => t('Publishing options'),
'#collapsible' => TRUE,
'#collapsed' => TRUE,
- '#weight' => 25,
+ '#weight' => 95,
);
$form['options']['status'] = array(
'#type' => 'checkbox',
@@ -233,6 +233,7 @@ function node_form(&$form_state, $node) {
// Add the buttons.
$form['buttons'] = array();
+ $form['buttons']['#weight'] = 100;
$form['buttons']['submit'] = array(
'#type' => 'submit',
'#value' => t('Save'),
@@ -328,34 +329,10 @@ function node_form_build_preview($form, &$form_state) {
function theme_node_form($form) {
$output = "\n<div class=\"node-form\">\n";
- // Admin form fields and submit buttons must be rendered first, because
- // they need to go to the bottom of the form, and so should not be part of
- // the catch-all call to drupal_render().
- $admin = '';
- if (isset($form['author'])) {
- $admin .= " <div class=\"authored\">\n";
- $admin .= drupal_render($form['author']);
- $admin .= " </div>\n";
- }
- if (isset($form['options'])) {
- $admin .= " <div class=\"options\">\n";
- $admin .= drupal_render($form['options']);
- $admin .= " </div>\n";
- }
- $buttons = drupal_render($form['buttons']);
-
- // Everything else gets rendered here, and is displayed before the admin form
- // field and the submit buttons.
$output .= " <div class=\"standard\">\n";
$output .= drupal_render($form);
$output .= " </div>\n";
- if (!empty($admin)) {
- $output .= " <div class=\"admin\">\n";
- $output .= $admin;
- $output .= " </div>\n";
- }
- $output .= $buttons;
$output .= "</div>\n";
return $output;