summaryrefslogtreecommitdiff
path: root/modules/block
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2005-08-07 15:30:03 +0000
committerDries Buytaert <dries@buytaert.net>2005-08-07 15:30:03 +0000
commit273d7f59b66b355d4398576721fa7cb91f5fa69b (patch)
treea65c43a858be13e887de5a536c4f016a832f2830 /modules/block
parent79f08aca2c29c9f2bf8fd7514b0eab20b8e90711 (diff)
downloadbrdo-273d7f59b66b355d4398576721fa7cb91f5fa69b.tar.gz
brdo-273d7f59b66b355d4398576721fa7cb91f5fa69b.tar.bz2
- Patch #27713 by tostinni: fixed two problems on the block add page:
+ description field isn't marked as requiered +when the field isn't unique, an error is displayed, but the wrong text field is set as erronous.
Diffstat (limited to 'modules/block')
-rw-r--r--modules/block/block.module4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/block/block.module b/modules/block/block.module
index 33867faea..5ab064d80 100644
--- a/modules/block/block.module
+++ b/modules/block/block.module
@@ -340,7 +340,7 @@ function block_box_form($edit = array()) {
$output = form_textfield(t('Block title'), 'title', $edit['title'], 60, 64, t('The title of the block as shown to the user.'));
$output .= filter_form('format', $edit['format']);
$output .= form_textarea(t('Block body'), 'body', $edit['body'], 60, 15, t('The content of the block as shown to the user.'));
- $output .= form_textfield(t('Block description'), 'info', $edit['info'], 60, 64, t('A brief description of your block. Used on the <a href="%overview">block overview page</a>.', array('%overview' => url('admin/block'))));
+ $output .= form_textfield(t('Block description'), 'info', $edit['info'], 60, 64, t('A brief description of your block. Used on the <a href="%overview">block overview page</a>.', array('%overview' => url('admin/block'))), NULL, TRUE);
return $output;
}
@@ -355,7 +355,7 @@ function block_box_save($edit, $delta = NULL) {
}
else {
if (empty($edit['info']) || db_num_rows(db_query("SELECT info FROM {boxes} WHERE info = '%s'", $edit['info']))) {
- form_set_error('title', t('Please ensure each block description is unique.'));
+ form_set_error('info', t('Please ensure that each block description is unique.'));
return false;
}
db_query("INSERT INTO {boxes} (title, body, info, format) VALUES ('%s', '%s', '%s', %d)", $edit['title'], $edit['body'], $edit['info'], $edit['format']);