Commit f3f6d531 authored by Dries's avatar Dries

- Patch #596582 by sun: remove remnants of theme_node_form().

parent d224c983
......@@ -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',
......
......@@ -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;
}
......@@ -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',
......
......@@ -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.
......@@ -291,25 +294,6 @@ function node_form_build_preview($form, &$form_state) {
$form_state['node_preview'] = node_preview($node);
}
/**
* 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.
*/
......
......@@ -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.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment