From 58aee8cdad4baef160f7e0cf6dc5e245a1acc080 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Mon, 27 Jun 2005 18:33:33 +0000 Subject: - Patch #25603 by Stefan: made the sizes of forms consistent. TODO: document the defaults in the PHPdoc comments. --- modules/aggregator.module | 6 +++--- modules/aggregator/aggregator.module | 6 +++--- modules/block.module | 12 +++++------ modules/block/block.module | 12 +++++------ modules/book.module | 2 +- modules/book/book.module | 2 +- modules/comment.module | 40 ++++++++++++++++++------------------ modules/comment/comment.module | 40 ++++++++++++++++++------------------ modules/contact.module | 18 ++++++++-------- modules/contact/contact.module | 18 ++++++++-------- modules/drupal.module | 2 +- modules/drupal/drupal.module | 2 +- modules/filter.module | 6 +++--- modules/filter/filter.module | 6 +++--- modules/forum.module | 4 ++-- modules/forum/forum.module | 4 ++-- modules/node.module | 6 +++--- modules/node/node.module | 6 +++--- modules/path.module | 4 ++-- modules/path/path.module | 4 ++-- modules/poll.module | 4 ++-- modules/poll/poll.module | 4 ++-- modules/profile.module | 20 +++++++++--------- modules/profile/profile.module | 20 +++++++++--------- modules/search.module | 6 +++--- modules/search/search.module | 6 +++--- modules/system.module | 26 +++++++++++------------ modules/system/system.module | 26 +++++++++++------------ modules/taxonomy.module | 10 ++++----- modules/taxonomy/taxonomy.module | 10 ++++----- modules/upload.module | 4 ++-- modules/upload/upload.module | 4 ++-- modules/user.module | 38 +++++++++++++++++----------------- modules/user/user.module | 38 +++++++++++++++++----------------- 34 files changed, 208 insertions(+), 208 deletions(-) (limited to 'modules') diff --git a/modules/aggregator.module b/modules/aggregator.module index aeb1bd404..326c194bf 100644 --- a/modules/aggregator.module +++ b/modules/aggregator.module @@ -596,7 +596,7 @@ function aggregator_save_item($edit) { } function aggregator_form_category($edit = array()) { - $form = form_textfield(t('Title'), 'title', $edit['title'], 50, 64); + $form = form_textfield(t('Title'), 'title', $edit['title'], 60, 64); $form .= form_textarea(t('Description'), 'description', $edit['description'], 60, 5); $form .= form_submit(t('Submit')); @@ -629,8 +629,8 @@ function aggregator_form_feed($edit = array()) { $edit['refresh'] = 3600; } - $form .= form_textfield(t('Title'), 'title', $edit['title'], 50, 64, t('The name of the feed; typically the name of the web site you syndicate content from.')); - $form .= form_textfield(t('URL'), 'url', $edit['url'], 50, 255, t('The fully-qualified URL of the feed.')); + $form .= form_textfield(t('Title'), 'title', $edit['title'], 60, 64, t('The name of the feed; typically the name of the web site you syndicate content from.')); + $form .= form_textfield(t('URL'), 'url', $edit['url'], 60, 255, t('The fully-qualified URL of the feed.')); $form .= form_select(t('Update interval'), 'refresh', $edit['refresh'], $period, t('The refresh interval indicating how often you want to update this feed. Requires crontab.')); // Handling of categories: diff --git a/modules/aggregator/aggregator.module b/modules/aggregator/aggregator.module index aeb1bd404..326c194bf 100644 --- a/modules/aggregator/aggregator.module +++ b/modules/aggregator/aggregator.module @@ -596,7 +596,7 @@ function aggregator_save_item($edit) { } function aggregator_form_category($edit = array()) { - $form = form_textfield(t('Title'), 'title', $edit['title'], 50, 64); + $form = form_textfield(t('Title'), 'title', $edit['title'], 60, 64); $form .= form_textarea(t('Description'), 'description', $edit['description'], 60, 5); $form .= form_submit(t('Submit')); @@ -629,8 +629,8 @@ function aggregator_form_feed($edit = array()) { $edit['refresh'] = 3600; } - $form .= form_textfield(t('Title'), 'title', $edit['title'], 50, 64, t('The name of the feed; typically the name of the web site you syndicate content from.')); - $form .= form_textfield(t('URL'), 'url', $edit['url'], 50, 255, t('The fully-qualified URL of the feed.')); + $form .= form_textfield(t('Title'), 'title', $edit['title'], 60, 64, t('The name of the feed; typically the name of the web site you syndicate content from.')); + $form .= form_textfield(t('URL'), 'url', $edit['url'], 60, 255, t('The fully-qualified URL of the feed.')); $form .= form_select(t('Update interval'), 'refresh', $edit['refresh'], $period, t('The refresh interval indicating how often you want to update this feed. Requires crontab.')); // Handling of categories: diff --git a/modules/block.module b/modules/block.module index 76413beb7..75a69b2f6 100644 --- a/modules/block.module +++ b/modules/block.module @@ -275,9 +275,9 @@ function block_admin_configure($module = NULL, $delta = 0) { drupal_set_title(t("'%name' block", array('%name' => $info[$delta]['info']))); // Standard block configurations. - $group_1 = form_radios(t('Custom visibility settings'), 'custom', $edit['custom'], array(t('Users cannot control whether or not they see this block.'), t('Show this block by default, but let individual users hide it.'), t('Hide this block by default but let individual users show it.')), t('Allow individual users to customize the visibility of this block in their account settings.')); - $group_2 = form_radios(t('Show block on specific pages'), 'visibility', $edit['visibility'], array(t('Show on every page except the listed pages.'), t('Show on only the listed pages.'), t('Show if the following PHP code returns TRUE (PHP-mode, experts only).'))); - $group_2 .= form_textarea(t('Pages'), 'pages', $edit['pages'], 70, 5, 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', ''), '%php' => theme('placeholder', '')))); + $group_1 = form_radios(t('Custom visibility settings'), 'custom', $edit['custom'], array(t('Users cannot control whether or not they see this block.'), t('Show this block by default, but let individual users hide it.'), t('Hide this block by default but let individual users show it.')), t('Allow individual users to customize the visibility of this block in their account settings.')); + $group_2 = form_radios(t('Show block on specific pages'), 'visibility', $edit['visibility'], array(t('Show on every page except the listed pages.'), t('Show on only the listed pages.'), t('Show if the following PHP code returns TRUE (PHP-mode, experts only).'))); + $group_2 .= form_textarea(t('Pages'), 'pages', $edit['pages'], 60, 5, 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', ''), '%php' => theme('placeholder', '')))); $form .= form_group(t('User specific visibility settings'), $group_1); $form .= form_group(t('Page specific visibility settings'), $group_2); @@ -337,10 +337,10 @@ function block_box_delete($bid = 0) { } function block_box_form($edit = array()) { - $output = form_textfield(t('Block title'), 'title', $edit['title'], 50, 64, t('The title of the block as shown to the user.')); + $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'], 70, 10, t('The content of the block as shown to the user.')); - $output .= form_textfield(t('Block description'), 'info', $edit['info'], 50, 64, t('A brief description of your block. Used on the block overview page.', array('%overview' => url('admin/block')))); + $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 block overview page.', array('%overview' => url('admin/block')))); return $output; } diff --git a/modules/block/block.module b/modules/block/block.module index 76413beb7..75a69b2f6 100644 --- a/modules/block/block.module +++ b/modules/block/block.module @@ -275,9 +275,9 @@ function block_admin_configure($module = NULL, $delta = 0) { drupal_set_title(t("'%name' block", array('%name' => $info[$delta]['info']))); // Standard block configurations. - $group_1 = form_radios(t('Custom visibility settings'), 'custom', $edit['custom'], array(t('Users cannot control whether or not they see this block.'), t('Show this block by default, but let individual users hide it.'), t('Hide this block by default but let individual users show it.')), t('Allow individual users to customize the visibility of this block in their account settings.')); - $group_2 = form_radios(t('Show block on specific pages'), 'visibility', $edit['visibility'], array(t('Show on every page except the listed pages.'), t('Show on only the listed pages.'), t('Show if the following PHP code returns TRUE (PHP-mode, experts only).'))); - $group_2 .= form_textarea(t('Pages'), 'pages', $edit['pages'], 70, 5, 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', ''), '%php' => theme('placeholder', '')))); + $group_1 = form_radios(t('Custom visibility settings'), 'custom', $edit['custom'], array(t('Users cannot control whether or not they see this block.'), t('Show this block by default, but let individual users hide it.'), t('Hide this block by default but let individual users show it.')), t('Allow individual users to customize the visibility of this block in their account settings.')); + $group_2 = form_radios(t('Show block on specific pages'), 'visibility', $edit['visibility'], array(t('Show on every page except the listed pages.'), t('Show on only the listed pages.'), t('Show if the following PHP code returns TRUE (PHP-mode, experts only).'))); + $group_2 .= form_textarea(t('Pages'), 'pages', $edit['pages'], 60, 5, 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', ''), '%php' => theme('placeholder', '')))); $form .= form_group(t('User specific visibility settings'), $group_1); $form .= form_group(t('Page specific visibility settings'), $group_2); @@ -337,10 +337,10 @@ function block_box_delete($bid = 0) { } function block_box_form($edit = array()) { - $output = form_textfield(t('Block title'), 'title', $edit['title'], 50, 64, t('The title of the block as shown to the user.')); + $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'], 70, 10, t('The content of the block as shown to the user.')); - $output .= form_textfield(t('Block description'), 'info', $edit['info'], 50, 64, t('A brief description of your block. Used on the block overview page.', array('%overview' => url('admin/block')))); + $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 block overview page.', array('%overview' => url('admin/block')))); return $output; } diff --git a/modules/book.module b/modules/book.module index 25fd86c90..094844d93 100644 --- a/modules/book.module +++ b/modules/book.module @@ -960,7 +960,7 @@ function book_node_visitor_opml_post($node, $depth) { * Creates a row for the 'admin' view of a book. Each row represents a page in the book, in the tree representing the book */ function book_admin_edit_line($node, $depth = 0) { - return array('
'. form_textfield(NULL, $node->nid .'][title', $node->title, 64, 255) .'
', form_weight(NULL, $node->nid .'][weight', $node->weight, 15), l(t('view'), 'node/'. $node->nid), l(t('edit'), 'node/'. $node->nid .'/edit'), l(t('delete'), 'node/'.$node->nid.'/delete')); + return array('
'. form_textfield(NULL, $node->nid .'][title', $node->title, 60, 255) .'
', form_weight(NULL, $node->nid .'][weight', $node->weight, 15), l(t('view'), 'node/'. $node->nid), l(t('edit'), 'node/'. $node->nid .'/edit'), l(t('delete'), 'node/'.$node->nid.'/delete')); } function book_admin_edit_book($nid, $depth = 1) { diff --git a/modules/book/book.module b/modules/book/book.module index 25fd86c90..094844d93 100644 --- a/modules/book/book.module +++ b/modules/book/book.module @@ -960,7 +960,7 @@ function book_node_visitor_opml_post($node, $depth) { * Creates a row for the 'admin' view of a book. Each row represents a page in the book, in the tree representing the book */ function book_admin_edit_line($node, $depth = 0) { - return array('
'. form_textfield(NULL, $node->nid .'][title', $node->title, 64, 255) .'
', form_weight(NULL, $node->nid .'][weight', $node->weight, 15), l(t('view'), 'node/'. $node->nid), l(t('edit'), 'node/'. $node->nid .'/edit'), l(t('delete'), 'node/'.$node->nid.'/delete')); + return array('
'. form_textfield(NULL, $node->nid .'][title', $node->title, 60, 255) .'
', form_weight(NULL, $node->nid .'][weight', $node->weight, 15), l(t('view'), 'node/'. $node->nid), l(t('edit'), 'node/'. $node->nid .'/edit'), l(t('delete'), 'node/'.$node->nid.'/delete')); } function book_admin_edit_book($nid, $depth = 1) { diff --git a/modules/comment.module b/modules/comment.module index 5dd688cf8..0bcb91448 100644 --- a/modules/comment.module +++ b/modules/comment.module @@ -298,7 +298,7 @@ function comment_nodeapi(&$node, $op, $arg = 0) { function comment_user($type, $edit, &$user, $category = NULL) { if ($type == 'form' && $category == 'account') { // when user tries to edit his own data - return array(array('title' => t('Comment settings'), 'data' => form_textarea(t('Signature'), 'signature', $edit['signature'], 64, 3, t('Your signature will be publicly displayed at the end of your comments.')), 'weight' => 2)); + return array(array('title' => t('Comment settings'), 'data' => form_textarea(t('Signature'), 'signature', $edit['signature'], 60, 5, t('Your signature will be publicly displayed at the end of your comments.')), 'weight' => 2)); } if ($type == 'validate') { // validate user data editing @@ -931,16 +931,16 @@ function comment_admin_edit($cid) { if ($comment) { if (!$comment->uid) { // If comment from non-registered user, allow admin to modify anonymous fields. - $form .= form_textfield(t('Name'), 'name', $comment->name ? $comment->name : variable_get('anonymous', 'Anonymous') , 20, 60); - $form .= form_textfield(t('E-mail'), 'mail', $comment->mail, 20, 64); - $form .= form_textfield(t('Homepage'), 'homepage', $comment->homepage, 20, 255); + $form .= form_textfield(t('Name'), 'name', $comment->name ? $comment->name : variable_get('anonymous', 'Anonymous'), 60, 60); + $form .= form_textfield(t('E-mail'), 'mail', $comment->mail, 60, 64); + $form .= form_textfield(t('Homepage'), 'homepage', $comment->homepage, 60, 255); } else { // Otherwise, just display the author's name. $form .= form_item(t('Author'), format_name($comment)); } - $form .= form_textfield(t('Subject'), 'subject', $comment->subject, 70, 128); - $form .= form_textarea(t('Comment'), 'comment', $comment->comment, 70, 15, ''); + $form .= form_textfield(t('Subject'), 'subject', $comment->subject, 60, 128); + $form .= form_textarea(t('Comment'), 'comment', $comment->comment, 60, 15, ''); $form .= filter_form('format', $comment->format); $form .= form_radios(t('Status'), 'status', $comment->status, array(t('Published'), t('Not published'))); $form .= form_hidden('nid', $comment->nid); @@ -1081,7 +1081,7 @@ function comment_matrix_settings() { while ($vote = db_fetch_object($result)) { $row = array($vote->vote); foreach (array_keys($role_names) as $rid) { - $row[] = array('data' => form_textfield(NULL, "$rid][$vote->mid", $mod_roles[$rid][$vote->mid], 4, 3)); + $row[] = array('data' => form_textfield(NULL, "$rid][$vote->mid", $mod_roles[$rid][$vote->mid], 15, 3)); } $rows[] = $row; } @@ -1116,7 +1116,7 @@ function comment_role_settings() { $header = array(t('User role'), t('Initial score')); while ($role = db_fetch_object($result)) { - $rows[] = array($role->name, array('data' => form_textfield(NULL, $role->rid, $start_values[$role->rid], 4, 3), 'align' => 'center')); + $rows[] = array($role->name, array('data' => form_textfield(NULL, $role->rid, $start_values[$role->rid], 15, 3), 'align' => 'center')); } $output .= theme('table', $header, $rows); @@ -1167,8 +1167,8 @@ function comment_vote_settings($mid = 0) { } $output .= '

'. (isset($mid) ? t('Edit moderation option') : t('Add new moderation option')) .'

'; - $form .= form_textfield(t('Vote'), 'vote', $vote->vote, 32, 64, t('The name of this vote. Example: "off topic", "excellent", "sucky".')); - $form .= form_textfield(t('Weight'), 'weight', $vote->weight, 32, 64, t('Used to order votes in the comment control box; heavier sink.')); + $form .= form_textfield(t('Vote'), 'vote', $vote->vote, 30, 64, t('The name of this vote. Example: "off topic", "excellent", "sucky".')); + $form .= form_textfield(t('Weight'), 'weight', $vote->weight, 30, 64, t('Used to order votes in the comment control box; heavier sink.')); if ($mid) { $form .= form_submit(t('Save vote')); $form .= form_submit(t('Delete vote')); @@ -1221,8 +1221,8 @@ function comment_threshold_settings($fid = 0) { } $output .= '

'. (isset($fid) ? t('Edit threshold') : t('Add new threshold')) .'

'; - $form .= form_textfield(t('Threshold name'), 'filter', $filter->filter, 32, 64, t('The name of this threshold. Example: "good comments", "+1 comments", "everything".')); - $form .= form_textfield(t('Minimum score'), 'minimum', $filter->minimum, 32, 64, t('Show all comments whose score is larger or equal to the provided minimal score. Range: -127 +128')); + $form .= form_textfield(t('Threshold name'), 'filter', $filter->filter, 30, 64, t('The name of this threshold. Example: "good comments", "+1 comments", "everything".')); + $form .= form_textfield(t('Minimum score'), 'minimum', $filter->minimum, 30, 64, t('Show all comments whose score is larger or equal to the provided minimal score. Range: -127 +128')); if ($fid) { $form .= form_submit(t('Save threshold')); $form .= form_submit(t('Delete threshold')); @@ -1390,23 +1390,23 @@ function theme_comment_form($edit, $title) { $form .= form_item(t('Your name'), format_name($user)); } else if (variable_get('comment_anonymous', 0) == 1) { - $form .= form_textfield(t('Your name'), 'name', $edit['name'] ? $edit['name'] : variable_get('anonymous', 'Anonymous') , 20, 60); - $form .= form_textfield(t('E-mail'), 'mail', $edit['mail'], 20, 64, t('The content of this field is kept private and will not be shown publicly.')); - $form .= form_textfield(t('Homepage'), 'homepage', $edit['homepage'], 20, 255); + $form .= form_textfield(t('Your name'), 'name', $edit['name'] ? $edit['name'] : variable_get('anonymous', 'Anonymous') , 30, 60); + $form .= form_textfield(t('E-mail'), 'mail', $edit['mail'], 30, 64, t('The content of this field is kept private and will not be shown publicly.')); + $form .= form_textfield(t('Homepage'), 'homepage', $edit['homepage'], 30, 255); } else if (variable_get('comment_anonymous', 0) == 2) { - $form .= form_textfield(t('Your name'), 'name', $edit['name'] ? $edit['name'] : variable_get('anonymous', 'Anonymous') , 20, 60, NULL, NULL, TRUE); - $form .= form_textfield(t('E-mail'), 'mail', $edit['mail'], 20, 64, t('The content of this field is kept private and will not be shown publicly.'), NULL, TRUE); - $form .= form_textfield(t('Homepage'), 'homepage', $edit['homepage'], 20, 255); + $form .= form_textfield(t('Your name'), 'name', $edit['name'] ? $edit['name'] : variable_get('anonymous', 'Anonymous') , 30, 60, NULL, NULL, TRUE); + $form .= form_textfield(t('E-mail'), 'mail', $edit['mail'], 30, 64, t('The content of this field is kept private and will not be shown publicly.'), NULL, TRUE); + $form .= form_textfield(t('Homepage'), 'homepage', $edit['homepage'], 30, 255); } // subject field: if (variable_get('comment_subject_field', 1)) { - $form .= form_textfield(t('Subject'), 'subject', $edit['subject'], 50, 64); + $form .= form_textfield(t('Subject'), 'subject', $edit['subject'], 60, 64); } // comment field: - $form .= form_textarea(t('Comment'), 'comment', $edit['comment'] ? $edit['comment'] : $user->signature, 70, 10, '', NULL, TRUE); + $form .= form_textarea(t('Comment'), 'comment', $edit['comment'] ? $edit['comment'] : $user->signature, 60, 15, '', NULL, TRUE); // format selector $form .= filter_form('format', $edit['format']); diff --git a/modules/comment/comment.module b/modules/comment/comment.module index 5dd688cf8..0bcb91448 100644 --- a/modules/comment/comment.module +++ b/modules/comment/comment.module @@ -298,7 +298,7 @@ function comment_nodeapi(&$node, $op, $arg = 0) { function comment_user($type, $edit, &$user, $category = NULL) { if ($type == 'form' && $category == 'account') { // when user tries to edit his own data - return array(array('title' => t('Comment settings'), 'data' => form_textarea(t('Signature'), 'signature', $edit['signature'], 64, 3, t('Your signature will be publicly displayed at the end of your comments.')), 'weight' => 2)); + return array(array('title' => t('Comment settings'), 'data' => form_textarea(t('Signature'), 'signature', $edit['signature'], 60, 5, t('Your signature will be publicly displayed at the end of your comments.')), 'weight' => 2)); } if ($type == 'validate') { // validate user data editing @@ -931,16 +931,16 @@ function comment_admin_edit($cid) { if ($comment) { if (!$comment->uid) { // If comment from non-registered user, allow admin to modify anonymous fields. - $form .= form_textfield(t('Name'), 'name', $comment->name ? $comment->name : variable_get('anonymous', 'Anonymous') , 20, 60); - $form .= form_textfield(t('E-mail'), 'mail', $comment->mail, 20, 64); - $form .= form_textfield(t('Homepage'), 'homepage', $comment->homepage, 20, 255); + $form .= form_textfield(t('Name'), 'name', $comment->name ? $comment->name : variable_get('anonymous', 'Anonymous'), 60, 60); + $form .= form_textfield(t('E-mail'), 'mail', $comment->mail, 60, 64); + $form .= form_textfield(t('Homepage'), 'homepage', $comment->homepage, 60, 255); } else { // Otherwise, just display the author's name. $form .= form_item(t('Author'), format_name($comment)); } - $form .= form_textfield(t('Subject'), 'subject', $comment->subject, 70, 128); - $form .= form_textarea(t('Comment'), 'comment', $comment->comment, 70, 15, ''); + $form .= form_textfield(t('Subject'), 'subject', $comment->subject, 60, 128); + $form .= form_textarea(t('Comment'), 'comment', $comment->comment, 60, 15, ''); $form .= filter_form('format', $comment->format); $form .= form_radios(t('Status'), 'status', $comment->status, array(t('Published'), t('Not published'))); $form .= form_hidden('nid', $comment->nid); @@ -1081,7 +1081,7 @@ function comment_matrix_settings() { while ($vote = db_fetch_object($result)) { $row = array($vote->vote); foreach (array_keys($role_names) as $rid) { - $row[] = array('data' => form_textfield(NULL, "$rid][$vote->mid", $mod_roles[$rid][$vote->mid], 4, 3)); + $row[] = array('data' => form_textfield(NULL, "$rid][$vote->mid", $mod_roles[$rid][$vote->mid], 15, 3)); } $rows[] = $row; } @@ -1116,7 +1116,7 @@ function comment_role_settings() { $header = array(t('User role'), t('Initial score')); while ($role = db_fetch_object($result)) { - $rows[] = array($role->name, array('data' => form_textfield(NULL, $role->rid, $start_values[$role->rid], 4, 3), 'align' => 'center')); + $rows[] = array($role->name, array('data' => form_textfield(NULL, $role->rid, $start_values[$role->rid], 15, 3), 'align' => 'center')); } $output .= theme('table', $header, $rows); @@ -1167,8 +1167,8 @@ function comment_vote_settings($mid = 0) { } $output .= '

'. (isset($mid) ? t('Edit moderation option') : t('Add new moderation option')) .'

'; - $form .= form_textfield(t('Vote'), 'vote', $vote->vote, 32, 64, t('The name of this vote. Example: "off topic", "excellent", "sucky".')); - $form .= form_textfield(t('Weight'), 'weight', $vote->weight, 32, 64, t('Used to order votes in the comment control box; heavier sink.')); + $form .= form_textfield(t('Vote'), 'vote', $vote->vote, 30, 64, t('The name of this vote. Example: "off topic", "excellent", "sucky".')); + $form .= form_textfield(t('Weight'), 'weight', $vote->weight, 30, 64, t('Used to order votes in the comment control box; heavier sink.')); if ($mid) { $form .= form_submit(t('Save vote')); $form .= form_submit(t('Delete vote')); @@ -1221,8 +1221,8 @@ function comment_threshold_settings($fid = 0) { } $output .= '

'. (isset($fid) ? t('Edit threshold') : t('Add new threshold')) .'

'; - $form .= form_textfield(t('Threshold name'), 'filter', $filter->filter, 32, 64, t('The name of this threshold. Example: "good comments", "+1 comments", "everything".')); - $form .= form_textfield(t('Minimum score'), 'minimum', $filter->minimum, 32, 64, t('Show all comments whose score is larger or equal to the provided minimal score. Range: -127 +128')); + $form .= form_textfield(t('Threshold name'), 'filter', $filter->filter, 30, 64, t('The name of this threshold. Example: "good comments", "+1 comments", "everything".')); + $form .= form_textfield(t('Minimum score'), 'minimum', $filter->minimum, 30, 64, t('Show all comments whose score is larger or equal to the provided minimal score. Range: -127 +128')); if ($fid) { $form .= form_submit(t('Save threshold')); $form .= form_submit(t('Delete threshold')); @@ -1390,23 +1390,23 @@ function theme_comment_form($edit, $title) { $form .= form_item(t('Your name'), format_name($user)); } else if (variable_get('comment_anonymous', 0) == 1) { - $form .= form_textfield(t('Your name'), 'name', $edit['name'] ? $edit['name'] : variable_get('anonymous', 'Anonymous') , 20, 60); - $form .= form_textfield(t('E-mail'), 'mail', $edit['mail'], 20, 64, t('The content of this field is kept private and will not be shown publicly.')); - $form .= form_textfield(t('Homepage'), 'homepage', $edit['homepage'], 20, 255); + $form .= form_textfield(t('Your name'), 'name', $edit['name'] ? $edit['name'] : variable_get('anonymous', 'Anonymous') , 30, 60); + $form .= form_textfield(t('E-mail'), 'mail', $edit['mail'], 30, 64, t('The content of this field is kept private and will not be shown publicly.')); + $form .= form_textfield(t('Homepage'), 'homepage', $edit['homepage'], 30, 255); } else if (variable_get('comment_anonymous', 0) == 2) { - $form .= form_textfield(t('Your name'), 'name', $edit['name'] ? $edit['name'] : variable_get('anonymous', 'Anonymous') , 20, 60, NULL, NULL, TRUE); - $form .= form_textfield(t('E-mail'), 'mail', $edit['mail'], 20, 64, t('The content of this field is kept private and will not be shown publicly.'), NULL, TRUE); - $form .= form_textfield(t('Homepage'), 'homepage', $edit['homepage'], 20, 255); + $form .= form_textfield(t('Your name'), 'name', $edit['name'] ? $edit['name'] : variable_get('anonymous', 'Anonymous') , 30, 60, NULL, NULL, TRUE); + $form .= form_textfield(t('E-mail'), 'mail', $edit['mail'], 30, 64, t('The content of this field is kept private and will not be shown publicly.'), NULL, TRUE); + $form .= form_textfield(t('Homepage'), 'homepage', $edit['homepage'], 30, 255); } // subject field: if (variable_get('comment_subject_field', 1)) { - $form .= form_textfield(t('Subject'), 'subject', $edit['subject'], 50, 64); + $form .= form_textfield(t('Subject'), 'subject', $edit['subject'], 60, 64); } // comment field: - $form .= form_textarea(t('Comment'), 'comment', $edit['comment'] ? $edit['comment'] : $user->signature, 70, 10, '', NULL, TRUE); + $form .= form_textarea(t('Comment'), 'comment', $edit['comment'] ? $edit['comment'] : $user->signature, 60, 15, '', NULL, TRUE); // format selector $form .= filter_form('format', $edit['format']); diff --git a/modules/contact.module b/modules/contact.module index 1c0b100a8..a65d379b3 100644 --- a/modules/contact.module +++ b/modules/contact.module @@ -58,7 +58,7 @@ function contact_menu($may_cache) { * Implementation of hook_settings(). */ function contact_settings() { - $output = form_textarea(t('Additional information'), 'contact_form_information', variable_get('contact_form_information', t('You can leave us a message using the contact form below.')), 70, 8, t('Information to show on the contact page. Can be anything from submission guidelines to your postal address or telephone number.', array('%form' => url('contact')))); + $output = form_textarea(t('Additional information'), 'contact_form_information', variable_get('contact_form_information', t('You can leave us a message using the contact form below.')), 60, 5, t('Information to show on the contact page. Can be anything from submission guidelines to your postal address or telephone number.', array('%form' => url('contact')))); return $output; } @@ -147,8 +147,8 @@ function contact_mail_user() { $output = form_item(t('From'), $user->name .' <'. $user->mail .'>'); $output .= form_item(t('To'), $account->name); - $output .= form_textfield(t('Subject'), 'subject', $edit['subject'], 50, 50, NULL, NULL, TRUE); - $output .= form_textarea(t('Message'), 'message', $edit['message'], 70, 8, NULL, NULL, TRUE); + $output .= form_textfield(t('Subject'), 'subject', $edit['subject'], 60, 50, NULL, NULL, TRUE); + $output .= form_textarea(t('Message'), 'message', $edit['message'], 60, 15, NULL, NULL, TRUE); $output .= form_submit(t('Send e-mail')); $output = form($output); } @@ -181,9 +181,9 @@ function contact_admin_edit($subject = NULL) { $subject = db_fetch_object(db_query("SELECT * FROM {contact} WHERE subject = '%s'", $subject)); - $form = form_textfield(t('Subject'), 'subject', $subject->subject, 50, 255, t("Example: 'website feedback' or 'product information'."), NULL, TRUE); - $form .= form_textarea(t('Recipients'), 'recipients', $subject->recipients, 50, 4, t("Example: 'webmaster@yoursite.com' or 'sales@yoursite.com'. To specify multiple repecients, separate each e-mail address with a comma."), NULL, TRUE); - $form .= form_textarea(t('Auto-reply'), 'reply', $subject->reply, 50, 10, t("Optional auto-reply. Leave empty if you don't want to send the user an auto-reply message.")); + $form = form_textfield(t('Subject'), 'subject', $subject->subject, 60, 255, t("Example: 'website feedback' or 'product information'."), NULL, TRUE); + $form .= form_textarea(t('Recipients'), 'recipients', $subject->recipients, 60, 5, t("Example: 'webmaster@yoursite.com' or 'sales@yoursite.com'. To specify multiple repecients, separate each e-mail address with a comma."), NULL, TRUE); + $form .= form_textarea(t('Auto-reply'), 'reply', $subject->reply, 60, 5, t("Optional auto-reply. Leave empty if you don't want to send the user an auto-reply message.")); $form .= form_submit(t('Submit')); return form($form); @@ -295,10 +295,10 @@ function contact_mail_page() { if ($subjects) { $output = variable_get('contact_form_information', t('You can leave us a message using the contact form below.')); - $output .= form_textfield(t('Name'), 'name', $edit['name'], 50, 255, NULL, NULL, TRUE); - $output .= form_textfield(t('E-mail'), 'mail', $edit['mail'], 50, 255, NULL, NULL, TRUE); + $output .= form_textfield(t('Name'), 'name', $edit['name'], 60, 255, NULL, NULL, TRUE); + $output .= form_textfield(t('E-mail'), 'mail', $edit['mail'], 60, 255, NULL, NULL, TRUE); $output .= form_select(t('Subject'), 'subject', $edit['subject'], $subjects, NULL, NULL, NULL, TRUE); - $output .= form_textarea(t('Message'), 'message', $edit['message'], 70, 8, NULL, NULL, TRUE); + $output .= form_textarea(t('Message'), 'message', $edit['message'], 60, 5, NULL, NULL, TRUE); $output .= form_submit(t('Send e-mail')); $output = form($output); } diff --git a/modules/contact/contact.module b/modules/contact/contact.module index 1c0b100a8..a65d379b3 100644 --- a/modules/contact/contact.module +++ b/modules/contact/contact.module @@ -58,7 +58,7 @@ function contact_menu($may_cache) { * Implementation of hook_settings(). */ function contact_settings() { - $output = form_textarea(t('Additional information'), 'contact_form_information', variable_get('contact_form_information', t('You can leave us a message using the contact form below.')), 70, 8, t('Information to show on the contact page. Can be anything from submission guidelines to your postal address or telephone number.', array('%form' => url('contact')))); + $output = form_textarea(t('Additional information'), 'contact_form_information', variable_get('contact_form_information', t('You can leave us a message using the contact form below.')), 60, 5, t('Information to show on the contact page. Can be anything from submission guidelines to your postal address or telephone number.', array('%form' => url('contact')))); return $output; } @@ -147,8 +147,8 @@ function contact_mail_user() { $output = form_item(t('From'), $user->name .' <'. $user->mail .'>'); $output .= form_item(t('To'), $account->name); - $output .= form_textfield(t('Subject'), 'subject', $edit['subject'], 50, 50, NULL, NULL, TRUE); - $output .= form_textarea(t('Message'), 'message', $edit['message'], 70, 8, NULL, NULL, TRUE); + $output .= form_textfield(t('Subject'), 'subject', $edit['subject'], 60, 50, NULL, NULL, TRUE); + $output .= form_textarea(t('Message'), 'message', $edit['message'], 60, 15, NULL, NULL, TRUE); $output .= form_submit(t('Send e-mail')); $output = form($output); } @@ -181,9 +181,9 @@ function contact_admin_edit($subject = NULL) { $subject = db_fetch_object(db_query("SELECT * FROM {contact} WHERE subject = '%s'", $subject)); - $form = form_textfield(t('Subject'), 'subject', $subject->subject, 50, 255, t("Example: 'website feedback' or 'product information'."), NULL, TRUE); - $form .= form_textarea(t('Recipients'), 'recipients', $subject->recipients, 50, 4, t("Example: 'webmaster@yoursite.com' or 'sales@yoursite.com'. To specify multiple repecients, separate each e-mail address with a comma."), NULL, TRUE); - $form .= form_textarea(t('Auto-reply'), 'reply', $subject->reply, 50, 10, t("Optional auto-reply. Leave empty if you don't want to send the user an auto-reply message.")); + $form = form_textfield(t('Subject'), 'subject', $subject->subject, 60, 255, t("Example: 'website feedback' or 'product information'."), NULL, TRUE); + $form .= form_textarea(t('Recipients'), 'recipients', $subject->recipients, 60, 5, t("Example: 'webmaster@yoursite.com' or 'sales@yoursite.com'. To specify multiple repecients, separate each e-mail address with a comma."), NULL, TRUE); + $form .= form_textarea(t('Auto-reply'), 'reply', $subject->reply, 60, 5, t("Optional auto-reply. Leave empty if you don't want to send the user an auto-reply message.")); $form .= form_submit(t('Submit')); return form($form); @@ -295,10 +295,10 @@ function contact_mail_page() { if ($subjects) { $output = variable_get('contact_form_information', t('You can leave us a message using the contact form below.')); - $output .= form_textfield(t('Name'), 'name', $edit['name'], 50, 255, NULL, NULL, TRUE); - $output .= form_textfield(t('E-mail'), 'mail', $edit['mail'], 50, 255, NULL, NULL, TRUE); + $output .= form_textfield(t('Name'), 'name', $edit['name'], 60, 255, NULL, NULL, TRUE); + $output .= form_textfield(t('E-mail'), 'mail', $edit['mail'], 60, 255, NULL, NULL, TRUE); $output .= form_select(t('Subject'), 'subject', $edit['subject'], $subjects, NULL, NULL, NULL, TRUE); - $output .= form_textarea(t('Message'), 'message', $edit['message'], 70, 8, NULL, NULL, TRUE); + $output .= form_textarea(t('Message'), 'message', $edit['message'], 60, 5, NULL, NULL, TRUE); $output .= form_submit(t('Send e-mail')); $output = form($output); } diff --git a/modules/drupal.module b/modules/drupal.module index 143ee798a..9fd12624b 100644 --- a/modules/drupal.module +++ b/modules/drupal.module @@ -42,7 +42,7 @@ function drupal_settings() { else if (variable_get('site_mission', '') == '') form_set_error('drupal_directory', t('You must set your site mission on the administer » settings page.' , array('%url' => url('admin/settings')))); - $output = form_textfield(t('Drupal XML-RPC server'), 'drupal_server', variable_get('drupal_server', 'http://www.drupal.org/xmlrpc.php'), 55, 128, t('The URL of your root Drupal XML-RPC server.')); + $output = form_textfield(t('Drupal XML-RPC server'), 'drupal_server', variable_get('drupal_server', 'http://www.drupal.org/xmlrpc.php'), 60, 128, t('The URL of your root Drupal XML-RPC server.')); $output .= form_radios(t('Drupal directory'), 'drupal_directory', variable_get('drupal_directory', 0), array(t('Disabled'), t('Enabled')), t("If enabled, your Drupal site will make itself known to the Drupal directory at the specified Drupal XML-RPC server. For this to work properly, you must set your site's name, e-mail address, slogan and mission statement. When the \"Drupal XML-RPC server\" field is set to \"%drupal-xml-rpc\", your web site will get listed on the Drupal sites page. Requires the cron feature to be enabled.", array("%drupal-xml-rpc" => "http://www.drupal.org/xmlrpc.php", "%drupal-sites" => "http://www.drupal.org/drupal-sites/"))); return $output; diff --git a/modules/drupal/drupal.module b/modules/drupal/drupal.module index 143ee798a..9fd12624b 100644 --- a/modules/drupal/drupal.module +++ b/modules/drupal/drupal.module @@ -42,7 +42,7 @@ function drupal_settings() { else if (variable_get('site_mission', '') == '') form_set_error('drupal_directory', t('You must set your site mission on the administer » settings page.' , array('%url' => url('admin/settings')))); - $output = form_textfield(t('Drupal XML-RPC server'), 'drupal_server', variable_get('drupal_server', 'http://www.drupal.org/xmlrpc.php'), 55, 128, t('The URL of your root Drupal XML-RPC server.')); + $output = form_textfield(t('Drupal XML-RPC server'), 'drupal_server', variable_get('drupal_server', 'http://www.drupal.org/xmlrpc.php'), 60, 128, t('The URL of your root Drupal XML-RPC server.')); $output .= form_radios(t('Drupal directory'), 'drupal_directory', variable_get('drupal_directory', 0), array(t('Disabled'), t('Enabled')), t("If enabled, your Drupal site will make itself known to the Drupal directory at the specified Drupal XML-RPC server. For this to work properly, you must set your site's name, e-mail address, slogan and mission statement. When the \"Drupal XML-RPC server\" field is set to \"%drupal-xml-rpc\", your web site will get listed on the Drupal sites page. Requires the cron feature to be enabled.", array("%drupal-xml-rpc" => "http://www.drupal.org/xmlrpc.php", "%drupal-sites" => "http://www.drupal.org/drupal-sites/"))); return $output; diff --git a/modules/filter.module b/modules/filter.module index 1bb275efd..80b9edcef 100644 --- a/modules/filter.module +++ b/modules/filter.module @@ -285,7 +285,7 @@ function filter_admin_overview() { $row = array(); $default = ($id == variable_get('filter_default_format', 1)); - $row[] = form_textfield('', "name][$id", $format->name, 16, 255); + $row[] = form_textfield('', "name][$id", $format->name, 15, 255); $row[] = form_radio('', 'default', $id, $default); foreach ($roles as $rid => $name) { @@ -305,7 +305,7 @@ function filter_admin_overview() { // Form to add a new format. $group = t("

To add a new input format, type its name here. After it has been added, you can configure its options.

"); - $form = form_textfield(t('Name'), 'name', '', 40, 255); + $form = form_textfield(t('Name'), 'name', '', 30, 255); $form .= form_submit(t('Add input format')); $group .= form($form); $output .= '

'. t('Add new input format') .'

'. $group; @@ -904,7 +904,7 @@ function filter_filter($op, $delta = 0, $format = -1, $text = '') { */ function _filter_html_settings($format) { $group = form_radios(t('Filter HTML tags'), "filter_html_$format", variable_get("filter_html_$format", FILTER_HTML_STRIP), array(FILTER_HTML_STRIP => t('Strip tags'), FILTER_HTML_ESCAPE => t('Escape tags')), t('How to deal with HTML tags in user-contributed content. If set to "Strip tags", dangerous tags are removed (see below). If set to "Escape tags", all HTML is escaped and presented as it was typed.')); - $group .= form_textfield(t('Allowed HTML tags'), "allowed_html_$format", variable_get("allowed_html_$format", '