- Patch #25603 by Stefan: made the sizes of forms consistent.

TODO: document the defaults in the PHPdoc comments.
4.7.x
Dries Buytaert 2005-06-27 18:33:33 +00:00
parent d190e16c9e
commit 58aee8cdad
35 changed files with 212 additions and 212 deletions

View File

@ -75,8 +75,8 @@ function _locale_admin_manage_add_screen() {
$edit = &$_POST['edit'];
$output .= '<h2>'. t('Custom language') .'</h2>';
$form = form_textfield(t('Language code'), 'langcode', $edit['langcode'], 70, 12, t("Commonly this is an <a href=\"%iso-codes\">ISO 639 language code</a> with an optional country code for regional variants. Examples include 'en', 'en-US' and 'zh-cn'.", array('%iso-codes' => 'http://www.w3.org/WAI/ER/IG/ert/iso639.htm')));
$form .= form_textfield(t('Language name in English'), 'langname', $edit['langname'], 70, 64, t('Name of the language. Will be available for translation in all languages.'));
$form = form_textfield(t('Language code'), 'langcode', $edit['langcode'], 60, 12, t("Commonly this is an <a href=\"%iso-codes\">ISO 639 language code</a> with an optional country code for regional variants. Examples include 'en', 'en-US' and 'zh-cn'.", array('%iso-codes' => 'http://www.w3.org/WAI/ER/IG/ert/iso639.htm')));
$form .= form_textfield(t('Language name in English'), 'langname', $edit['langname'], 60, 64, t('Name of the language. Will be available for translation in all languages.'));
$form .= form_submit(t('Add language'));
$output .= form($form);
@ -945,11 +945,11 @@ function _locale_string_edit($lid) {
$form = '';
while ($translation = db_fetch_object($result)) {
$orig = $translation->source;
$form .= (strlen($orig) > 40) ? form_textarea($languages['name'][$translation->locale], $translation->locale, $translation->translation, 70, 15) : form_textfield($languages['name'][$translation->locale], $translation->locale, $translation->translation, 50, 128);
$form .= (strlen($orig) > 40) ? form_textarea($languages['name'][$translation->locale], $translation->locale, $translation->translation, 60, 15) : form_textfield($languages['name'][$translation->locale], $translation->locale, $translation->translation, 60, 128);
unset($languages['name'][$translation->locale]);
}
foreach ($languages['name'] as $key => $lang) {
$form .= (strlen($orig) > 40) ? form_textarea($lang, $key, '', 70, 15) : form_textfield($lang, $key, '', 50, 128);
$form .= (strlen($orig) > 40) ? form_textarea($lang, $key, '', 60, 15) : form_textfield($lang, $key, '', 60, 128);
}
$form = form_item(t('Original text'), wordwrap(check_plain($orig, 0))) . $form;

View File

@ -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:

View File

@ -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:

View File

@ -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 <code>TRUE</code> (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', '<front>'), '%php' => theme('placeholder', '<?php ?>'))));
$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 <code>TRUE</code> (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', '<front>'), '%php' => theme('placeholder', '<?php ?>'))));
$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 <a href="%overview">block overview page</a>.', 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 <a href="%overview">block overview page</a>.', array('%overview' => url('admin/block'))));
return $output;
}

View File

@ -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 <code>TRUE</code> (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', '<front>'), '%php' => theme('placeholder', '<?php ?>'))));
$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 <code>TRUE</code> (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', '<front>'), '%php' => theme('placeholder', '<?php ?>'))));
$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 <a href="%overview">block overview page</a>.', 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 <a href="%overview">block overview page</a>.', array('%overview' => url('admin/block'))));
return $output;
}

View File

@ -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('<div style="padding-left: '. (25 * $depth) .'px;">'. form_textfield(NULL, $node->nid .'][title', $node->title, 64, 255) .'</div>', 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('<div style="padding-left: '. (25 * $depth) .'px;">'. form_textfield(NULL, $node->nid .'][title', $node->title, 60, 255) .'</div>', 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) {

View File

@ -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('<div style="padding-left: '. (25 * $depth) .'px;">'. form_textfield(NULL, $node->nid .'][title', $node->title, 64, 255) .'</div>', 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('<div style="padding-left: '. (25 * $depth) .'px;">'. form_textfield(NULL, $node->nid .'][title', $node->title, 60, 255) .'</div>', 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) {

View File

@ -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 .= '<br /><h3>'. (isset($mid) ? t('Edit moderation option') : t('Add new moderation option')) .'</h3>';
$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 .= '<br /><h3>'. (isset($fid) ? t('Edit threshold') : t('Add new threshold')) .'</h3>';
$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']);

View File

@ -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 .= '<br /><h3>'. (isset($mid) ? t('Edit moderation option') : t('Add new moderation option')) .'</h3>';
$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 .= '<br /><h3>'. (isset($fid) ? t('Edit threshold') : t('Add new threshold')) .'</h3>';
$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']);

View File

@ -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 <a href="%form">contact page</a>. 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 <a href="%form">contact page</a>. 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 .' &lt;'. $user->mail .'&gt;');
$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);
}

View File

@ -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 <a href="%form">contact page</a>. 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 <a href="%form">contact page</a>. 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 .' &lt;'. $user->mail .'&gt;');
$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);
}

View File

@ -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 <a href="%url">administer &raquo; settings</a> 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 <a href=\"%drupal-sites\">Drupal sites</a> 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;

View File

@ -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 <a href="%url">administer &raquo; settings</a> 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 <a href=\"%drupal-sites\">Drupal sites</a> 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;

View File

@ -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("<p>To add a new input format, type its name here. After it has been added, you can configure its options.</p>");
$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 .= '<h2>'. t('Add new input format') .'</h2>'. $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", '<a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>'), 64, 255, t('If "Strip tags" is selected, optionally specify tags which should not be stripped. Javascript event attributes are always stripped.'));
$group .= form_textfield(t('Allowed HTML tags'), "allowed_html_$format", variable_get("allowed_html_$format", '<a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>'), 60, 255, t('If "Strip tags" is selected, optionally specify tags which should not be stripped. Javascript event attributes are always stripped.'));
$group .= form_checkbox(t('Display HTML help'), "filter_html_help_$format", 1, variable_get("filter_html_help_$format", 1), t('If enabled, Drupal will display some basic HTML help in the long filter tips.'));
$group .= form_radios(t('HTML style attributes'), "filter_style_$format", variable_get("filter_style_$format", FILTER_STYLE_STRIP), array(FILTER_STYLE_ALLOW => t('Allowed'), FILTER_STYLE_STRIP => t('Removed')), t('If "Strip tags" is selected, you can choose whether "STYLE" attributes are allowed or removed from input.'));
$group .= form_checkbox(t('Spam link deterrent'), "filter_html_nofollow_$format", 1, variable_get("filter_html_nofollow_$format", FALSE), t('If enabled, Drupal will add rel="nofollow" to all links, as a measure to reduce the effectiveness of spam links. Note: this will also prevent valid links from being followed by search engines, therefore it is likely most effective when enabled for anonymous users.'));

View File

@ -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("<p>To add a new input format, type its name here. After it has been added, you can configure its options.</p>");
$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 .= '<h2>'. t('Add new input format') .'</h2>'. $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", '<a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>'), 64, 255, t('If "Strip tags" is selected, optionally specify tags which should not be stripped. Javascript event attributes are always stripped.'));
$group .= form_textfield(t('Allowed HTML tags'), "allowed_html_$format", variable_get("allowed_html_$format", '<a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>'), 60, 255, t('If "Strip tags" is selected, optionally specify tags which should not be stripped. Javascript event attributes are always stripped.'));
$group .= form_checkbox(t('Display HTML help'), "filter_html_help_$format", 1, variable_get("filter_html_help_$format", 1), t('If enabled, Drupal will display some basic HTML help in the long filter tips.'));
$group .= form_radios(t('HTML style attributes'), "filter_style_$format", variable_get("filter_style_$format", FILTER_STYLE_STRIP), array(FILTER_STYLE_ALLOW => t('Allowed'), FILTER_STYLE_STRIP => t('Removed')), t('If "Strip tags" is selected, you can choose whether "STYLE" attributes are allowed or removed from input.'));
$group .= form_checkbox(t('Spam link deterrent'), "filter_html_nofollow_$format", 1, variable_get("filter_html_nofollow_$format", FALSE), t('If enabled, Drupal will add rel="nofollow" to all links, as a measure to reduce the effectiveness of spam links. Note: this will also prevent valid links from being followed by search engines, therefore it is likely most effective when enabled for anonymous users.'));

View File

@ -161,7 +161,7 @@ function _forum_confirm_delete($tid) {
* @param $edit Associative array containing a container term to be added or edited.
*/
function forum_form_container($edit = array()) {
$form = form_textfield(t('Container name'), 'name', $edit['name'], 50, 64, t('The container name is used to identify related forums.'), NULL, TRUE);
$form = form_textfield(t('Container name'), 'name', $edit['name'], 60, 64, t('The container name is used to identify related forums.'), NULL, TRUE);
$form .= form_textarea(t('Description'), 'description', $edit['description'], 60, 5, t('The container description can give users more information about the forums it contains.'));
$form .= _forum_parent_select($edit['tid'], t('Parent'), 'parent][', 'container');
@ -183,7 +183,7 @@ function forum_form_container($edit = array()) {
* @param $edit Associative array containing a forum term to be added or edited.
*/
function forum_form_forum($edit = array()) {
$form = form_textfield(t('Forum name'), 'name', $edit['name'], 50, 64, t('The forum name is used to identify related topic discussions.'), NULL, TRUE);
$form = form_textfield(t('Forum name'), 'name', $edit['name'], 60, 64, t('The forum name is used to identify related topic discussions.'), NULL, TRUE);
$form .= form_textarea(t('Description'), 'description', $edit['description'], 60, 5, t('The forum description can give users more information about the discussion topics it contains.'));
$form .= _forum_parent_select($edit['tid'], t('Parent'), 'parent][', 'forum');

View File

@ -161,7 +161,7 @@ function _forum_confirm_delete($tid) {
* @param $edit Associative array containing a container term to be added or edited.
*/
function forum_form_container($edit = array()) {
$form = form_textfield(t('Container name'), 'name', $edit['name'], 50, 64, t('The container name is used to identify related forums.'), NULL, TRUE);
$form = form_textfield(t('Container name'), 'name', $edit['name'], 60, 64, t('The container name is used to identify related forums.'), NULL, TRUE);
$form .= form_textarea(t('Description'), 'description', $edit['description'], 60, 5, t('The container description can give users more information about the forums it contains.'));
$form .= _forum_parent_select($edit['tid'], t('Parent'), 'parent][', 'container');
@ -183,7 +183,7 @@ function forum_form_container($edit = array()) {
* @param $edit Associative array containing a forum term to be added or edited.
*/
function forum_form_forum($edit = array()) {
$form = form_textfield(t('Forum name'), 'name', $edit['name'], 50, 64, t('The forum name is used to identify related topic discussions.'), NULL, TRUE);
$form = form_textfield(t('Forum name'), 'name', $edit['name'], 60, 64, t('The forum name is used to identify related topic discussions.'), NULL, TRUE);
$form .= form_textarea(t('Description'), 'description', $edit['description'], 60, 5, t('The forum description can give users more information about the discussion topics it contains.'));
$form .= _forum_parent_select($edit['tid'], t('Parent'), 'parent][', 'forum');

View File

@ -938,7 +938,7 @@ function node_types_configure($type = NULL) {
$node = new stdClass();
$node->type = $type;
$group = form_textarea(t('Explanation or submission guidelines'), $type .'_help', variable_get($type .'_help', ''), 70, 5, t('This text will be displayed at the top of the %type submission form. It is useful for helping or instructing your users.', array('%type' => node_invoke($type, 'node_name'))));
$group = form_textarea(t('Explanation or submission guidelines'), $type .'_help', variable_get($type .'_help', ''), 60, 5, t('This text will be displayed at the top of the %type submission form. It is useful for helping or instructing your users.', array('%type' => node_invoke($type, 'node_name'))));
$group .= form_select(t('Minimum number of words'), 'minimum_'. $type .'_size', variable_get('minimum_'. $type .'_size', 0), drupal_map_assoc(array(0, 10, 25, 50, 75, 100, 125, 150, 175, 200)), t('The minimum number of words a %type must be to be considered valid. This can be useful to rule out submissions that do not meet the site\'s standards, such as short test posts.', array('%type' => node_invoke($type, 'node_name'))));
$output = form_group(t('Submission form'), $group);
$output .= form_group(t('Workflow'), implode('', node_invoke_nodeapi($node, 'settings')));
@ -1288,8 +1288,8 @@ function node_form($edit) {
if (user_access('administer nodes')) {
$output .= '<div class="admin">';
$author = form_autocomplete(t('Authored by'), 'name', $edit->name, 20, 60, 'user/autocomplete');
$author .= form_textfield(t('Authored on'), 'date', $edit->date, 20, 25, NULL, NULL, TRUE);
$author = form_autocomplete(t('Authored by'), 'name', $edit->name, 30, 60, 'user/autocomplete');
$author .= form_textfield(t('Authored on'), 'date', $edit->date, 30, 25, NULL, NULL, TRUE);
$output .= '<div class="authored">';
$output .= form_group_collapsible(t('Authoring information'), $author, TRUE);

View File

@ -938,7 +938,7 @@ function node_types_configure($type = NULL) {
$node = new stdClass();
$node->type = $type;
$group = form_textarea(t('Explanation or submission guidelines'), $type .'_help', variable_get($type .'_help', ''), 70, 5, t('This text will be displayed at the top of the %type submission form. It is useful for helping or instructing your users.', array('%type' => node_invoke($type, 'node_name'))));
$group = form_textarea(t('Explanation or submission guidelines'), $type .'_help', variable_get($type .'_help', ''), 60, 5, t('This text will be displayed at the top of the %type submission form. It is useful for helping or instructing your users.', array('%type' => node_invoke($type, 'node_name'))));
$group .= form_select(t('Minimum number of words'), 'minimum_'. $type .'_size', variable_get('minimum_'. $type .'_size', 0), drupal_map_assoc(array(0, 10, 25, 50, 75, 100, 125, 150, 175, 200)), t('The minimum number of words a %type must be to be considered valid. This can be useful to rule out submissions that do not meet the site\'s standards, such as short test posts.', array('%type' => node_invoke($type, 'node_name'))));
$output = form_group(t('Submission form'), $group);
$output .= form_group(t('Workflow'), implode('', node_invoke_nodeapi($node, 'settings')));
@ -1288,8 +1288,8 @@ function node_form($edit) {
if (user_access('administer nodes')) {
$output .= '<div class="admin">';
$author = form_autocomplete(t('Authored by'), 'name', $edit->name, 20, 60, 'user/autocomplete');
$author .= form_textfield(t('Authored on'), 'date', $edit->date, 20, 25, NULL, NULL, TRUE);
$author = form_autocomplete(t('Authored by'), 'name', $edit->name, 30, 60, 'user/autocomplete');
$author .= form_textfield(t('Authored on'), 'date', $edit->date, 30, 25, NULL, NULL, TRUE);
$output .= '<div class="authored">';
$output .= form_group_collapsible(t('Authoring information'), $author, TRUE);

View File

@ -174,8 +174,8 @@ function path_set_alias($path = NULL, $alias = NULL, $pid = NULL) {
*/
function path_form($edit = '') {
$form .= form_textfield(t('Existing system path'), 'src', $edit['src'], 50, 64, t('Specify the existing path you wish to alias. For example: node/28, forum/1, taxonomy/term/1+2.'));
$form .= form_textfield(t('New path alias'), 'dst', $edit['dst'], 50, 64, t('Specify an alternative path by which this data can be accessed. For example, type "about" when writing an about page. Use a relative path and don\'t add a trailing slash or the URL alias won\'t work.'));
$form .= form_textfield(t('Existing system path'), 'src', $edit['src'], 60, 64, t('Specify the existing path you wish to alias. For example: node/28, forum/1, taxonomy/term/1+2.'));
$form .= form_textfield(t('New path alias'), 'dst', $edit['dst'], 60, 64, t('Specify an alternative path by which this data can be accessed. For example, type "about" when writing an about page. Use a relative path and don\'t add a trailing slash or the URL alias won\'t work.'));
if ($edit['pid']) {
$form .= form_hidden('pid', $edit['pid']);

View File

@ -174,8 +174,8 @@ function path_set_alias($path = NULL, $alias = NULL, $pid = NULL) {
*/
function path_form($edit = '') {
$form .= form_textfield(t('Existing system path'), 'src', $edit['src'], 50, 64, t('Specify the existing path you wish to alias. For example: node/28, forum/1, taxonomy/term/1+2.'));
$form .= form_textfield(t('New path alias'), 'dst', $edit['dst'], 50, 64, t('Specify an alternative path by which this data can be accessed. For example, type "about" when writing an about page. Use a relative path and don\'t add a trailing slash or the URL alias won\'t work.'));
$form .= form_textfield(t('Existing system path'), 'src', $edit['src'], 60, 64, t('Specify the existing path you wish to alias. For example: node/28, forum/1, taxonomy/term/1+2.'));
$form .= form_textfield(t('New path alias'), 'dst', $edit['dst'], 60, 64, t('Specify an alternative path by which this data can be accessed. For example, type "about" when writing an about page. Use a relative path and don\'t add a trailing slash or the URL alias won\'t work.'));
if ($edit['pid']) {
$form .= form_hidden('pid', $edit['pid']);

View File

@ -138,9 +138,9 @@ function poll_form(&$node) {
// Poll choices
$opts = drupal_map_assoc(range(2, $node->choices * 2 + 5));
for ($a = 0; $a < $node->choices; $a++) {
$group1 .= form_textfield(t('Choice %n', array('%n' => ($a + 1))), "choice][$a][chtext", $node->choice[$a]['chtext'], 50, 127);
$group1 .= form_textfield(t('Choice %n', array('%n' => ($a + 1))), "choice][$a][chtext", $node->choice[$a]['chtext'], 60, 127);
if ($admin) {
$group1 .= form_textfield(t('Votes for choice %n', array('%n' => ($a + 1))), "choice][$a][chvotes", (int)$node->choice[$a]['chvotes'], 7, 7);
$group1 .= form_textfield(t('Votes for choice %n', array('%n' => ($a + 1))), "choice][$a][chvotes", (int)$node->choice[$a]['chvotes'], 5, 7);
}
}
$group1 .= form_hidden('choices', $node->choices);

View File

@ -138,9 +138,9 @@ function poll_form(&$node) {
// Poll choices
$opts = drupal_map_assoc(range(2, $node->choices * 2 + 5));
for ($a = 0; $a < $node->choices; $a++) {
$group1 .= form_textfield(t('Choice %n', array('%n' => ($a + 1))), "choice][$a][chtext", $node->choice[$a]['chtext'], 50, 127);
$group1 .= form_textfield(t('Choice %n', array('%n' => ($a + 1))), "choice][$a][chtext", $node->choice[$a]['chtext'], 60, 127);
if ($admin) {
$group1 .= form_textfield(t('Votes for choice %n', array('%n' => ($a + 1))), "choice][$a][chvotes", (int)$node->choice[$a]['chvotes'], 7, 7);
$group1 .= form_textfield(t('Votes for choice %n', array('%n' => ($a + 1))), "choice][$a][chvotes", (int)$node->choice[$a]['chvotes'], 5, 7);
}
}
$group1 .= form_hidden('choices', $node->choices);

View File

@ -330,13 +330,13 @@ function profile_form_profile($edit, $user, $category) {
switch ($field->type) {
case 'textfield':
case 'url':
$fields[$category] .= form_textfield(check_plain($field->title), $field->name, $edit[$field->name], 70, 255, _profile_form_explanation($field), NULL, $field->required);
$fields[$category] .= form_textfield(check_plain($field->title), $field->name, $edit[$field->name], 60, 255, _profile_form_explanation($field), NULL, $field->required);
break;
case 'textarea':
$fields[$category] .= form_textarea(check_plain($field->title), $field->name, $edit[$field->name], 70, 5, _profile_form_explanation($field), NULL, $field->required);
$fields[$category] .= form_textarea(check_plain($field->title), $field->name, $edit[$field->name], 60, 5, _profile_form_explanation($field), NULL, $field->required);
break;
case 'list':
$fields[$category] .= form_textarea(check_plain($field->title), $field->name, $edit[$field->name], 70, 5, _profile_form_explanation($field), NULL, $field->required);
$fields[$category] .= form_textarea(check_plain($field->title), $field->name, $edit[$field->name], 60, 5, _profile_form_explanation($field), NULL, $field->required);
break;
case 'checkbox':
$fields[$category] .= form_checkbox(check_plain($field->title), $field->name, 1, $edit[$field->name], _profile_form_explanation($field), NULL, $field->required);
@ -580,21 +580,21 @@ function profile_admin_delete($fid) {
function _profile_field_form($type, $edit = array()) {
$group = form_textfield(t('Category'), 'category', $edit['category'], 70, 128, t('The category the new field should be part of. Categories are used to group fields logically. An example category is "Personal information".'));
$group .= form_textfield(t('Title'), 'title', $edit['title'], 70, 128, t('The title of the new field. The title will be shown to the user. An example title is "Favorite color".'));
$group .= form_textfield(t('Form name'), 'name', $edit['name'], 70, 128, t('The name of the field. The form name is not shown to the user but used internally in the HTML code and URLs.
$group = form_textfield(t('Category'), 'category', $edit['category'], 60, 128, t('The category the new field should be part of. Categories are used to group fields logically. An example category is "Personal information".'));
$group .= form_textfield(t('Title'), 'title', $edit['title'], 60, 128, t('The title of the new field. The title will be shown to the user. An example title is "Favorite color".'));
$group .= form_textfield(t('Form name'), 'name', $edit['name'], 60, 128, t('The name of the field. The form name is not shown to the user but used internally in the HTML code and URLs.
Unless you know what you are doing, it is highly recommended that you prefix the form name with <code>profile_</code> to avoid name clashes with other fields. Spaces or any other special characters except dash (-) and underscore (_) are not allowed. An example name is "profile_favorite_color" or perhaps just "profile_color".'));
$group .= form_textarea(t('Explanation'), 'explanation', $edit['explanation'], 70, 3, t('An optional explanation to go with the new field. The explanation will be shown to the user.'));
$group .= form_textarea(t('Explanation'), 'explanation', $edit['explanation'], 60, 5, t('An optional explanation to go with the new field. The explanation will be shown to the user.'));
if ($type == 'selection') {
$group .= form_textarea(t('Selection options'), 'options', $edit['options'], 70, 8, t('A list of all options. Put each option on a separate line. Example options are "red", "blue", "green", etc.'));
$group .= form_textarea(t('Selection options'), 'options', $edit['options'], 60, 5, t('A list of all options. Put each option on a separate line. Example options are "red", "blue", "green", etc.'));
}
$group .= form_weight(t('Weight'), 'weight', $edit['weight'], 5, t('The weights define the order in which the form fields are shown. Lighter fields "float up" towards the top of the category.'));
$group .= form_radios(t('Visibility'), 'visibility', $edit['visibility'], array(PROFILE_HIDDEN => t('Hidden profile field, only accessible by administrators, modules and themes.'), PROFILE_PRIVATE => t('Private field, content only available to privileged users.'), PROFILE_PUBLIC => t('Public field, content shown on profile page but not used on member list pages.'), PROFILE_PUBLIC_LISTINGS => t('Public field, content shown on profile page and on member list pages.')));
if ($type == 'selection' || $type == 'list') {
$group .= form_textfield(t('Page title'), 'page', $edit['page'], 70, 128, t('The title of the page showing all users with the specified field. The word <code>%value</code> will be substituted with the corresponding value. An example page title is "People whose favorite color is %value". Only applicable if the field is configured to be shown on member list pages.'));
$group .= form_textfield(t('Page title'), 'page', $edit['page'], 60, 128, t('The title of the page showing all users with the specified field. The word <code>%value</code> will be substituted with the corresponding value. An example page title is "People whose favorite color is %value". Only applicable if the field is configured to be shown on member list pages.'));
}
else {
$group .= form_textfield(t('Page title'), 'page', $edit['page'], 70, 128, t('The title of the page showing all users with the specified field. Only applicable if the field is configured to be shown on member listings.'));
$group .= form_textfield(t('Page title'), 'page', $edit['page'], 60, 128, t('The title of the page showing all users with the specified field. Only applicable if the field is configured to be shown on member listings.'));
}
$group .= form_checkbox(t('The user must enter a value.'), 'required', 1, $edit['required']);
$group .= form_checkbox(t('Visible in user registration form.'), 'register', 1, $edit['register']);

View File

@ -330,13 +330,13 @@ function profile_form_profile($edit, $user, $category) {
switch ($field->type) {
case 'textfield':
case 'url':
$fields[$category] .= form_textfield(check_plain($field->title), $field->name, $edit[$field->name], 70, 255, _profile_form_explanation($field), NULL, $field->required);
$fields[$category] .= form_textfield(check_plain($field->title), $field->name, $edit[$field->name], 60, 255, _profile_form_explanation($field), NULL, $field->required);
break;
case 'textarea':
$fields[$category] .= form_textarea(check_plain($field->title), $field->name, $edit[$field->name], 70, 5, _profile_form_explanation($field), NULL, $field->required);
$fields[$category] .= form_textarea(check_plain($field->title), $field->name, $edit[$field->name], 60, 5, _profile_form_explanation($field), NULL, $field->required);
break;
case 'list':
$fields[$category] .= form_textarea(check_plain($field->title), $field->name, $edit[$field->name], 70, 5, _profile_form_explanation($field), NULL, $field->required);
$fields[$category] .= form_textarea(check_plain($field->title), $field->name, $edit[$field->name], 60, 5, _profile_form_explanation($field), NULL, $field->required);
break;
case 'checkbox':
$fields[$category] .= form_checkbox(check_plain($field->title), $field->name, 1, $edit[$field->name], _profile_form_explanation($field), NULL, $field->required);
@ -580,21 +580,21 @@ function profile_admin_delete($fid) {
function _profile_field_form($type, $edit = array()) {
$group = form_textfield(t('Category'), 'category', $edit['category'], 70, 128, t('The category the new field should be part of. Categories are used to group fields logically. An example category is "Personal information".'));
$group .= form_textfield(t('Title'), 'title', $edit['title'], 70, 128, t('The title of the new field. The title will be shown to the user. An example title is "Favorite color".'));
$group .= form_textfield(t('Form name'), 'name', $edit['name'], 70, 128, t('The name of the field. The form name is not shown to the user but used internally in the HTML code and URLs.
$group = form_textfield(t('Category'), 'category', $edit['category'], 60, 128, t('The category the new field should be part of. Categories are used to group fields logically. An example category is "Personal information".'));
$group .= form_textfield(t('Title'), 'title', $edit['title'], 60, 128, t('The title of the new field. The title will be shown to the user. An example title is "Favorite color".'));
$group .= form_textfield(t('Form name'), 'name', $edit['name'], 60, 128, t('The name of the field. The form name is not shown to the user but used internally in the HTML code and URLs.
Unless you know what you are doing, it is highly recommended that you prefix the form name with <code>profile_</code> to avoid name clashes with other fields. Spaces or any other special characters except dash (-) and underscore (_) are not allowed. An example name is "profile_favorite_color" or perhaps just "profile_color".'));
$group .= form_textarea(t('Explanation'), 'explanation', $edit['explanation'], 70, 3, t('An optional explanation to go with the new field. The explanation will be shown to the user.'));
$group .= form_textarea(t('Explanation'), 'explanation', $edit['explanation'], 60, 5, t('An optional explanation to go with the new field. The explanation will be shown to the user.'));
if ($type == 'selection') {
$group .= form_textarea(t('Selection options'), 'options', $edit['options'], 70, 8, t('A list of all options. Put each option on a separate line. Example options are "red", "blue", "green", etc.'));
$group .= form_textarea(t('Selection options'), 'options', $edit['options'], 60, 5, t('A list of all options. Put each option on a separate line. Example options are "red", "blue", "green", etc.'));
}
$group .= form_weight(t('Weight'), 'weight', $edit['weight'], 5, t('The weights define the order in which the form fields are shown. Lighter fields "float up" towards the top of the category.'));
$group .= form_radios(t('Visibility'), 'visibility', $edit['visibility'], array(PROFILE_HIDDEN => t('Hidden profile field, only accessible by administrators, modules and themes.'), PROFILE_PRIVATE => t('Private field, content only available to privileged users.'), PROFILE_PUBLIC => t('Public field, content shown on profile page but not used on member list pages.'), PROFILE_PUBLIC_LISTINGS => t('Public field, content shown on profile page and on member list pages.')));
if ($type == 'selection' || $type == 'list') {
$group .= form_textfield(t('Page title'), 'page', $edit['page'], 70, 128, t('The title of the page showing all users with the specified field. The word <code>%value</code> will be substituted with the corresponding value. An example page title is "People whose favorite color is %value". Only applicable if the field is configured to be shown on member list pages.'));
$group .= form_textfield(t('Page title'), 'page', $edit['page'], 60, 128, t('The title of the page showing all users with the specified field. The word <code>%value</code> will be substituted with the corresponding value. An example page title is "People whose favorite color is %value". Only applicable if the field is configured to be shown on member list pages.'));
}
else {
$group .= form_textfield(t('Page title'), 'page', $edit['page'], 70, 128, t('The title of the page showing all users with the specified field. Only applicable if the field is configured to be shown on member listings.'));
$group .= form_textfield(t('Page title'), 'page', $edit['page'], 60, 128, t('The title of the page showing all users with the specified field. Only applicable if the field is configured to be shown on member listings.'));
}
$group .= form_checkbox(t('The user must enter a value.'), 'required', 1, $edit['required']);
$group .= form_checkbox(t('Visible in user registration form.'), 'register', 1, $edit['register']);

View File

@ -158,8 +158,8 @@ function search_admin() {
$output .= form_group(t('Indexing throttle'), $group);
// Indexing settings:
$group = '<em>'. t('<p>Changing the setting below will cause the site index to be rebuilt. The search index is not cleared but systematically updated to reflect the new settings. Searching will continue to work but new content won\'t be indexed until all existing content has been re-indexed.</p><p>The default settings should be appropriate for the majority of sites.</p>') .'</em>';
$group .= form_textfield(t('Minimum word length to index'), 'minimum_word_size', variable_get('minimum_word_size', 3), 3, 3, t('The number of characters a word has to be to be indexed. Words shorter than this will not be searchable.'));
$group .= form_textfield(t('Minimum word length to search for'), 'remove_short', variable_get('remove_short', 3), 3, 3, t('The number of characters a word has to be to be searched for, including wildcard characters.'));
$group .= form_textfield(t('Minimum word length to index'), 'minimum_word_size', variable_get('minimum_word_size', 3), 5, 3, t('The number of characters a word has to be to be indexed. Words shorter than this will not be searchable.'));
$group .= form_textfield(t('Minimum word length to search for'), 'remove_short', variable_get('remove_short', 3), 5, 3, t('The number of characters a word has to be to be searched for, including wildcard characters.'));
$output .= form_group(t('Indexing settings'), $group);
return system_settings_form($output);
@ -659,7 +659,7 @@ function search_form($action = '', $keys = '', $type = null, $prompt = null) {
$output = ' <div class="search-form">';
$box = '<div class="container-inline">';
$box .= form_textfield('', 'keys', $keys, $prompt ? 40 : 20, 255);
$box .= form_textfield('', 'keys', $keys, $prompt ? 40 : 30, 255);
$box .= form_submit(t('Search'));
$box .= '</div>';
$output .= form_item($prompt, $box);

View File

@ -158,8 +158,8 @@ function search_admin() {
$output .= form_group(t('Indexing throttle'), $group);
// Indexing settings:
$group = '<em>'. t('<p>Changing the setting below will cause the site index to be rebuilt. The search index is not cleared but systematically updated to reflect the new settings. Searching will continue to work but new content won\'t be indexed until all existing content has been re-indexed.</p><p>The default settings should be appropriate for the majority of sites.</p>') .'</em>';
$group .= form_textfield(t('Minimum word length to index'), 'minimum_word_size', variable_get('minimum_word_size', 3), 3, 3, t('The number of characters a word has to be to be indexed. Words shorter than this will not be searchable.'));
$group .= form_textfield(t('Minimum word length to search for'), 'remove_short', variable_get('remove_short', 3), 3, 3, t('The number of characters a word has to be to be searched for, including wildcard characters.'));
$group .= form_textfield(t('Minimum word length to index'), 'minimum_word_size', variable_get('minimum_word_size', 3), 5, 3, t('The number of characters a word has to be to be indexed. Words shorter than this will not be searchable.'));
$group .= form_textfield(t('Minimum word length to search for'), 'remove_short', variable_get('remove_short', 3), 5, 3, t('The number of characters a word has to be to be searched for, including wildcard characters.'));
$output .= form_group(t('Indexing settings'), $group);
return system_settings_form($output);
@ -659,7 +659,7 @@ function search_form($action = '', $keys = '', $type = null, $prompt = null) {
$output = ' <div class="search-form">';
$box = '<div class="container-inline">';
$box .= form_textfield('', 'keys', $keys, $prompt ? 40 : 20, 255);
$box .= form_textfield('', 'keys', $keys, $prompt ? 40 : 30, 255);
$box .= form_submit(t('Search'));
$box .= '</div>';
$output .= form_item($prompt, $box);

View File

@ -186,13 +186,13 @@ function _system_zonelist() {
function system_view_general() {
// General settings:
$group = form_textfield(t('Name'), 'site_name', variable_get('site_name', 'drupal'), 70, 70, t('The name of this web site.'));
$group .= form_textfield(t('E-mail address'), 'site_mail', variable_get('site_mail', ini_get('sendmail_from')), 70, 128, t('A valid e-mail address for this website, used by the auto-mailer during registration, new password requests, notifications, etc.'));
$group .= form_textfield(t('Slogan'), 'site_slogan', variable_get('site_slogan', ''), 70, 128, t('The slogan of this website. Some themes display a slogan when available.'));
$group .= form_textarea(t('Mission'), 'site_mission', variable_get('site_mission', ''), 70, 5, t('Your site\'s mission statement or focus.'));
$group .= form_textarea(t('Footer message'), 'site_footer', variable_get('site_footer', ''), 70, 5, t('This text will be displayed at the bottom of each page. Useful for adding a copyright notice to your pages.'));
$group .= form_textfield(t('Anonymous user'), 'anonymous', variable_get('anonymous', 'Anonymous'), 70, 70, t('The name used to indicate anonymous users.'));
$group .= form_textfield(t('Default front page'), 'site_frontpage', variable_get('site_frontpage', 'node'), 70, 70, t('The home page displays content from this relative URL. If you are not using clean URLs, specify the part after "?q=". If unsure, specify "node".'));
$group = form_textfield(t('Name'), 'site_name', variable_get('site_name', 'drupal'), 60, 70, t('The name of this web site.'));
$group .= form_textfield(t('E-mail address'), 'site_mail', variable_get('site_mail', ini_get('sendmail_from')), 60, 128, t('A valid e-mail address for this website, used by the auto-mailer during registration, new password requests, notifications, etc.'));
$group .= form_textfield(t('Slogan'), 'site_slogan', variable_get('site_slogan', ''), 60, 128, t('The slogan of this website. Some themes display a slogan when available.'));
$group .= form_textarea(t('Mission'), 'site_mission', variable_get('site_mission', ''), 60, 5, t('Your site\'s mission statement or focus.'));
$group .= form_textarea(t('Footer message'), 'site_footer', variable_get('site_footer', ''), 60, 5, t('This text will be displayed at the bottom of each page. Useful for adding a copyright notice to your pages.'));
$group .= form_textfield(t('Anonymous user'), 'anonymous', variable_get('anonymous', 'Anonymous'), 60, 70, t('The name used to indicate anonymous users.'));
$group .= form_textfield(t('Default front page'), 'site_frontpage', variable_get('site_frontpage', 'node'), 60, 70, t('The home page displays content from this relative URL. If you are not using clean URLs, specify the part after "?q=". If unsure, specify "node".'));
// We check for clean URL support using an image on the client side.
$group .= form_radios(t('Clean URLs'), 'clean_url', variable_get('clean_url', 0), array(t('Disabled'), t('Enabled')), t('This option makes Drupal emit clean URLs (i.e. without <code>?q=</code> in the URL). You\'ll need <code>ModRewrite</code> support for this to work. See the <code>.htaccess</code> file in Drupal\'s top-level directory for more information.'));
@ -206,8 +206,8 @@ function system_view_general() {
// Error handling:
$period = drupal_map_assoc(array(3600, 10800, 21600, 32400, 43200, 86400, 172800, 259200, 604800, 1209600, 2419200), 'format_interval');
$period['1000000000'] = t('Never');
$group = form_textfield(t('Default 403 (access denied) page'), 'site_403', variable_get('site_403', ''), 70, 70, t('This page is displayed when the requested document is denied to the current user. If you are not using clean URLs, specify the part after "?q=". If unsure, specify nothing.'));
$group .= form_textfield(t('Default 404 (not found) page'), 'site_404', variable_get('site_404', ''), 70, 70, t('This page is displayed when no other content matches the requested document. If you are not using clean URLs, specify the part after "?q=". If unsure, specify nothing.'));
$group = form_textfield(t('Default 403 (access denied) page'), 'site_403', variable_get('site_403', ''), 60, 70, t('This page is displayed when the requested document is denied to the current user. If you are not using clean URLs, specify the part after "?q=". If unsure, specify nothing.'));
$group .= form_textfield(t('Default 404 (not found) page'), 'site_404', variable_get('site_404', ''), 60, 70, t('This page is displayed when no other content matches the requested document. If you are not using clean URLs, specify the part after "?q=". If unsure, specify nothing.'));
$group .= form_select(t('Error reporting'), 'error_level', variable_get('error_level', 1), array(t('Write errors to the log'), t('Write errors to the log and to the screen')), t('Where Drupal, PHP and SQL errors are logged. On a production server it is recommended that errors are only written to the error log. On a test server it can be helpful to write logs to the screen.'));
$group .= form_select(t('Discard log entries older than'), 'watchdog_clear', variable_get('watchdog_clear', 604800), $period, t('The time log entries should be kept. Older entries will be automatically discarded. Requires crontab.'));
@ -225,8 +225,8 @@ function system_view_general() {
$directory_temp = variable_get('file_directory_temp', FILE_DIRECTORY_TEMP);
file_check_directory($directory_temp, FILE_CREATE_DIRECTORY, 'file_directory_temp');
$group = form_textfield(t('File system path'), 'file_directory_path', $directory_path, 70, 255, t('A file system path where the files will be stored. This directory has to exist and be writable by Drupal. If the download method is set to public this directory has to be relative to Drupal installation directory, and be accessible over the web. When download method is set to private this directory should not be accessible over the web. Changing this location after the site has been in use will cause problems so only change this setting on an existing site if you know what you are doing.'));
$group .= form_textfield(t('Temporary directory'), 'file_directory_temp', $directory_temp, 70, 255, t('Location where uploaded files will be kept during previews. Relative paths will be resolved relative to the file system path.'));
$group = form_textfield(t('File system path'), 'file_directory_path', $directory_path, 60, 255, t('A file system path where the files will be stored. This directory has to exist and be writable by Drupal. If the download method is set to public this directory has to be relative to Drupal installation directory, and be accessible over the web. When download method is set to private this directory should not be accessible over the web. Changing this location after the site has been in use will cause problems so only change this setting on an existing site if you know what you are doing.'));
$group .= form_textfield(t('Temporary directory'), 'file_directory_temp', $directory_temp, 60, 255, t('Location where uploaded files will be kept during previews. Relative paths will be resolved relative to the file system path.'));
$group .= form_radios(t('Download method'), 'file_downloads', variable_get('file_downloads', FILE_DOWNLOADS_PUBLIC), array(FILE_DOWNLOADS_PUBLIC => t('Public - files are available using http directly.'), FILE_DOWNLOADS_PRIVATE => t('Private - files are transferred by Drupal.')), t('If you want any sort of access control on the downloading of files, this needs to be set to <em>private</em>. You can change this at any time, however all download URLs will change and there may be unexpected problems so it is not recommended.'));
$output .= form_group_collapsible(t('File system settings'), $group, TRUE);
@ -650,7 +650,7 @@ function system_theme_settings($key = '') {
// Logo settings
if ((!$key) || in_array('logo', $features)) {
$group = form_checkbox(t('Use the default logo'), "$var][default_logo", 1, $settings['default_logo'], t('Check here if you want the theme to use the logo supplied with it.'));
$group .= form_textfield(t('Path to custom logo'), "$var][logo_path", $settings['logo_path'], 50, 128, t('The path to the file you would like to use as your logo file instead of the default logo.'));
$group .= form_textfield(t('Path to custom logo'), "$var][logo_path", $settings['logo_path'], 60, 128, t('The path to the file you would like to use as your logo file instead of the default logo.'));
file_check_directory(variable_get('file_directory_path', 'files'), FILE_CREATE_DIRECTORY, 'file_directory_path');
$group .= form_file(t('Upload logo image'), 'logo_upload', 40, t("If you don't have direct file access to the server, use this field to upload your logo."));
@ -662,7 +662,7 @@ function system_theme_settings($key = '') {
if ((!$key) || in_array('toggle_favicon', $features)) {
$group = t('Your shortcut icon or \'favicon\' is displayed in the address bar and bookmarks of most browsers.');
$group .= form_checkbox(t('Use the default shortcut icon.'), "$var][default_favicon", 1, $settings['default_favicon'], t('Check here if you want the theme to use the default shortcut icon.'));
$group .= form_textfield(t('Path to custom icon'), "$var][favicon_path", $settings['favicon_path'], 50, 128, t('The path to the image file you would like to use as your custom shortcut icon.'));
$group .= form_textfield(t('Path to custom icon'), "$var][favicon_path", $settings['favicon_path'], 60, 128, t('The path to the image file you would like to use as your custom shortcut icon.'));
file_check_directory(variable_get('file_directory_path', 'files'), FILE_CREATE_DIRECTORY, 'file_directory_path');
$group .= form_file(t('Upload icon image'), 'favicon_upload', 40, t("If you don't have direct file access to the server, use this field to upload your shortcut icon."));

View File

@ -186,13 +186,13 @@ function _system_zonelist() {
function system_view_general() {
// General settings:
$group = form_textfield(t('Name'), 'site_name', variable_get('site_name', 'drupal'), 70, 70, t('The name of this web site.'));
$group .= form_textfield(t('E-mail address'), 'site_mail', variable_get('site_mail', ini_get('sendmail_from')), 70, 128, t('A valid e-mail address for this website, used by the auto-mailer during registration, new password requests, notifications, etc.'));
$group .= form_textfield(t('Slogan'), 'site_slogan', variable_get('site_slogan', ''), 70, 128, t('The slogan of this website. Some themes display a slogan when available.'));
$group .= form_textarea(t('Mission'), 'site_mission', variable_get('site_mission', ''), 70, 5, t('Your site\'s mission statement or focus.'));
$group .= form_textarea(t('Footer message'), 'site_footer', variable_get('site_footer', ''), 70, 5, t('This text will be displayed at the bottom of each page. Useful for adding a copyright notice to your pages.'));
$group .= form_textfield(t('Anonymous user'), 'anonymous', variable_get('anonymous', 'Anonymous'), 70, 70, t('The name used to indicate anonymous users.'));
$group .= form_textfield(t('Default front page'), 'site_frontpage', variable_get('site_frontpage', 'node'), 70, 70, t('The home page displays content from this relative URL. If you are not using clean URLs, specify the part after "?q=". If unsure, specify "node".'));
$group = form_textfield(t('Name'), 'site_name', variable_get('site_name', 'drupal'), 60, 70, t('The name of this web site.'));
$group .= form_textfield(t('E-mail address'), 'site_mail', variable_get('site_mail', ini_get('sendmail_from')), 60, 128, t('A valid e-mail address for this website, used by the auto-mailer during registration, new password requests, notifications, etc.'));
$group .= form_textfield(t('Slogan'), 'site_slogan', variable_get('site_slogan', ''), 60, 128, t('The slogan of this website. Some themes display a slogan when available.'));
$group .= form_textarea(t('Mission'), 'site_mission', variable_get('site_mission', ''), 60, 5, t('Your site\'s mission statement or focus.'));
$group .= form_textarea(t('Footer message'), 'site_footer', variable_get('site_footer', ''), 60, 5, t('This text will be displayed at the bottom of each page. Useful for adding a copyright notice to your pages.'));
$group .= form_textfield(t('Anonymous user'), 'anonymous', variable_get('anonymous', 'Anonymous'), 60, 70, t('The name used to indicate anonymous users.'));
$group .= form_textfield(t('Default front page'), 'site_frontpage', variable_get('site_frontpage', 'node'), 60, 70, t('The home page displays content from this relative URL. If you are not using clean URLs, specify the part after "?q=". If unsure, specify "node".'));
// We check for clean URL support using an image on the client side.
$group .= form_radios(t('Clean URLs'), 'clean_url', variable_get('clean_url', 0), array(t('Disabled'), t('Enabled')), t('This option makes Drupal emit clean URLs (i.e. without <code>?q=</code> in the URL). You\'ll need <code>ModRewrite</code> support for this to work. See the <code>.htaccess</code> file in Drupal\'s top-level directory for more information.'));
@ -206,8 +206,8 @@ function system_view_general() {
// Error handling:
$period = drupal_map_assoc(array(3600, 10800, 21600, 32400, 43200, 86400, 172800, 259200, 604800, 1209600, 2419200), 'format_interval');
$period['1000000000'] = t('Never');
$group = form_textfield(t('Default 403 (access denied) page'), 'site_403', variable_get('site_403', ''), 70, 70, t('This page is displayed when the requested document is denied to the current user. If you are not using clean URLs, specify the part after "?q=". If unsure, specify nothing.'));
$group .= form_textfield(t('Default 404 (not found) page'), 'site_404', variable_get('site_404', ''), 70, 70, t('This page is displayed when no other content matches the requested document. If you are not using clean URLs, specify the part after "?q=". If unsure, specify nothing.'));
$group = form_textfield(t('Default 403 (access denied) page'), 'site_403', variable_get('site_403', ''), 60, 70, t('This page is displayed when the requested document is denied to the current user. If you are not using clean URLs, specify the part after "?q=". If unsure, specify nothing.'));
$group .= form_textfield(t('Default 404 (not found) page'), 'site_404', variable_get('site_404', ''), 60, 70, t('This page is displayed when no other content matches the requested document. If you are not using clean URLs, specify the part after "?q=". If unsure, specify nothing.'));
$group .= form_select(t('Error reporting'), 'error_level', variable_get('error_level', 1), array(t('Write errors to the log'), t('Write errors to the log and to the screen')), t('Where Drupal, PHP and SQL errors are logged. On a production server it is recommended that errors are only written to the error log. On a test server it can be helpful to write logs to the screen.'));
$group .= form_select(t('Discard log entries older than'), 'watchdog_clear', variable_get('watchdog_clear', 604800), $period, t('The time log entries should be kept. Older entries will be automatically discarded. Requires crontab.'));
@ -225,8 +225,8 @@ function system_view_general() {
$directory_temp = variable_get('file_directory_temp', FILE_DIRECTORY_TEMP);
file_check_directory($directory_temp, FILE_CREATE_DIRECTORY, 'file_directory_temp');
$group = form_textfield(t('File system path'), 'file_directory_path', $directory_path, 70, 255, t('A file system path where the files will be stored. This directory has to exist and be writable by Drupal. If the download method is set to public this directory has to be relative to Drupal installation directory, and be accessible over the web. When download method is set to private this directory should not be accessible over the web. Changing this location after the site has been in use will cause problems so only change this setting on an existing site if you know what you are doing.'));
$group .= form_textfield(t('Temporary directory'), 'file_directory_temp', $directory_temp, 70, 255, t('Location where uploaded files will be kept during previews. Relative paths will be resolved relative to the file system path.'));
$group = form_textfield(t('File system path'), 'file_directory_path', $directory_path, 60, 255, t('A file system path where the files will be stored. This directory has to exist and be writable by Drupal. If the download method is set to public this directory has to be relative to Drupal installation directory, and be accessible over the web. When download method is set to private this directory should not be accessible over the web. Changing this location after the site has been in use will cause problems so only change this setting on an existing site if you know what you are doing.'));
$group .= form_textfield(t('Temporary directory'), 'file_directory_temp', $directory_temp, 60, 255, t('Location where uploaded files will be kept during previews. Relative paths will be resolved relative to the file system path.'));
$group .= form_radios(t('Download method'), 'file_downloads', variable_get('file_downloads', FILE_DOWNLOADS_PUBLIC), array(FILE_DOWNLOADS_PUBLIC => t('Public - files are available using http directly.'), FILE_DOWNLOADS_PRIVATE => t('Private - files are transferred by Drupal.')), t('If you want any sort of access control on the downloading of files, this needs to be set to <em>private</em>. You can change this at any time, however all download URLs will change and there may be unexpected problems so it is not recommended.'));
$output .= form_group_collapsible(t('File system settings'), $group, TRUE);
@ -650,7 +650,7 @@ function system_theme_settings($key = '') {
// Logo settings
if ((!$key) || in_array('logo', $features)) {
$group = form_checkbox(t('Use the default logo'), "$var][default_logo", 1, $settings['default_logo'], t('Check here if you want the theme to use the logo supplied with it.'));
$group .= form_textfield(t('Path to custom logo'), "$var][logo_path", $settings['logo_path'], 50, 128, t('The path to the file you would like to use as your logo file instead of the default logo.'));
$group .= form_textfield(t('Path to custom logo'), "$var][logo_path", $settings['logo_path'], 60, 128, t('The path to the file you would like to use as your logo file instead of the default logo.'));
file_check_directory(variable_get('file_directory_path', 'files'), FILE_CREATE_DIRECTORY, 'file_directory_path');
$group .= form_file(t('Upload logo image'), 'logo_upload', 40, t("If you don't have direct file access to the server, use this field to upload your logo."));
@ -662,7 +662,7 @@ function system_theme_settings($key = '') {
if ((!$key) || in_array('toggle_favicon', $features)) {
$group = t('Your shortcut icon or \'favicon\' is displayed in the address bar and bookmarks of most browsers.');
$group .= form_checkbox(t('Use the default shortcut icon.'), "$var][default_favicon", 1, $settings['default_favicon'], t('Check here if you want the theme to use the default shortcut icon.'));
$group .= form_textfield(t('Path to custom icon'), "$var][favicon_path", $settings['favicon_path'], 50, 128, t('The path to the image file you would like to use as your custom shortcut icon.'));
$group .= form_textfield(t('Path to custom icon'), "$var][favicon_path", $settings['favicon_path'], 60, 128, t('The path to the image file you would like to use as your custom shortcut icon.'));
file_check_directory(variable_get('file_directory_path', 'files'), FILE_CREATE_DIRECTORY, 'file_directory_path');
$group .= form_file(t('Upload icon image'), 'favicon_upload', 40, t("If you don't have direct file access to the server, use this field to upload your shortcut icon."));

View File

@ -114,9 +114,9 @@ function taxonomy_form_vocabulary($edit = array()) {
$nodes[$type] = $node_type ? $node_type : $type;
}
$form .= form_textfield(t('Vocabulary name'), 'name', $edit['name'], 50, 64, t('The name for this vocabulary. Example: "Topic".'), NULL, TRUE);
$form .= form_textfield(t('Vocabulary name'), 'name', $edit['name'], 60, 64, t('The name for this vocabulary. Example: "Topic".'), NULL, TRUE);
$form .= form_textarea(t('Description'), 'description', $edit['description'], 60, 5, t('Description of the vocabulary; can be used by modules.'));
$form .= form_textfield(t('Help text'), 'help', $edit['help'], 50, 255, t('Instructions to present to the user when choosing a term.'));
$form .= form_textfield(t('Help text'), 'help', $edit['help'], 60, 255, t('Instructions to present to the user when choosing a term.'));
$form .= form_checkboxes(t('Types'), 'nodes', $edit['nodes'], $nodes, t('A list of node types you want to associate with this vocabulary.'), NULL, TRUE);
$form .= form_radios(t('Hierarchy'), 'hierarchy', $edit['hierarchy'], array(t('Disabled'), t('Single'), t('Multiple')), t('Allows <a href="%help-url">a tree-like hierarchy</a> between terms of this vocabulary.', array('%help-url' => url('admin/help/taxonomy', NULL, NULL, 'hierarchy'))));
$form .= form_checkbox(t('Related terms'), 'relations', 1, $edit['relations'], t('Allows <a href="%help-url">related terms</a> in this vocabulary.', array('%help-url' => url('admin/help/taxonomy', NULL, NULL, 'related-terms'))));
@ -204,7 +204,7 @@ function taxonomy_form_term($edit = array()) {
$vocabulary_id = isset($edit['vid']) ? $edit['vid'] : arg(4);
$vocabulary = taxonomy_get_vocabulary($vocabulary_id);
$form = form_textfield(t('Term name'), 'name', $edit['name'], 50, 64, t('The name for this term. Example: "Linux".'), NULL, TRUE);
$form = form_textfield(t('Term name'), 'name', $edit['name'], 60, 64, t('The name for this term. Example: "Linux".'), NULL, TRUE);
$form .= form_textarea(t('Description'), 'description', $edit['description'], 60, 5, t('A description of the term.'));
if ($vocabulary->hierarchy) {
@ -229,7 +229,7 @@ function taxonomy_form_term($edit = array()) {
$form .= _taxonomy_term_select(t('Related terms'), 'relations', array_keys(taxonomy_get_related($edit['tid'])), $vocabulary_id, NULL, 1, '<'. t('none') .'>', array($edit['tid']));
}
$form .= form_textarea(t('Synonyms'), 'synonyms', implode("\n", taxonomy_get_synonyms($edit['tid'])), 30, 5, t('<a href="%help-url">Synonyms</a> of this term, one synonym per line.', array('%help-url' => url('admin/help/taxonomy', NULL, NULL, 'synonyms'))));
$form .= form_textarea(t('Synonyms'), 'synonyms', implode("\n", taxonomy_get_synonyms($edit['tid'])), 60, 5, t('<a href="%help-url">Synonyms</a> of this term, one synonym per line.', array('%help-url' => url('admin/help/taxonomy', NULL, NULL, 'synonyms'))));
$form .= form_weight(t('Weight'), 'weight', $edit['weight'], 10, t('In listings, the heavier terms will sink and the lighter terms will be positioned nearer the top.'));
$form .= form_hidden('vid', $vocabulary->vid);
$form .= form_submit(t('Submit'));
@ -524,7 +524,7 @@ function taxonomy_node_form($type, $node = '', $help = NULL, $name = 'taxonomy')
}
}
$typed_string = implode(', ', $typed_terms) . (array_key_exists('tags', $terms) ? $terms['tags'][$vocabulary->vid] : NULL);
$result[] = form_autocomplete($vocabulary->name, "$name][tags][". $vocabulary->vid, $typed_string, 50, 100, 'taxonomy/autocomplete/'. $vocabulary->vid, t('A comma-separated list of terms describing this content (Example: funny, bungie jumping, "Company, Inc.").'), NULL, ($vocabulary->required ? TRUE : FALSE));
$result[] = form_autocomplete($vocabulary->name, "$name][tags][". $vocabulary->vid, $typed_string, 60, 100, 'taxonomy/autocomplete/'. $vocabulary->vid, t('A comma-separated list of terms describing this content (Example: funny, bungie jumping, "Company, Inc.").'), NULL, ($vocabulary->required ? TRUE : FALSE));
}
else {
$ntterms = array_key_exists('taxonomy', $node) ? $terms : array_keys($terms);

View File

@ -114,9 +114,9 @@ function taxonomy_form_vocabulary($edit = array()) {
$nodes[$type] = $node_type ? $node_type : $type;
}
$form .= form_textfield(t('Vocabulary name'), 'name', $edit['name'], 50, 64, t('The name for this vocabulary. Example: "Topic".'), NULL, TRUE);
$form .= form_textfield(t('Vocabulary name'), 'name', $edit['name'], 60, 64, t('The name for this vocabulary. Example: "Topic".'), NULL, TRUE);
$form .= form_textarea(t('Description'), 'description', $edit['description'], 60, 5, t('Description of the vocabulary; can be used by modules.'));
$form .= form_textfield(t('Help text'), 'help', $edit['help'], 50, 255, t('Instructions to present to the user when choosing a term.'));
$form .= form_textfield(t('Help text'), 'help', $edit['help'], 60, 255, t('Instructions to present to the user when choosing a term.'));
$form .= form_checkboxes(t('Types'), 'nodes', $edit['nodes'], $nodes, t('A list of node types you want to associate with this vocabulary.'), NULL, TRUE);
$form .= form_radios(t('Hierarchy'), 'hierarchy', $edit['hierarchy'], array(t('Disabled'), t('Single'), t('Multiple')), t('Allows <a href="%help-url">a tree-like hierarchy</a> between terms of this vocabulary.', array('%help-url' => url('admin/help/taxonomy', NULL, NULL, 'hierarchy'))));
$form .= form_checkbox(t('Related terms'), 'relations', 1, $edit['relations'], t('Allows <a href="%help-url">related terms</a> in this vocabulary.', array('%help-url' => url('admin/help/taxonomy', NULL, NULL, 'related-terms'))));
@ -204,7 +204,7 @@ function taxonomy_form_term($edit = array()) {
$vocabulary_id = isset($edit['vid']) ? $edit['vid'] : arg(4);
$vocabulary = taxonomy_get_vocabulary($vocabulary_id);
$form = form_textfield(t('Term name'), 'name', $edit['name'], 50, 64, t('The name for this term. Example: "Linux".'), NULL, TRUE);
$form = form_textfield(t('Term name'), 'name', $edit['name'], 60, 64, t('The name for this term. Example: "Linux".'), NULL, TRUE);
$form .= form_textarea(t('Description'), 'description', $edit['description'], 60, 5, t('A description of the term.'));
if ($vocabulary->hierarchy) {
@ -229,7 +229,7 @@ function taxonomy_form_term($edit = array()) {
$form .= _taxonomy_term_select(t('Related terms'), 'relations', array_keys(taxonomy_get_related($edit['tid'])), $vocabulary_id, NULL, 1, '<'. t('none') .'>', array($edit['tid']));
}
$form .= form_textarea(t('Synonyms'), 'synonyms', implode("\n", taxonomy_get_synonyms($edit['tid'])), 30, 5, t('<a href="%help-url">Synonyms</a> of this term, one synonym per line.', array('%help-url' => url('admin/help/taxonomy', NULL, NULL, 'synonyms'))));
$form .= form_textarea(t('Synonyms'), 'synonyms', implode("\n", taxonomy_get_synonyms($edit['tid'])), 60, 5, t('<a href="%help-url">Synonyms</a> of this term, one synonym per line.', array('%help-url' => url('admin/help/taxonomy', NULL, NULL, 'synonyms'))));
$form .= form_weight(t('Weight'), 'weight', $edit['weight'], 10, t('In listings, the heavier terms will sink and the lighter terms will be positioned nearer the top.'));
$form .= form_hidden('vid', $vocabulary->vid);
$form .= form_submit(t('Submit'));
@ -524,7 +524,7 @@ function taxonomy_node_form($type, $node = '', $help = NULL, $name = 'taxonomy')
}
}
$typed_string = implode(', ', $typed_terms) . (array_key_exists('tags', $terms) ? $terms['tags'][$vocabulary->vid] : NULL);
$result[] = form_autocomplete($vocabulary->name, "$name][tags][". $vocabulary->vid, $typed_string, 50, 100, 'taxonomy/autocomplete/'. $vocabulary->vid, t('A comma-separated list of terms describing this content (Example: funny, bungie jumping, "Company, Inc.").'), NULL, ($vocabulary->required ? TRUE : FALSE));
$result[] = form_autocomplete($vocabulary->name, "$name][tags][". $vocabulary->vid, $typed_string, 60, 100, 'taxonomy/autocomplete/'. $vocabulary->vid, t('A comma-separated list of terms describing this content (Example: funny, bungie jumping, "Company, Inc.").'), NULL, ($vocabulary->required ? TRUE : FALSE));
}
else {
$ntterms = array_key_exists('taxonomy', $node) ? $terms : array_keys($terms);

View File

@ -83,8 +83,8 @@ function upload_menu($may_cache) {
function upload_admin() {
system_settings_save();
$group .= form_textfield(t('Maximum total file size'), 'upload_maxsize_total', variable_get('upload_maxsize_total', 0), 10, 10, t('The maximum size of a file a user can upload in megabytes. Enter 0 for unlimited.'));
$group .= form_textfield(t('Maximum resolution for uploaded images'), 'upload_max_resolution', variable_get('upload_max_resolution', 0), 10, 10, t('The maximum allowed image size expressed as WIDTHxHEIGHT (e.g. 640x480). Set to 0 for no restriction.'));
$group .= form_textfield(t('Maximum total file size'), 'upload_maxsize_total', variable_get('upload_maxsize_total', 0), 15, 10, t('The maximum size of a file a user can upload in megabytes. Enter 0 for unlimited.'));
$group .= form_textfield(t('Maximum resolution for uploaded images'), 'upload_max_resolution', variable_get('upload_max_resolution', 0), 15, 10, t('The maximum allowed image size expressed as WIDTHxHEIGHT (e.g. 640x480). Set to 0 for no restriction.'));
$output = form_group(t('General settings'), $group);

View File

@ -83,8 +83,8 @@ function upload_menu($may_cache) {
function upload_admin() {
system_settings_save();
$group .= form_textfield(t('Maximum total file size'), 'upload_maxsize_total', variable_get('upload_maxsize_total', 0), 10, 10, t('The maximum size of a file a user can upload in megabytes. Enter 0 for unlimited.'));
$group .= form_textfield(t('Maximum resolution for uploaded images'), 'upload_max_resolution', variable_get('upload_max_resolution', 0), 10, 10, t('The maximum allowed image size expressed as WIDTHxHEIGHT (e.g. 640x480). Set to 0 for no restriction.'));
$group .= form_textfield(t('Maximum total file size'), 'upload_maxsize_total', variable_get('upload_maxsize_total', 0), 15, 10, t('The maximum size of a file a user can upload in megabytes. Enter 0 for unlimited.'));
$group .= form_textfield(t('Maximum resolution for uploaded images'), 'upload_max_resolution', variable_get('upload_max_resolution', 0), 15, 10, t('The maximum allowed image size expressed as WIDTHxHEIGHT (e.g. 640x480). Set to 0 for no restriction.'));
$output = form_group(t('General settings'), $group);

View File

@ -1104,8 +1104,8 @@ function user_register($edit = array()) {
function user_edit_form($uid, $edit) {
// Account information:
$group = form_textfield(t('Username'), 'name', $edit['name'], 30, 55, t('Your full name or your preferred username: only letters, numbers and spaces are allowed.'), NULL, TRUE);
$group .= form_textfield(t('E-mail address'), 'mail', $edit['mail'], 30, 55, t('Insert a valid e-mail address. All e-mails from the system will be sent to this address. The e-mail address is not made public and will only be used if you wish to receive a new password or wish to receive certain news or notifications by e-mail.'), NULL, TRUE);
$group = form_textfield(t('Username'), 'name', $edit['name'], 60, 55, t('Your full name or your preferred username: only letters, numbers and spaces are allowed.'), NULL, TRUE);
$group .= form_textfield(t('E-mail address'), 'mail', $edit['mail'], 60, 55, t('Insert a valid e-mail address. All e-mails from the system will be sent to this address. The e-mail address is not made public and will only be used if you wish to receive a new password or wish to receive certain news or notifications by e-mail.'), NULL, TRUE);
$group .= form_item(t('Password'), '<input type="password" class="form-password" name="edit[pass1]" size="12" maxlength="24" /> <input type="password" class="form-password" name="edit[pass2]" size="12" maxlength="24" />', t('Enter your new password twice if you want to change your current password, or leave it blank if you are happy with your current password.'), NULL, TRUE);
if (user_access('administer users')) {
@ -1340,27 +1340,27 @@ function _user_mail_text($messageid, $variables = array()) {
function user_configure_settings() {
// User registration settings.
$group = form_radios(t('Public registrations'), 'user_register', variable_get('user_register', 1), array(t('Only site administrators can create new user accounts.'), t('Visitors can create accounts and no administrator approval is required.'), t('Visitors can create accounts but administrator approval is required.')));
$group .= form_textarea(t('User registration guidelines'), 'user_registration_help', variable_get('user_registration_help', ''), 70, 4, t('This text is displayed at the top of the user registration form. It\'s useful for helping or instructing your users.'));
$group .= form_textarea(t('User registration guidelines'), 'user_registration_help', variable_get('user_registration_help', ''), 60, 5, t('This text is displayed at the top of the user registration form. It\'s useful for helping or instructing your users.'));
$output = form_group(t('User registration settings'), $group);
// User e-mail settings.
$group = form_textfield(t('Subject of welcome e-mail'), 'user_mail_welcome_subject', _user_mail_text('welcome_subject'), 70, 180, t('Customize the subject of your welcome e-mail, which is sent to new members upon registering.') .' '. t('Available variables are:') .' %username, %site, %password, %uri, %uri_brief, %mailto, %date, %login_uri, %edit_uri, %login_url.');
$group .= form_textarea(t('Body of welcome e-mail'), 'user_mail_welcome_body', _user_mail_text('welcome_body'), 70, 10, t('Customize the body of the welcome e-mail, which is sent to new members upon registering.') .' '. t('Available variables are:') .' %username, %site, %password, %uri, %uri_brief, %mailto, %login_uri, %edit_uri, %login_url.');
$group .= form_textfield(t('Subject of welcome e-mail (awaiting admin approval)'), 'user_mail_approval_subject', _user_mail_text('approval_subject'), 70, 180, t('Customize the subject of your awaiting approval welcome e-mail, which is sent to new members upon registering.') .' '. t('Available variables are:') .' %username, %site, %password, %uri, %uri_brief, %mailto, %date, %login_uri, %edit_uri, %login_url.');
$group .= form_textarea(t('Body of welcome e-mail (awaiting admin approval)'), 'user_mail_approval_body', _user_mail_text('approval_body'), 70, 10, t('Customize the body of the awaiting approval welcome e-mail, which is sent to new members upon registering.') .' '. t('Available variables are:') .' %username, %site, %password, %uri, %uri_brief, %mailto, %login_uri, %edit_uri, %login_url.');
$group .= form_textfield(t('Subject of password recovery e-mail'), 'user_mail_pass_subject', _user_mail_text('pass_subject'), 70, 180, t('Customize the Subject of your forgotten password e-mail.') .' '. t('Available variables are:') .' %username, %site, %login_url, %uri, %uri_brief, %mailto, %date, %login_uri, %edit_uri.');
$group .= form_textarea(t('Body of password recovery e-mail'), 'user_mail_pass_body', _user_mail_text('pass_body'), 70, 10, t('Customize the body of the forgotten password e-mail.') .' '. t('Available variables are:') .' %username, %site, %login_url, %uri, %uri_brief, %mailto, %login_uri, %edit_uri.');
$group = form_textfield(t('Subject of welcome e-mail'), 'user_mail_welcome_subject', _user_mail_text('welcome_subject'), 60, 180, t('Customize the subject of your welcome e-mail, which is sent to new members upon registering.') .' '. t('Available variables are:') .' %username, %site, %password, %uri, %uri_brief, %mailto, %date, %login_uri, %edit_uri, %login_url.');
$group .= form_textarea(t('Body of welcome e-mail'), 'user_mail_welcome_body', _user_mail_text('welcome_body'), 60, 15, t('Customize the body of the welcome e-mail, which is sent to new members upon registering.') .' '. t('Available variables are:') .' %username, %site, %password, %uri, %uri_brief, %mailto, %login_uri, %edit_uri, %login_url.');
$group .= form_textfield(t('Subject of welcome e-mail (awaiting admin approval)'), 'user_mail_approval_subject', _user_mail_text('approval_subject'), 50, 180, t('Customize the subject of your awaiting approval welcome e-mail, which is sent to new members upon registering.') .' '. t('Available variables are:') .' %username, %site, %password, %uri, %uri_brief, %mailto, %date, %login_uri, %edit_uri, %login_url.');
$group .= form_textarea(t('Body of welcome e-mail (awaiting admin approval)'), 'user_mail_approval_body', _user_mail_text('approval_body'), 60, 15, t('Customize the body of the awaiting approval welcome e-mail, which is sent to new members upon registering.') .' '. t('Available variables are:') .' %username, %site, %password, %uri, %uri_brief, %mailto, %login_uri, %edit_uri, %login_url.');
$group .= form_textfield(t('Subject of password recovery e-mail'), 'user_mail_pass_subject', _user_mail_text('pass_subject'), 60, 180, t('Customize the Subject of your forgotten password e-mail.') .' '. t('Available variables are:') .' %username, %site, %login_url, %uri, %uri_brief, %mailto, %date, %login_uri, %edit_uri.');
$group .= form_textarea(t('Body of password recovery e-mail'), 'user_mail_pass_body', _user_mail_text('pass_body'), 60, 15, t('Customize the body of the forgotten password e-mail.') .' '. t('Available variables are:') .' %username, %site, %login_url, %uri, %uri_brief, %mailto, %login_uri, %edit_uri.');
$output .= form_group(t('User email settings'), $group);
// Picture settings.
file_check_directory(file_create_path(variable_get('user_picture_path', 'pictures')), 1, 'user_picture_path');
$group = form_radios(t('Picture support'), 'user_pictures', variable_get('user_pictures', 0), array(t('Disabled'), t('Enabled')), t('Enable picture support.'));
$group .= form_textfield(t('Picture image path'), 'user_picture_path', variable_get('user_picture_path', 'pictures'), 45, 255, t('Subdirectory in the directory "%dir" where pictures will be stored.', array('%dir' => variable_get('file_directory_path', 'files') .'/')));
$group .= form_textfield(t('Default picture'), 'user_picture_default', variable_get('user_picture_default', ''), 45, 255, t('URL of picture to display for users with no custom picture selected. Leave blank for none.'));
$group .= form_textfield(t('Picture maximum dimensions'), 'user_picture_dimensions', variable_get('user_picture_dimensions', '85x85'), 10, 10, t('Maximum dimensions for pictures.'));
$group .= form_textfield(t('Picture maximum file size'), 'user_picture_file_size', variable_get('user_picture_file_size', '30'), 10, 10, t('Maximum file size for pictures, in kB.'));
$group .= form_textarea(t('Picture guidelines'), 'user_picture_guidelines', variable_get('user_picture_guidelines', ''), 70, 4, t('This text is displayed at the picture upload form in addition to the default guidelines. It\'s useful for helping or instructing your users.'));
$group .= form_textfield(t('Picture image path'), 'user_picture_path', variable_get('user_picture_path', 'pictures'), 30, 255, t('Subdirectory in the directory "%dir" where pictures will be stored.', array('%dir' => variable_get('file_directory_path', 'files') .'/')));
$group .= form_textfield(t('Default picture'), 'user_picture_default', variable_get('user_picture_default', ''), 30, 255, t('URL of picture to display for users with no custom picture selected. Leave blank for none.'));
$group .= form_textfield(t('Picture maximum dimensions'), 'user_picture_dimensions', variable_get('user_picture_dimensions', '85x85'), 15, 10, t('Maximum dimensions for pictures.'));
$group .= form_textfield(t('Picture maximum file size'), 'user_picture_file_size', variable_get('user_picture_file_size', '30'), 15, 10, t('Maximum file size for pictures, in kB.'));
$group .= form_textarea(t('Picture guidelines'), 'user_picture_guidelines', variable_get('user_picture_guidelines', ''), 60, 5, t('This text is displayed at the picture upload form in addition to the default guidelines. It\'s useful for helping or instructing your users.'));
$output .= form_group(t('Pictures'), $group);
@ -1413,17 +1413,17 @@ function user_admin_access_check() {
}
}
$form = form_textfield('', 'test', '', 32, 64, t('Enter a username to check if it will be denied or allowed.'));
$form = form_textfield('', 'test', '', 30, 64, t('Enter a username to check if it will be denied or allowed.'));
$form .= form_hidden('type', 'user');
$form .= form_submit(t('Check username'));
$output .= form_group(t('Username'), form($form));
$form = form_textfield('', 'test', '', 32, 64, t('Enter an e-mail address to check if it will be denied or allowed.'));
$form = form_textfield('', 'test', '', 30, 64, t('Enter an e-mail address to check if it will be denied or allowed.'));
$form .= form_hidden('type', 'mail');
$form .= form_submit(t('Check e-mail'));
$output .= form_group(t('E-mail'), form($form));
$form = form_textfield('', 'test', '', 32, 64, t('Enter a host to check if it will be denied or allowed.'));
$form = form_textfield('', 'test', '', 30, 64, t('Enter a host to check if it will be denied or allowed.'));
$form .= form_hidden('type', 'host');
$form .= form_submit(t('Check host'));
$output .= form_group(t('Host'), form($form));
@ -1506,7 +1506,7 @@ function user_admin_access_edit($aid = 0) {
function _user_admin_access_form($edit) {
$output = '<div class="access-type">'. form_radios(t('Access type'), 'status', $edit['status'], array('1' => t('Allow'), '0' => t('Deny'))) .'</div>';
$output .= '<div class="rule-type">'. form_radios(t('Rule type'), 'type', $edit['type'] ? $edit['type'] : 'user', array('user' => t('Username'), 'mail' => t('E-mail'), 'host' => t('Host'))) .'</div>';
$output .= '<div class="mask">'. form_textfield(t('Mask'), 'mask', $edit['mask'], 32, 64, '%: '. t('Matches any number of characters, even zero characters') .'.<br />_: '. t('Matches exactly one character.'), NULL, TRUE) .'</div>';
$output .= '<div class="mask">'. form_textfield(t('Mask'), 'mask', $edit['mask'], 30, 64, '%: '. t('Matches any number of characters, even zero characters') .'.<br />_: '. t('Matches exactly one character.'), NULL, TRUE) .'</div>';
return $output;
}
@ -1668,7 +1668,7 @@ function user_admin_role() {
// Display the role form.
$role = db_fetch_object(db_query('SELECT * FROM {role} WHERE rid = %d', $id));
$output .= form_textfield(t('Role name'), 'name', $role->name, 32, 64, t('The name for this role. Example: "moderator", "editorial board", "site architect".'));
$output .= form_textfield(t('Role name'), 'name', $role->name, 30, 64, t('The name for this role. Example: "moderator", "editorial board", "site architect".'));
$output .= form_submit(t('Save role'));
$output .= form_submit(t('Delete role'));

View File

@ -1104,8 +1104,8 @@ function user_register($edit = array()) {
function user_edit_form($uid, $edit) {
// Account information:
$group = form_textfield(t('Username'), 'name', $edit['name'], 30, 55, t('Your full name or your preferred username: only letters, numbers and spaces are allowed.'), NULL, TRUE);
$group .= form_textfield(t('E-mail address'), 'mail', $edit['mail'], 30, 55, t('Insert a valid e-mail address. All e-mails from the system will be sent to this address. The e-mail address is not made public and will only be used if you wish to receive a new password or wish to receive certain news or notifications by e-mail.'), NULL, TRUE);
$group = form_textfield(t('Username'), 'name', $edit['name'], 60, 55, t('Your full name or your preferred username: only letters, numbers and spaces are allowed.'), NULL, TRUE);
$group .= form_textfield(t('E-mail address'), 'mail', $edit['mail'], 60, 55, t('Insert a valid e-mail address. All e-mails from the system will be sent to this address. The e-mail address is not made public and will only be used if you wish to receive a new password or wish to receive certain news or notifications by e-mail.'), NULL, TRUE);
$group .= form_item(t('Password'), '<input type="password" class="form-password" name="edit[pass1]" size="12" maxlength="24" /> <input type="password" class="form-password" name="edit[pass2]" size="12" maxlength="24" />', t('Enter your new password twice if you want to change your current password, or leave it blank if you are happy with your current password.'), NULL, TRUE);
if (user_access('administer users')) {
@ -1340,27 +1340,27 @@ function _user_mail_text($messageid, $variables = array()) {
function user_configure_settings() {
// User registration settings.
$group = form_radios(t('Public registrations'), 'user_register', variable_get('user_register', 1), array(t('Only site administrators can create new user accounts.'), t('Visitors can create accounts and no administrator approval is required.'), t('Visitors can create accounts but administrator approval is required.')));
$group .= form_textarea(t('User registration guidelines'), 'user_registration_help', variable_get('user_registration_help', ''), 70, 4, t('This text is displayed at the top of the user registration form. It\'s useful for helping or instructing your users.'));
$group .= form_textarea(t('User registration guidelines'), 'user_registration_help', variable_get('user_registration_help', ''), 60, 5, t('This text is displayed at the top of the user registration form. It\'s useful for helping or instructing your users.'));
$output = form_group(t('User registration settings'), $group);
// User e-mail settings.
$group = form_textfield(t('Subject of welcome e-mail'), 'user_mail_welcome_subject', _user_mail_text('welcome_subject'), 70, 180, t('Customize the subject of your welcome e-mail, which is sent to new members upon registering.') .' '. t('Available variables are:') .' %username, %site, %password, %uri, %uri_brief, %mailto, %date, %login_uri, %edit_uri, %login_url.');
$group .= form_textarea(t('Body of welcome e-mail'), 'user_mail_welcome_body', _user_mail_text('welcome_body'), 70, 10, t('Customize the body of the welcome e-mail, which is sent to new members upon registering.') .' '. t('Available variables are:') .' %username, %site, %password, %uri, %uri_brief, %mailto, %login_uri, %edit_uri, %login_url.');
$group .= form_textfield(t('Subject of welcome e-mail (awaiting admin approval)'), 'user_mail_approval_subject', _user_mail_text('approval_subject'), 70, 180, t('Customize the subject of your awaiting approval welcome e-mail, which is sent to new members upon registering.') .' '. t('Available variables are:') .' %username, %site, %password, %uri, %uri_brief, %mailto, %date, %login_uri, %edit_uri, %login_url.');
$group .= form_textarea(t('Body of welcome e-mail (awaiting admin approval)'), 'user_mail_approval_body', _user_mail_text('approval_body'), 70, 10, t('Customize the body of the awaiting approval welcome e-mail, which is sent to new members upon registering.') .' '. t('Available variables are:') .' %username, %site, %password, %uri, %uri_brief, %mailto, %login_uri, %edit_uri, %login_url.');
$group .= form_textfield(t('Subject of password recovery e-mail'), 'user_mail_pass_subject', _user_mail_text('pass_subject'), 70, 180, t('Customize the Subject of your forgotten password e-mail.') .' '. t('Available variables are:') .' %username, %site, %login_url, %uri, %uri_brief, %mailto, %date, %login_uri, %edit_uri.');
$group .= form_textarea(t('Body of password recovery e-mail'), 'user_mail_pass_body', _user_mail_text('pass_body'), 70, 10, t('Customize the body of the forgotten password e-mail.') .' '. t('Available variables are:') .' %username, %site, %login_url, %uri, %uri_brief, %mailto, %login_uri, %edit_uri.');
$group = form_textfield(t('Subject of welcome e-mail'), 'user_mail_welcome_subject', _user_mail_text('welcome_subject'), 60, 180, t('Customize the subject of your welcome e-mail, which is sent to new members upon registering.') .' '. t('Available variables are:') .' %username, %site, %password, %uri, %uri_brief, %mailto, %date, %login_uri, %edit_uri, %login_url.');
$group .= form_textarea(t('Body of welcome e-mail'), 'user_mail_welcome_body', _user_mail_text('welcome_body'), 60, 15, t('Customize the body of the welcome e-mail, which is sent to new members upon registering.') .' '. t('Available variables are:') .' %username, %site, %password, %uri, %uri_brief, %mailto, %login_uri, %edit_uri, %login_url.');
$group .= form_textfield(t('Subject of welcome e-mail (awaiting admin approval)'), 'user_mail_approval_subject', _user_mail_text('approval_subject'), 50, 180, t('Customize the subject of your awaiting approval welcome e-mail, which is sent to new members upon registering.') .' '. t('Available variables are:') .' %username, %site, %password, %uri, %uri_brief, %mailto, %date, %login_uri, %edit_uri, %login_url.');
$group .= form_textarea(t('Body of welcome e-mail (awaiting admin approval)'), 'user_mail_approval_body', _user_mail_text('approval_body'), 60, 15, t('Customize the body of the awaiting approval welcome e-mail, which is sent to new members upon registering.') .' '. t('Available variables are:') .' %username, %site, %password, %uri, %uri_brief, %mailto, %login_uri, %edit_uri, %login_url.');
$group .= form_textfield(t('Subject of password recovery e-mail'), 'user_mail_pass_subject', _user_mail_text('pass_subject'), 60, 180, t('Customize the Subject of your forgotten password e-mail.') .' '. t('Available variables are:') .' %username, %site, %login_url, %uri, %uri_brief, %mailto, %date, %login_uri, %edit_uri.');
$group .= form_textarea(t('Body of password recovery e-mail'), 'user_mail_pass_body', _user_mail_text('pass_body'), 60, 15, t('Customize the body of the forgotten password e-mail.') .' '. t('Available variables are:') .' %username, %site, %login_url, %uri, %uri_brief, %mailto, %login_uri, %edit_uri.');
$output .= form_group(t('User email settings'), $group);
// Picture settings.
file_check_directory(file_create_path(variable_get('user_picture_path', 'pictures')), 1, 'user_picture_path');
$group = form_radios(t('Picture support'), 'user_pictures', variable_get('user_pictures', 0), array(t('Disabled'), t('Enabled')), t('Enable picture support.'));
$group .= form_textfield(t('Picture image path'), 'user_picture_path', variable_get('user_picture_path', 'pictures'), 45, 255, t('Subdirectory in the directory "%dir" where pictures will be stored.', array('%dir' => variable_get('file_directory_path', 'files') .'/')));
$group .= form_textfield(t('Default picture'), 'user_picture_default', variable_get('user_picture_default', ''), 45, 255, t('URL of picture to display for users with no custom picture selected. Leave blank for none.'));
$group .= form_textfield(t('Picture maximum dimensions'), 'user_picture_dimensions', variable_get('user_picture_dimensions', '85x85'), 10, 10, t('Maximum dimensions for pictures.'));
$group .= form_textfield(t('Picture maximum file size'), 'user_picture_file_size', variable_get('user_picture_file_size', '30'), 10, 10, t('Maximum file size for pictures, in kB.'));
$group .= form_textarea(t('Picture guidelines'), 'user_picture_guidelines', variable_get('user_picture_guidelines', ''), 70, 4, t('This text is displayed at the picture upload form in addition to the default guidelines. It\'s useful for helping or instructing your users.'));
$group .= form_textfield(t('Picture image path'), 'user_picture_path', variable_get('user_picture_path', 'pictures'), 30, 255, t('Subdirectory in the directory "%dir" where pictures will be stored.', array('%dir' => variable_get('file_directory_path', 'files') .'/')));
$group .= form_textfield(t('Default picture'), 'user_picture_default', variable_get('user_picture_default', ''), 30, 255, t('URL of picture to display for users with no custom picture selected. Leave blank for none.'));
$group .= form_textfield(t('Picture maximum dimensions'), 'user_picture_dimensions', variable_get('user_picture_dimensions', '85x85'), 15, 10, t('Maximum dimensions for pictures.'));
$group .= form_textfield(t('Picture maximum file size'), 'user_picture_file_size', variable_get('user_picture_file_size', '30'), 15, 10, t('Maximum file size for pictures, in kB.'));
$group .= form_textarea(t('Picture guidelines'), 'user_picture_guidelines', variable_get('user_picture_guidelines', ''), 60, 5, t('This text is displayed at the picture upload form in addition to the default guidelines. It\'s useful for helping or instructing your users.'));
$output .= form_group(t('Pictures'), $group);
@ -1413,17 +1413,17 @@ function user_admin_access_check() {
}
}
$form = form_textfield('', 'test', '', 32, 64, t('Enter a username to check if it will be denied or allowed.'));
$form = form_textfield('', 'test', '', 30, 64, t('Enter a username to check if it will be denied or allowed.'));
$form .= form_hidden('type', 'user');
$form .= form_submit(t('Check username'));
$output .= form_group(t('Username'), form($form));
$form = form_textfield('', 'test', '', 32, 64, t('Enter an e-mail address to check if it will be denied or allowed.'));
$form = form_textfield('', 'test', '', 30, 64, t('Enter an e-mail address to check if it will be denied or allowed.'));
$form .= form_hidden('type', 'mail');
$form .= form_submit(t('Check e-mail'));
$output .= form_group(t('E-mail'), form($form));
$form = form_textfield('', 'test', '', 32, 64, t('Enter a host to check if it will be denied or allowed.'));
$form = form_textfield('', 'test', '', 30, 64, t('Enter a host to check if it will be denied or allowed.'));
$form .= form_hidden('type', 'host');
$form .= form_submit(t('Check host'));
$output .= form_group(t('Host'), form($form));
@ -1506,7 +1506,7 @@ function user_admin_access_edit($aid = 0) {
function _user_admin_access_form($edit) {
$output = '<div class="access-type">'. form_radios(t('Access type'), 'status', $edit['status'], array('1' => t('Allow'), '0' => t('Deny'))) .'</div>';
$output .= '<div class="rule-type">'. form_radios(t('Rule type'), 'type', $edit['type'] ? $edit['type'] : 'user', array('user' => t('Username'), 'mail' => t('E-mail'), 'host' => t('Host'))) .'</div>';
$output .= '<div class="mask">'. form_textfield(t('Mask'), 'mask', $edit['mask'], 32, 64, '%: '. t('Matches any number of characters, even zero characters') .'.<br />_: '. t('Matches exactly one character.'), NULL, TRUE) .'</div>';
$output .= '<div class="mask">'. form_textfield(t('Mask'), 'mask', $edit['mask'], 30, 64, '%: '. t('Matches any number of characters, even zero characters') .'.<br />_: '. t('Matches exactly one character.'), NULL, TRUE) .'</div>';
return $output;
}
@ -1668,7 +1668,7 @@ function user_admin_role() {
// Display the role form.
$role = db_fetch_object(db_query('SELECT * FROM {role} WHERE rid = %d', $id));
$output .= form_textfield(t('Role name'), 'name', $role->name, 32, 64, t('The name for this role. Example: "moderator", "editorial board", "site architect".'));
$output .= form_textfield(t('Role name'), 'name', $role->name, 30, 64, t('The name for this role. Example: "moderator", "editorial board", "site architect".'));
$output .= form_submit(t('Save role'));
$output .= form_submit(t('Delete role'));