| 1 |
<?php |
<?php |
| 2 |
// $Id: node.module,v 1.641.2.24 2006/12/12 12:48:57 killes Exp $ |
// $Id: node.module,v 1.641.2.25 2006/12/16 13:22:12 killes Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* @file |
* @file |
| 1714 |
drupal_validate_form($form['form_id']['#value'], $form); |
drupal_validate_form($form['form_id']['#value'], $form); |
| 1715 |
if (!form_get_errors()) { |
if (!form_get_errors()) { |
| 1716 |
// We pass the global $form_values here to preserve changes made during form validation |
// We pass the global $form_values here to preserve changes made during form validation |
| 1717 |
$form['node_preview'] = array('#value' => node_preview((object)$form_values), '#weight' => -100); |
$form['#prefix'] = node_preview((object)$form_values); |
| 1718 |
} |
} |
| 1719 |
} |
} |
| 1720 |
if (variable_get('node_preview', 0) && (form_get_errors() || $op != t('Preview'))) { |
if (variable_get('node_preview', 0) && (form_get_errors() || $op != t('Preview'))) { |
| 1725 |
|
|
| 1726 |
function theme_node_form($form) { |
function theme_node_form($form) { |
| 1727 |
$output = "\n<div class=\"node-form\">\n"; |
$output = "\n<div class=\"node-form\">\n"; |
|
if (isset($form['node_preview'])) { |
|
|
$output .= form_render($form['node_preview']); |
|
|
} |
|
| 1728 |
|
|
| 1729 |
// Admin form fields and submit buttons must be rendered first, because |
// Admin form fields and submit buttons must be rendered first, because |
| 1730 |
// they need to go to the bottom of the form, and so should not be part of |
// they need to go to the bottom of the form, and so should not be part of |