summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--includes/form.inc7
-rw-r--r--modules/block.module6
-rw-r--r--modules/block/block.module6
-rw-r--r--modules/blog.module4
-rw-r--r--modules/blog/blog.module4
-rw-r--r--modules/book.module4
-rw-r--r--modules/book/book.module4
-rw-r--r--modules/comment.module6
-rw-r--r--modules/comment/comment.module6
-rw-r--r--modules/forum.module4
-rw-r--r--modules/forum/forum.module4
-rw-r--r--modules/node.module7
-rw-r--r--modules/node/node.module7
-rw-r--r--modules/page.module6
-rw-r--r--modules/page/page.module6
-rw-r--r--modules/story.module4
-rw-r--r--modules/story/story.module4
17 files changed, 30 insertions, 59 deletions
diff --git a/includes/form.inc b/includes/form.inc
index 0fd8cf9b1..a907480a8 100644
--- a/includes/form.inc
+++ b/includes/form.inc
@@ -523,7 +523,6 @@ function theme_fieldset($element) {
}
-
/**
* Format a radio button.
*
@@ -691,7 +690,6 @@ function expand_radios($element) {
return $element;
}
-
/**
* Format a form item.
*
@@ -705,7 +703,6 @@ function theme_item($element) {
return theme('form_element', $element['#title'], $element['#value'] . $element['#children'], $element['#description'], $element['#id'], $element['#required'], $element['#error']);
}
-
/**
* Format a checkbox.
*
@@ -765,7 +762,6 @@ function expand_checkboxes($element) {
return $element;
}
-
function theme_submit($element) {
return theme('button', $element);
}
@@ -823,7 +819,6 @@ function theme_form($element) {
return '<form '. $action . ' method="'. $element['#method'] .'" '. drupal_attributes($element['#attributes']) .">\n<div>". $element['#children'] ."\n</div></form>\n";
}
-
/**
* Format a textarea.
*
@@ -861,8 +856,6 @@ function theme_markup($element) {
return $element['#value'] . $element['#children'];
}
-
-
/**
* Format a password field.
*
diff --git a/modules/block.module b/modules/block.module
index 95266c9b8..e97187483 100644
--- a/modules/block.module
+++ b/modules/block.module
@@ -458,7 +458,6 @@ function block_box_delete_confirm_submit($form_id, $form_values) {
drupal_goto('admin/block');
};
-
function block_box_form($edit = array()) {
$form['title'] = array(
'#type' => 'textfield',
@@ -468,7 +467,8 @@ function block_box_form($edit = array()) {
'#description' => t('The title of the block as shown to the user.'),
'#weight' => -18,
);
- $form['body'] = array(
+ $form['body_filter']['#weight'] = -17;
+ $form['body_filter']['body'] = array(
'#type' => 'textarea',
'#title' => t('Block body'),
'#default_value' => $edit['body'],
@@ -476,7 +476,7 @@ function block_box_form($edit = array()) {
'#description' => t('The content of the block as shown to the user.'),
'#weight' => -17,
);
- $form['format'] = filter_form($edit['format']);
+ $form['body_filter']['format'] = filter_form($edit['format'], -16);
$form['info'] = array(
'#type' => 'textfield',
'#title' => t('Block description'),
diff --git a/modules/block/block.module b/modules/block/block.module
index 95266c9b8..e97187483 100644
--- a/modules/block/block.module
+++ b/modules/block/block.module
@@ -458,7 +458,6 @@ function block_box_delete_confirm_submit($form_id, $form_values) {
drupal_goto('admin/block');
};
-
function block_box_form($edit = array()) {
$form['title'] = array(
'#type' => 'textfield',
@@ -468,7 +467,8 @@ function block_box_form($edit = array()) {
'#description' => t('The title of the block as shown to the user.'),
'#weight' => -18,
);
- $form['body'] = array(
+ $form['body_filter']['#weight'] = -17;
+ $form['body_filter']['body'] = array(
'#type' => 'textarea',
'#title' => t('Block body'),
'#default_value' => $edit['body'],
@@ -476,7 +476,7 @@ function block_box_form($edit = array()) {
'#description' => t('The content of the block as shown to the user.'),
'#weight' => -17,
);
- $form['format'] = filter_form($edit['format']);
+ $form['body_filter']['format'] = filter_form($edit['format'], -16);
$form['info'] = array(
'#type' => 'textfield',
'#title' => t('Block description'),
diff --git a/modules/blog.module b/modules/blog.module
index 76952cddf..1dd5df58b 100644
--- a/modules/blog.module
+++ b/modules/blog.module
@@ -229,8 +229,8 @@ function blog_form(&$node) {
}
$form['title'] = array('#type' => 'textfield', '#title' => t('Title'), '#required' => TRUE, '#default_value' => $node->title, '#weight' => -5);
- $form['body'] = array('#type' => 'textarea', '#title' => t('Body'), '#default_value' => $node->body, '#rows' => 20, '#required' => TRUE);
- $form['filter'] = filter_form($node->format);
+ $form['body_filter']['body'] = array('#type' => 'textarea', '#title' => t('Body'), '#default_value' => $node->body, '#rows' => 20, '#required' => TRUE);
+ $form['body_filter']['filter'] = filter_form($node->format, 1);
return $form;
}
diff --git a/modules/blog/blog.module b/modules/blog/blog.module
index 76952cddf..1dd5df58b 100644
--- a/modules/blog/blog.module
+++ b/modules/blog/blog.module
@@ -229,8 +229,8 @@ function blog_form(&$node) {
}
$form['title'] = array('#type' => 'textfield', '#title' => t('Title'), '#required' => TRUE, '#default_value' => $node->title, '#weight' => -5);
- $form['body'] = array('#type' => 'textarea', '#title' => t('Body'), '#default_value' => $node->body, '#rows' => 20, '#required' => TRUE);
- $form['filter'] = filter_form($node->format);
+ $form['body_filter']['body'] = array('#type' => 'textarea', '#title' => t('Body'), '#default_value' => $node->body, '#rows' => 20, '#required' => TRUE);
+ $form['body_filter']['filter'] = filter_form($node->format, 1);
return $form;
}
diff --git a/modules/book.module b/modules/book.module
index e800b8f50..3354c8656 100644
--- a/modules/book.module
+++ b/modules/book.module
@@ -252,8 +252,8 @@ function book_form(&$node) {
);
$form['title'] = array('#type' => 'textfield', '#title' => t('Title'), '#required' => TRUE, '#default_value' => $node->title, '#weight' => -5);
- $form['body'] = array('#type' => 'textarea', '#title' => t('Body'), '#default_value' => $node->body, '#rows' => 20, '#required' => TRUE);
- $form['format'] = filter_form($node->format);
+ $form['body_filter']['body'] = array('#type' => 'textarea', '#title' => t('Body'), '#default_value' => $node->body, '#rows' => 20, '#required' => TRUE);
+ $form['body_filter']['format'] = filter_form($node->format, 1);
$form['log'] = array(
'#type' => 'textarea', '#title' => t('Log message'), '#default_value' => $node->log, '#weight' => 5,
diff --git a/modules/book/book.module b/modules/book/book.module
index e800b8f50..3354c8656 100644
--- a/modules/book/book.module
+++ b/modules/book/book.module
@@ -252,8 +252,8 @@ function book_form(&$node) {
);
$form['title'] = array('#type' => 'textfield', '#title' => t('Title'), '#required' => TRUE, '#default_value' => $node->title, '#weight' => -5);
- $form['body'] = array('#type' => 'textarea', '#title' => t('Body'), '#default_value' => $node->body, '#rows' => 20, '#required' => TRUE);
- $form['format'] = filter_form($node->format);
+ $form['body_filter']['body'] = array('#type' => 'textarea', '#title' => t('Body'), '#default_value' => $node->body, '#rows' => 20, '#required' => TRUE);
+ $form['body_filter']['format'] = filter_form($node->format, 1);
$form['log'] = array(
'#type' => 'textarea', '#title' => t('Log message'), '#default_value' => $node->log, '#weight' => 5,
diff --git a/modules/comment.module b/modules/comment.module
index c574d19fb..18e8b304d 100644
--- a/modules/comment.module
+++ b/modules/comment.module
@@ -1332,10 +1332,8 @@ function comment_form($edit, $title = NULL) {
$form['subject'] = array('#type' => 'textfield', '#title' => t('Subject'), '#maxlength' => 64, '#default_value' => $edit['subject']);
}
- $form['comment'] = array('#type' => 'textarea', '#title' => t('Comment'), '#rows' => 15, '#default_value' => $edit['comment'] ? $edit['comment'] : $user->signature, '#required' => TRUE
- );
-
- $form['format'] = filter_form($edit['format'], 18);
+ $form['comment_filter']['comment'] = array('#type' => 'textarea', '#title' => t('Comment'), '#rows' => 15, '#default_value' => $edit['comment'] ? $edit['comment'] : $user->signature, '#required' => TRUE);
+ $form['comment_filter']['format'] = filter_form($edit['format'], 1);
$form['cid'] = array('#type' => 'value', '#value' => $edit['cid']);
$form['pid'] = array('#type' => 'value', '#value' => $edit['pid']);
diff --git a/modules/comment/comment.module b/modules/comment/comment.module
index c574d19fb..18e8b304d 100644
--- a/modules/comment/comment.module
+++ b/modules/comment/comment.module
@@ -1332,10 +1332,8 @@ function comment_form($edit, $title = NULL) {
$form['subject'] = array('#type' => 'textfield', '#title' => t('Subject'), '#maxlength' => 64, '#default_value' => $edit['subject']);
}
- $form['comment'] = array('#type' => 'textarea', '#title' => t('Comment'), '#rows' => 15, '#default_value' => $edit['comment'] ? $edit['comment'] : $user->signature, '#required' => TRUE
- );
-
- $form['format'] = filter_form($edit['format'], 18);
+ $form['comment_filter']['comment'] = array('#type' => 'textarea', '#title' => t('Comment'), '#rows' => 15, '#default_value' => $edit['comment'] ? $edit['comment'] : $user->signature, '#required' => TRUE);
+ $form['comment_filter']['format'] = filter_form($edit['format'], 1);
$form['cid'] = array('#type' => 'value', '#value' => $edit['cid']);
$form['pid'] = array('#type' => 'value', '#value' => $edit['pid']);
diff --git a/modules/forum.module b/modules/forum.module
index 50f27baeb..890ff48c2 100644
--- a/modules/forum.module
+++ b/modules/forum.module
@@ -592,8 +592,8 @@ function forum_form(&$node) {
$form['shadow'] = array('#type' => 'checkbox', '#title' => t('Leave shadow copy'), '#default_value' => $shadow, '#description' => t('If you move this topic, you can leave a link in the old forum to the new forum.'));
}
- $form['body'] = array('#type' => 'textarea', '#title' => t('Body'), '#default_value' => $node->body, '#rows' => 20, '#required' => TRUE);
- $form['format'] = filter_form($node->format);
+ $form['body_filter']['body'] = array('#type' => 'textarea', '#title' => t('Body'), '#default_value' => $node->body, '#rows' => 20, '#required' => TRUE);
+ $form['body_filter']['format'] = filter_form($node->format, 1);
return $form;
}
diff --git a/modules/forum/forum.module b/modules/forum/forum.module
index 50f27baeb..890ff48c2 100644
--- a/modules/forum/forum.module
+++ b/modules/forum/forum.module
@@ -592,8 +592,8 @@ function forum_form(&$node) {
$form['shadow'] = array('#type' => 'checkbox', '#title' => t('Leave shadow copy'), '#default_value' => $shadow, '#description' => t('If you move this topic, you can leave a link in the old forum to the new forum.'));
}
- $form['body'] = array('#type' => 'textarea', '#title' => t('Body'), '#default_value' => $node->body, '#rows' => 20, '#required' => TRUE);
- $form['format'] = filter_form($node->format);
+ $form['body_filter']['body'] = array('#type' => 'textarea', '#title' => t('Body'), '#default_value' => $node->body, '#rows' => 20, '#required' => TRUE);
+ $form['body_filter']['format'] = filter_form($node->format, 1);
return $form;
}
diff --git a/modules/node.module b/modules/node.module
index 1fdd1e7e5..02e404375 100644
--- a/modules/node.module
+++ b/modules/node.module
@@ -1066,7 +1066,6 @@ function theme_node_filters(&$form) {
}
$output .= '</dd>';
-
$output .= '</dl>';
$output .= '<div class="container-inline" id="node-admin-buttons">'. form_render($form['buttons']) .'</div>';
$output .= '</li></ul><br class="clear" />';
@@ -1074,7 +1073,6 @@ function theme_node_filters(&$form) {
return $output;
}
-
function node_filter_form_submit() {
global $form_values;
$op = $_POST['op'];
@@ -1171,7 +1169,6 @@ function node_admin_nodes() {
return $output;
}
-
function theme_node_admin_nodes($form) {
// Overview table:
$header = array(NULL, t('Title'), t('Type'), t('Author'), t('Status'), t('Operations'));
@@ -1221,7 +1218,6 @@ function node_multiple_delete_confirm() {
t('Delete all'), t('Cancel'));
}
-
function node_multiple_delete_confirm_submit($form_id, $edit) {
if ($edit['confirm']) {
foreach ($edit['nodes'] as $nid => $value) {
@@ -1568,7 +1564,6 @@ function node_validate($node) {
node_invoke_nodeapi($node, 'validate');
}
-
/**
* Validate the title of a node
*/
@@ -1665,7 +1660,6 @@ function node_form_array($node) {
$form['author']['name'] = array('#type' => 'textfield', '#title' => t('Authored by'), '#maxlength' => 60, '#autocomplete_path' => 'user/autocomplete', '#required' => TRUE, '#default_value' => $node->name ? $node->name : variable_get('anonymous', 'Anonymous'), '#weight' => -1);
$form['author']['date'] = array('#type' => 'textfield', '#title' => t('Authored on'), '#maxlength' => 25, '#required' => TRUE, '#default_value' => $node->date);
-
// Node options for administrators
$form['options'] = array('#type' => 'fieldset', '#title' => t('Publishing options'), '#collapsible' => TRUE, '#collapsed' => TRUE, '#weight' => 25);
$form['options']['status'] = array('#type' => 'checkbox', '#title' => t('Published'), '#default_value' => $node->status);
@@ -1980,7 +1974,6 @@ function node_revisions() {
drupal_not_found();
}
-
/**
* Generate a listing of promoted nodes.
*/
diff --git a/modules/node/node.module b/modules/node/node.module
index 1fdd1e7e5..02e404375 100644
--- a/modules/node/node.module
+++ b/modules/node/node.module
@@ -1066,7 +1066,6 @@ function theme_node_filters(&$form) {
}
$output .= '</dd>';
-
$output .= '</dl>';
$output .= '<div class="container-inline" id="node-admin-buttons">'. form_render($form['buttons']) .'</div>';
$output .= '</li></ul><br class="clear" />';
@@ -1074,7 +1073,6 @@ function theme_node_filters(&$form) {
return $output;
}
-
function node_filter_form_submit() {
global $form_values;
$op = $_POST['op'];
@@ -1171,7 +1169,6 @@ function node_admin_nodes() {
return $output;
}
-
function theme_node_admin_nodes($form) {
// Overview table:
$header = array(NULL, t('Title'), t('Type'), t('Author'), t('Status'), t('Operations'));
@@ -1221,7 +1218,6 @@ function node_multiple_delete_confirm() {
t('Delete all'), t('Cancel'));
}
-
function node_multiple_delete_confirm_submit($form_id, $edit) {
if ($edit['confirm']) {
foreach ($edit['nodes'] as $nid => $value) {
@@ -1568,7 +1564,6 @@ function node_validate($node) {
node_invoke_nodeapi($node, 'validate');
}
-
/**
* Validate the title of a node
*/
@@ -1665,7 +1660,6 @@ function node_form_array($node) {
$form['author']['name'] = array('#type' => 'textfield', '#title' => t('Authored by'), '#maxlength' => 60, '#autocomplete_path' => 'user/autocomplete', '#required' => TRUE, '#default_value' => $node->name ? $node->name : variable_get('anonymous', 'Anonymous'), '#weight' => -1);
$form['author']['date'] = array('#type' => 'textfield', '#title' => t('Authored on'), '#maxlength' => 25, '#required' => TRUE, '#default_value' => $node->date);
-
// Node options for administrators
$form['options'] = array('#type' => 'fieldset', '#title' => t('Publishing options'), '#collapsible' => TRUE, '#collapsed' => TRUE, '#weight' => 25);
$form['options']['status'] = array('#type' => 'checkbox', '#title' => t('Published'), '#default_value' => $node->status);
@@ -1980,7 +1974,6 @@ function node_revisions() {
drupal_not_found();
}
-
/**
* Generate a listing of promoted nodes.
*/
diff --git a/modules/page.module b/modules/page.module
index 5d3751e1b..22eebc1cb 100644
--- a/modules/page.module
+++ b/modules/page.module
@@ -93,10 +93,8 @@ function page_form(&$node) {
$form['title'] = array('#type' => 'textfield', '#title' => t('Title'), '#required' => TRUE, '#default_value' => $node->title, '#weight' => -5);
- $form['body'] = array(
- '#type' => 'textarea', '#title' => t('Body'), '#default_value' => $node->body, '#rows' => 20, '#required' => TRUE
- );
- $form['format'] = filter_form($node->format);
+ $form['body_filter']['body'] = array('#type' => 'textarea', '#title' => t('Body'), '#default_value' => $node->body, '#rows' => 20, '#required' => TRUE);
+ $form['body_filter']['format'] = filter_form($node->format, 1);
$form['log'] = array(
'#type' => 'textarea', '#title' => t('Log message'), '#default_value' => $node->log, '#weight' => 5,
diff --git a/modules/page/page.module b/modules/page/page.module
index 5d3751e1b..22eebc1cb 100644
--- a/modules/page/page.module
+++ b/modules/page/page.module
@@ -93,10 +93,8 @@ function page_form(&$node) {
$form['title'] = array('#type' => 'textfield', '#title' => t('Title'), '#required' => TRUE, '#default_value' => $node->title, '#weight' => -5);
- $form['body'] = array(
- '#type' => 'textarea', '#title' => t('Body'), '#default_value' => $node->body, '#rows' => 20, '#required' => TRUE
- );
- $form['format'] = filter_form($node->format);
+ $form['body_filter']['body'] = array('#type' => 'textarea', '#title' => t('Body'), '#default_value' => $node->body, '#rows' => 20, '#required' => TRUE);
+ $form['body_filter']['format'] = filter_form($node->format, 1);
$form['log'] = array(
'#type' => 'textarea', '#title' => t('Log message'), '#default_value' => $node->log, '#weight' => 5,
diff --git a/modules/story.module b/modules/story.module
index 12c4c7c7b..2f1887e62 100644
--- a/modules/story.module
+++ b/modules/story.module
@@ -86,8 +86,8 @@ function story_validate($node) {
*/
function story_form(&$node) {
$form['title'] = array('#type' => 'textfield', '#title' => t('Title'), '#required' => TRUE, '#default_value' => $node->title, '#weight' => -5);
- $form['body'] = array('#type' => 'textarea', '#title' => t('Body'), '#default_value' => $node->body, '#rows' => 20, '#required' => TRUE);
- $form['format'] = filter_form($node->format);
+ $form['body_filter']['body'] = array('#type' => 'textarea', '#title' => t('Body'), '#default_value' => $node->body, '#rows' => 20, '#required' => TRUE);
+ $form['body_filter']['format'] = filter_form($node->format, 1);
return $form;
}
diff --git a/modules/story/story.module b/modules/story/story.module
index 12c4c7c7b..2f1887e62 100644
--- a/modules/story/story.module
+++ b/modules/story/story.module
@@ -86,8 +86,8 @@ function story_validate($node) {
*/
function story_form(&$node) {
$form['title'] = array('#type' => 'textfield', '#title' => t('Title'), '#required' => TRUE, '#default_value' => $node->title, '#weight' => -5);
- $form['body'] = array('#type' => 'textarea', '#title' => t('Body'), '#default_value' => $node->body, '#rows' => 20, '#required' => TRUE);
- $form['format'] = filter_form($node->format);
+ $form['body_filter']['body'] = array('#type' => 'textarea', '#title' => t('Body'), '#default_value' => $node->body, '#rows' => 20, '#required' => TRUE);
+ $form['body_filter']['format'] = filter_form($node->format, 1);
return $form;
}