From 28fdb3975e2bc53061277f4fdb1147dc8d3ba128 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Mon, 5 Dec 2005 09:11:33 +0000 Subject: - Patch #39778 by chx: obliterate nodeapi op form in favor of the forms API's way of doing things. Tested with help from webchick. --- modules/block/block.module | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) (limited to 'modules/block') diff --git a/modules/block/block.module b/modules/block/block.module index c07b56851..d15f3ed4c 100644 --- a/modules/block/block.module +++ b/modules/block/block.module @@ -445,10 +445,32 @@ function block_box_delete_confirm_submit($form_id, $form_values) { function block_box_form($edit = array()) { - $form['title'] = array('#type' => 'textfield', '#title' => t('Block title'), '#default_value' => $edit['title'], '#maxlength' => 64, '#description' => t('The title of the block as shown to the user.')); + $form['title'] = array( + '#type' => 'textfield', + '#title' => t('Block title'), + '#default_value' => $edit['title'], + '#maxlength' => 64, + '#description' => t('The title of the block as shown to the user.'), + '#weight' => -18, + ); + $form['body'] = array( + '#type' => 'textarea', + '#title' => t('Block body'), + '#default_value' => $edit['body'], + '#rows' => 15, + '#description' => t('The content of the block as shown to the user.'), + '#weight' => -17, + ); $form['format'] = filter_form($edit['format']); - $form['body'] = array('#type' => 'textarea', '#title' => t('Block body'), '#default_value' => $edit['body'], '#rows' => 15, '#description' => t('The content of the block as shown to the user.')); - $form['info'] = array('#type' => 'textfield', '#title' => t('Block description'), '#default_value' => $edit['info'], '#maxlength' => 64, '#description' => t('A brief description of your block. Used on the block overview page.', array('%overview' => url('admin/block'))), '#required' => TRUE); + $form['info'] = array( + '#type' => 'textfield', + '#title' => t('Block description'), + '#default_value' => $edit['info'], + '#maxlength' => 64, + '#description' => t('A brief description of your block. Used on the block overview page.', array('%overview' => url('admin/block'))), + '#required' => TRUE, + '#weight' => -15, + ); return $form; } -- cgit v1.2.3