summaryrefslogtreecommitdiff
path: root/modules/block
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2005-11-12 11:26:16 +0000
committerDries Buytaert <dries@buytaert.net>2005-11-12 11:26:16 +0000
commitaeed4cd8e4814bb0ed8ad06d581a95b82e2d718b (patch)
tree4a022207fea4b4d7a4a48a6ac20099c3b38e0629 /modules/block
parent64a617c208c02b6360d16d0960eebc67839d4dc8 (diff)
downloadbrdo-aeed4cd8e4814bb0ed8ad06d581a95b82e2d718b.tar.gz
brdo-aeed4cd8e4814bb0ed8ad06d581a95b82e2d718b.tar.bz2
- Patch #35644 by webchick: forms API simplificiations.
Diffstat (limited to 'modules/block')
-rw-r--r--modules/block/block.module13
1 files changed, 4 insertions, 9 deletions
diff --git a/modules/block/block.module b/modules/block/block.module
index 115a3f879..c8175d61a 100644
--- a/modules/block/block.module
+++ b/modules/block/block.module
@@ -334,7 +334,6 @@ function block_admin_configure($module = NULL, $delta = 0) {
$form['block_settings'] = array('#type' => 'fieldset',
'#title' => t('Block specific settings'),
'#collapsible' => true,
- '#collapsed' => false,
'#weight' => 0);
foreach ($settings as $k => $v) {
@@ -351,7 +350,6 @@ function block_admin_configure($module = NULL, $delta = 0) {
$form['user_vis_settings'] = array('#type' => 'fieldset',
'#title' => t('User specific visibility settings'),
'#collapsible' => true,
- '#collapsed' => false,
'#weight' => 0);
$form['user_vis_settings']['custom'] = array(
@@ -365,7 +363,6 @@ function block_admin_configure($module = NULL, $delta = 0) {
$form['page_vis_settings'] = array('#type' => 'fieldset',
'#title' => t('Page specific visibility settings'),
'#collapsible' => true,
- '#collapsed' => false,
'#weight' => 0);
@@ -380,8 +377,6 @@ function block_admin_configure($module = NULL, $delta = 0) {
'#type' => 'textarea',
'#title' => t('Pages'),
'#default_value' => $edit['pages'],
- '#cols' => 60,
- '#rows' => 5,
'#description' => t("Enter one page per line as Drupal paths. The '*' character is a wildcard. Example paths are '%blog' for the blog page and %blog1 for every personal blog. %front is the front page. If the PHP-mode is chosen, enter PHP code between %php. Note that executing incorrect PHP-code can break your Drupal site.", array('%blog' => theme('placeholder', 'blog'), '%blog1' => theme('placeholder', 'blog/*'), '%front' => theme('placeholder', '<front>'), '%php' => theme('placeholder', '<?php ?>'))));
$form['submit'] = array('#type' => 'submit', '#value' => t('Save block'));
@@ -436,10 +431,10 @@ function block_box_delete_confirm_execute($form_id, $edit) {
function block_box_form($edit = array()) {
- $form['title'] = array('#type' => 'textfield', '#title' => t('Block title'), '#default_value' => $edit['title'], '#size' => 60, '#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.'));
$form['format'] = filter_form($edit['format']);
- $form['body'] = array('#type' => 'textarea', '#title' => t('Block body'), '#default_value' => $edit['body'], '#cols' => 60, '#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'], '#size' => 60, '#maxlength' => 64, '#description' => t('A brief description of your block. Used on the <a href="%overview">block overview page</a>.', array('%overview' => url('admin/block'))), '#required' => TRUE);
+ $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 <a href="%overview">block overview page</a>.', array('%overview' => url('admin/block'))), '#required' => TRUE);
return $form;
}
@@ -489,7 +484,7 @@ function block_user($type, $edit, &$user, $category = NULL) {
case 'form':
if ($category == 'account') {
$result = db_query('SELECT * FROM {blocks} WHERE status = 1 AND custom != 0 ORDER BY weight, module, delta');
- $form['block'] = array('#type' => 'fieldset', '#title' => t('Block configuration'), '#weight' => 3, '#collapsible' => TRUE, '#collapsed' => FALSE, '#tree' => TRUE);
+ $form['block'] = array('#type' => 'fieldset', '#title' => t('Block configuration'), '#weight' => 3, '#collapsible' => TRUE, '#tree' => TRUE);
while ($block = db_fetch_object($result)) {
$data = module_invoke($block->module, 'block', 'list');
if ($data[$block->delta]['info']) {