summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2010-03-18 06:50:37 +0000
committerDries Buytaert <dries@buytaert.net>2010-03-18 06:50:37 +0000
commitf3f6d53158f414fba28fe066904c7382ff611a1b (patch)
tree8be8e2eed8d34598020b7a634ccfbc006f562b89 /modules
parentd224c9835163860c861b2cf53eb7569f3c14f432 (diff)
downloadbrdo-f3f6d53158f414fba28fe066904c7382ff611a1b.tar.gz
brdo-f3f6d53158f414fba28fe066904c7382ff611a1b.tar.bz2
- Patch #596582 by sun: remove remnants of theme_node_form().
Diffstat (limited to 'modules')
-rw-r--r--modules/locale/locale.module2
-rw-r--r--modules/node/node.css11
-rw-r--r--modules/node/node.module4
-rw-r--r--modules/node/node.pages.inc26
-rw-r--r--modules/translation/translation.module2
5 files changed, 7 insertions, 38 deletions
diff --git a/modules/locale/locale.module b/modules/locale/locale.module
index 20e94ff59..667f7cd3a 100644
--- a/modules/locale/locale.module
+++ b/modules/locale/locale.module
@@ -386,7 +386,7 @@ function locale_form_alter(&$form, &$form_state, $form_id) {
locale_language_selector_form($form, $form_state, $form['#user']);
}
}
- if (isset($form['#id']) && $form['#id'] == 'node-form') {
+ if (!empty($form['#node_edit_form'])) {
if (isset($form['#node']->type) && locale_multilingual_node_type($form['#node']->type)) {
$form['language'] = array(
'#type' => 'select',
diff --git a/modules/node/node.css b/modules/node/node.css
index 7b00fc7b7..073f023f1 100644
--- a/modules/node/node.css
+++ b/modules/node/node.css
@@ -24,17 +24,6 @@
td.revision-current {
background: #ffc;
}
-.node-form .container-inline .form-text {
- display: inline;
- width: auto;
-}
-.node-form .standard {
- clear: both;
-}
-.node-form .attachments fieldset {
- float: none;
- display: block;
-}
.terms-inline {
display: inline;
}
diff --git a/modules/node/node.module b/modules/node/node.module
index 60cff49a8..f91e63e92 100644
--- a/modules/node/node.module
+++ b/modules/node/node.module
@@ -143,10 +143,6 @@ function node_theme() {
'variables' => array('content' => NULL),
'file' => 'node.pages.inc',
),
- 'node_form' => array(
- 'render element' => 'form',
- 'file' => 'node.pages.inc',
- ),
'node_preview' => array(
'variables' => array('node' => NULL),
'file' => 'node.pages.inc',
diff --git a/modules/node/node.pages.inc b/modules/node/node.pages.inc
index 8030a571a..43ce0b4ac 100644
--- a/modules/node/node.pages.inc
+++ b/modules/node/node.pages.inc
@@ -108,9 +108,12 @@ function node_form($form, &$form_state, $node) {
$node->in_preview = TRUE;
}
- // Set the id and identify this as a node edit form.
- $form['#id'] = 'node-form';
+ // Identify this as a node edit form.
$form['#node_edit_form'] = TRUE;
+ $form['#attributes']['class'][] = 'node-form';
+ if (!empty($node->type)) {
+ $form['#attributes']['class'][] = 'node-' . $node->type . '-form';
+ }
// Basic node information.
// These elements are just values so they are not even sent to the client.
@@ -292,25 +295,6 @@ function node_form_build_preview($form, &$form_state) {
}
/**
- * Present a node submission form.
- *
- * @ingroup themeable
- */
-function theme_node_form($variables) {
- $form = $variables['form'];
-
- $output = "\n<div class=\"node-form\">\n";
-
- $output .= " <div class=\"standard\">\n";
- $output .= drupal_render_children($form);
- $output .= " </div>\n";
-
- $output .= "</div>\n";
-
- return $output;
-}
-
-/**
* Generate a node preview.
*/
function node_preview($node) {
diff --git a/modules/translation/translation.module b/modules/translation/translation.module
index 531555912..436cdc2d9 100644
--- a/modules/translation/translation.module
+++ b/modules/translation/translation.module
@@ -123,7 +123,7 @@ function translation_form_node_type_form_alter(&$form, &$form_state) {
* is about to be created.
*/
function translation_form_alter(&$form, &$form_state, $form_id) {
- if (isset($form['#id']) && $form['#id'] == 'node-form' && translation_supported_type($form['#node']->type)) {
+ if (!empty($form['#node_edit_form']) && translation_supported_type($form['#node']->type)) {
$node = $form['#node'];
if (!empty($node->translation_source)) {
// We are creating a translation. Add values and lock language field.