Commit a1ae4da7 authored by Dries's avatar Dries

- Removing tabs and trailing whitespaces.

parent e19af57a
......@@ -997,7 +997,7 @@ function url($path = NULL, $query = NULL, $fragment = NULL, $absolute = FALSE) {
// Apache.
$script = (strpos($_SERVER['SERVER_SOFTWARE'], 'Apache') === false) ? 'index.php' : '';
}
$path = drupal_get_path_alias($path);
if (isset($fragment)) {
......
......@@ -51,7 +51,7 @@ function _locale_admin_manage_screen() {
$isdefault = $key;
}
if ($key == 'en') {
$form['name']['en'] = array(type => 'markup', value => check_plain($lang));
$form['name']['en'] = array(type => 'markup', value => check_plain($lang));
}
else {
$original = db_fetch_object(db_query("SELECT COUNT(*) AS strings FROM {locales_source}"));
......@@ -66,7 +66,7 @@ function _locale_admin_manage_screen() {
$form['enabled'] = array(type => 'checkboxes', options => $options, default_value => $enabled, return_value => 1);
$form['sitedefault'] = array(type => 'radios', options => $options, default_value => $isdefault, return_value => 1);
$form['submit'] = array(type => 'submit', value => t('Save configuration'));
return drupal_get_form('_locale_admin_manage_screen', $form);
}
......@@ -979,15 +979,15 @@ function _locale_string_edit($lid) {
$form = array();
while ($translation = db_fetch_object($result)) {
$orig = $translation->source;
$form[$translation->locale] = (strlen($orig) > 40) ?
$form[$translation->locale] = (strlen($orig) > 40) ?
array(type => 'textarea', title => $languages['name'][$translation->locale], default_value => $translation->translation, cols => 60, rows => 15)
: array(type => 'textfield', title => $languages['name'][$translation->locale], default_value => $translation->translation, size => 60, maxlength => 128);
unset($languages['name'][$translation->locale]);
}
$form = array(type => 'item', title => t('Original text'), value => wordwrap(check_plain($orig, 0)));
foreach ($languages['name'] as $key => $lang) {
$form[$key] = (strlen($orig) > 40) ?
array(type => 'textarea', title => $lang, cols => 60, rows => 15) :
$form[$key] = (strlen($orig) > 40) ?
array(type => 'textarea', title => $lang, cols => 60, rows => 15) :
array(type => 'textfield', title => $lang, size => 60, maxlength => 128);
}
......
......@@ -74,22 +74,22 @@ function aggregator_settings() {
$form['aggregator_allowed_html_tags'] = array(
type => 'textfield', title => t('Allowed HTML tags'), size => 80, maxlength => 255,
default_value => variable_get('aggregator_allowed_html_tags', '<a> <b> <br> <dd> <dl> <dt> <em> <i> <li> <ol> <p> <strong> <u> <ul>'),
default_value => variable_get('aggregator_allowed_html_tags', '<a> <b> <br> <dd> <dl> <dt> <em> <i> <li> <ol> <p> <strong> <u> <ul>'),
description => t('The list of tags which are allowed in feeds, i.e., which will not be removed by Drupal.')
);
$form['aggregator_summary_items'] = array(
type => 'select', title => t('Items shown in sources and categories pages') ,
default_value => variable_get('aggregator_summary_items', 3), options => $items,
type => 'select', title => t('Items shown in sources and categories pages') ,
default_value => variable_get('aggregator_summary_items', 3), options => $items,
description => t('The number of items which will be shown with each feed or category in the feed and category summary pages.')
);
$form['aggregator_clear'] = array(
type => 'select', title => t('Discard news items older than'),
default_value => variable_get('aggregator_clear', 9676800), options => $period,
type => 'select', title => t('Discard news items older than'),
default_value => variable_get('aggregator_clear', 9676800), options => $period,
description => t('Older news items will be automatically discarded. Requires crontab.')
);
$form['aggregator_category_selector'] = array(
type => 'radios', title => t('Category selection type'), default_value => variable_get('aggregator_category_selector', 'check'),
options => array('check' => t('checkboxes'), 'select' => t('multiple selector')),
......@@ -708,7 +708,7 @@ function aggregator_form_feed($edit = array()) {
$edit['refresh'] = 3600;
}
$form['title'] = array(type => 'textfield', title => t('Title'), default_value => $edit['title'], size => 60, maxlength => 64, description => t('The name of the feed; typically the name of the web site you syndicate content from.'));
$form['url'] = array(type => 'textfield', title => t('URL'), default_value => $edit['url'], size => 60, maxlength => 255, description => t('The fully-qualified URL of the feed.'));
$form['refresh'] = array(type => 'select', title => t('Update interval'), default_value => $edit['refresh'], options => $period, description => t('The refresh interval indicating how often you want to update this feed. Requires crontab.'));
......@@ -985,13 +985,13 @@ function _aggregator_page_list($sql, $op, $header = '') {
}
$done = true;
$form['categories'][$item->iid] = array(
type => variable_get('aggregator_category_selector', 'checkboxes'),
type => variable_get('aggregator_category_selector', 'checkboxes'),
default_value => $selected, options => $categories,
size => 10, multiple => true
);
}
}
$output .= '</div>';
$output .= '</div>';
$form['submit'] = array(type => 'submit', value => t('Save categories'));
$form['pager'] = array(value => theme('pager', NULL, 20, 0));
$output .= $form['pager'][value];
......
......@@ -74,22 +74,22 @@ function aggregator_settings() {
$form['aggregator_allowed_html_tags'] = array(
type => 'textfield', title => t('Allowed HTML tags'), size => 80, maxlength => 255,
default_value => variable_get('aggregator_allowed_html_tags', '<a> <b> <br> <dd> <dl> <dt> <em> <i> <li> <ol> <p> <strong> <u> <ul>'),
default_value => variable_get('aggregator_allowed_html_tags', '<a> <b> <br> <dd> <dl> <dt> <em> <i> <li> <ol> <p> <strong> <u> <ul>'),
description => t('The list of tags which are allowed in feeds, i.e., which will not be removed by Drupal.')
);
$form['aggregator_summary_items'] = array(
type => 'select', title => t('Items shown in sources and categories pages') ,
default_value => variable_get('aggregator_summary_items', 3), options => $items,
type => 'select', title => t('Items shown in sources and categories pages') ,
default_value => variable_get('aggregator_summary_items', 3), options => $items,
description => t('The number of items which will be shown with each feed or category in the feed and category summary pages.')
);
$form['aggregator_clear'] = array(
type => 'select', title => t('Discard news items older than'),
default_value => variable_get('aggregator_clear', 9676800), options => $period,
type => 'select', title => t('Discard news items older than'),
default_value => variable_get('aggregator_clear', 9676800), options => $period,
description => t('Older news items will be automatically discarded. Requires crontab.')
);
$form['aggregator_category_selector'] = array(
type => 'radios', title => t('Category selection type'), default_value => variable_get('aggregator_category_selector', 'check'),
options => array('check' => t('checkboxes'), 'select' => t('multiple selector')),
......@@ -708,7 +708,7 @@ function aggregator_form_feed($edit = array()) {
$edit['refresh'] = 3600;
}
$form['title'] = array(type => 'textfield', title => t('Title'), default_value => $edit['title'], size => 60, maxlength => 64, description => t('The name of the feed; typically the name of the web site you syndicate content from.'));
$form['url'] = array(type => 'textfield', title => t('URL'), default_value => $edit['url'], size => 60, maxlength => 255, description => t('The fully-qualified URL of the feed.'));
$form['refresh'] = array(type => 'select', title => t('Update interval'), default_value => $edit['refresh'], options => $period, description => t('The refresh interval indicating how often you want to update this feed. Requires crontab.'));
......@@ -985,13 +985,13 @@ function _aggregator_page_list($sql, $op, $header = '') {
}
$done = true;
$form['categories'][$item->iid] = array(
type => variable_get('aggregator_category_selector', 'checkboxes'),
type => variable_get('aggregator_category_selector', 'checkboxes'),
default_value => $selected, options => $categories,
size => 10, multiple => true
);
}
}
$output .= '</div>';
$output .= '</div>';
$form['submit'] = array(type => 'submit', value => t('Save categories'));
$form['pager'] = array(value => theme('pager', NULL, 20, 0));
$output .= $form['pager'][value];
......
......@@ -215,7 +215,7 @@ function block_admin_display() {
$form[$block['module']][$block['delta']]['theme'] = array(type => 'hidden', value => $theme_key);
$form[$block['module']][$block['delta']]['weight'] = array(type => 'weight', default_value => $block['weight']);
$form[$block['module']][$block['delta']]['region'] = array(type => 'select', default_value => isset($block['region']) ? $block['region'] : system_default_region(), options => $block_regions);
if ($throttle) {
$form[$block['module']][$block['delta']]['throttle'] = array(type => 'checkbox', default_value => $block['throttle']);
}
......@@ -230,7 +230,7 @@ function block_admin_display() {
}
function theme_block_admin_display($form) {
global $theme_key, $custom_theme;
$throttle = module_exist('throttle');
......@@ -240,7 +240,7 @@ function theme_block_admin_display($form) {
init_theme();
}
$block_regions = system_region_list($theme_key);
// Highlight regions on page, to provide visual reference.
foreach ($block_regions as $key => $value) {
drupal_set_content($key, '<div class="block-region">' . $value . '</div>');
......@@ -270,7 +270,7 @@ function theme_block_admin_display($form) {
}
}
}
$rows = array();
if (count($regions)) {
foreach ($regions as $region => $row) {
......@@ -320,7 +320,7 @@ function block_admin_configure($module = NULL, $delta = 0) {
// Module-specific block configurations.
if ($settings = module_invoke($module, 'block', 'configure', $delta)) {
$form['block_settings'] = array(type => 'fieldset',
$form['block_settings'] = array(type => 'fieldset',
title => t('Block specific settings'),
collapsible => true,
collapsed => false,
......@@ -336,7 +336,7 @@ function block_admin_configure($module = NULL, $delta = 0) {
drupal_set_title(t("'%name' block", array('%name' => $info[$delta]['info'])));
// Standard block configurations.
$form['user_vis_settings'] = array(type => 'fieldset',
title => t('User specific visibility settings'),
collapsible => true,
......@@ -350,7 +350,7 @@ function block_admin_configure($module = NULL, $delta = 0) {
options => 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.'),
default_value => $edit['custom']);
$form['page_vis_settings'] = array(type => 'fieldset',
title => t('Page specific visibility settings'),
collapsible => true,
......
......@@ -215,7 +215,7 @@ function block_admin_display() {
$form[$block['module']][$block['delta']]['theme'] = array(type => 'hidden', value => $theme_key);
$form[$block['module']][$block['delta']]['weight'] = array(type => 'weight', default_value => $block['weight']);
$form[$block['module']][$block['delta']]['region'] = array(type => 'select', default_value => isset($block['region']) ? $block['region'] : system_default_region(), options => $block_regions);
if ($throttle) {
$form[$block['module']][$block['delta']]['throttle'] = array(type => 'checkbox', default_value => $block['throttle']);
}
......@@ -230,7 +230,7 @@ function block_admin_display() {
}
function theme_block_admin_display($form) {
global $theme_key, $custom_theme;
$throttle = module_exist('throttle');
......@@ -240,7 +240,7 @@ function theme_block_admin_display($form) {
init_theme();
}
$block_regions = system_region_list($theme_key);
// Highlight regions on page, to provide visual reference.
foreach ($block_regions as $key => $value) {
drupal_set_content($key, '<div class="block-region">' . $value . '</div>');
......@@ -270,7 +270,7 @@ function theme_block_admin_display($form) {
}
}
}
$rows = array();
if (count($regions)) {
foreach ($regions as $region => $row) {
......@@ -320,7 +320,7 @@ function block_admin_configure($module = NULL, $delta = 0) {
// Module-specific block configurations.
if ($settings = module_invoke($module, 'block', 'configure', $delta)) {
$form['block_settings'] = array(type => 'fieldset',
$form['block_settings'] = array(type => 'fieldset',
title => t('Block specific settings'),
collapsible => true,
collapsed => false,
......@@ -336,7 +336,7 @@ function block_admin_configure($module = NULL, $delta = 0) {
drupal_set_title(t("'%name' block", array('%name' => $info[$delta]['info'])));
// Standard block configurations.
$form['user_vis_settings'] = array(type => 'fieldset',
title => t('User specific visibility settings'),
collapsible => true,
......@@ -350,7 +350,7 @@ function block_admin_configure($module = NULL, $delta = 0) {
options => 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.'),
default_value => $edit['custom']);
$form['page_vis_settings'] = array(type => 'fieldset',
title => t('Page specific visibility settings'),
collapsible => true,
......
......@@ -43,7 +43,7 @@ function blog_access($op, $node) {
function blog_user($type, &$edit, &$user) {
if ($type == 'view' && user_access('edit own blog', $user)) {
$form['blog'] = array(
type => 'item', title => t('Blog'),
type => 'item', title => t('Blog'),
value => l(t('view recent blog entries'), "blog/$user->uid", array('title' => t("Read %username's latest blog entries.", array('%username' => $user->name))))
);
return array(t('History') => $form);
......
......@@ -43,7 +43,7 @@ function blog_access($op, $node) {
function blog_user($type, &$edit, &$user) {
if ($type == 'view' && user_access('edit own blog', $user)) {
$form['blog'] = array(
type => 'item', title => t('Blog'),
type => 'item', title => t('Blog'),
value => l(t('view recent blog entries'), "blog/$user->uid", array('title' => t("Read %username's latest blog entries.", array('%username' => $user->name))))
);
return array(t('History') => $form);
......
......@@ -561,7 +561,7 @@ function blogapi_settings() {
default_value => variable_get('blogapi_node_types', $defaults), options => $node_types,
description => t('Select the content types for which you wish to enable posting via blogapi. Each type will appear as a different "blog" in the client application (if supported).')
);
return $form;
}
......
......@@ -561,7 +561,7 @@ function blogapi_settings() {
default_value => variable_get('blogapi_node_types', $defaults), options => $node_types,
description => t('Select the content types for which you wish to enable posting via blogapi. Each type will appear as a different "blog" in the client application (if supported).')
);
return $form;
}
......
......@@ -302,19 +302,19 @@ function book_outline() {
default:
$page = db_fetch_object(db_query('SELECT * FROM {book} WHERE vid = %d', $node->vid));
$form['parent'] = array(
type => 'select', title => t('Parent'), default_value => $page->parent,
options => book_toc($node->nid), description => t('The parent page in the book.')
type => 'select', title => t('Parent'), default_value => $page->parent,
options => book_toc($node->nid), description => t('The parent page in the book.')
);
$form['weight'] = array(
type => 'weight', title => t('Weight'), default_value => $page->weight, delta => 15,
description => t('Pages at a given level are ordered first by weight and then by title.')
);
$form['log'] = array(
type => 'textarea', title => t('Log message'), cols => 60, rows => 5,
type => 'textarea', title => t('Log message'), cols => 60, rows => 5,
default_value => $node->log, description => t('An explanation to help other authors understand your motivations to put this post into the book.')
);
......
......@@ -302,19 +302,19 @@ function book_outline() {
default:
$page = db_fetch_object(db_query('SELECT * FROM {book} WHERE vid = %d', $node->vid));
$form['parent'] = array(
type => 'select', title => t('Parent'), default_value => $page->parent,
options => book_toc($node->nid), description => t('The parent page in the book.')
type => 'select', title => t('Parent'), default_value => $page->parent,
options => book_toc($node->nid), description => t('The parent page in the book.')
);
$form['weight'] = array(
type => 'weight', title => t('Weight'), default_value => $page->weight, delta => 15,
description => t('Pages at a given level are ordered first by weight and then by title.')
);
$form['log'] = array(
type => 'textarea', title => t('Log message'), cols => 60, rows => 5,
type => 'textarea', title => t('Log message'), cols => 60, rows => 5,
default_value => $node->log, description => t('An explanation to help other authors understand your motivations to put this post into the book.')
);
......
......@@ -45,12 +45,12 @@ 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'))));
}
$form['drupal_server'] = array(type => 'textfield', title => t('Drupal XML-RPC server'), default_value => variable_get('drupal_server', 'http://www.drupal.org/xmlrpc.php'), size => 60, maxlength => 128, description => t('The URL of your root Drupal XML-RPC server.'));
$form['drupal_directory'] = array(
type => 'radios', title => t('Drupal directory'), default_value => variable_get('drupal_directory', 0),
options => array(t('Disabled'), t('Enabled')),
options => array(t('Disabled'), t('Enabled')),
description => 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/"))
);
......
......@@ -45,12 +45,12 @@ 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'))));
}
$form['drupal_server'] = array(type => 'textfield', title => t('Drupal XML-RPC server'), default_value => variable_get('drupal_server', 'http://www.drupal.org/xmlrpc.php'), size => 60, maxlength => 128, description => t('The URL of your root Drupal XML-RPC server.'));
$form['drupal_directory'] = array(
type => 'radios', title => t('Drupal directory'), default_value => variable_get('drupal_directory', 0),
options => array(t('Disabled'), t('Enabled')),
options => array(t('Disabled'), t('Enabled')),
description => 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/"))
);
......
......@@ -564,7 +564,7 @@ function forum_form(&$node) {
else {
$node->taxonomy = array($node->tid);
}
if (function_exists('taxonomy_node_form')) {
$form['taxonomy'] = taxonomy_node_form('forum', $node);
}
......
......@@ -564,7 +564,7 @@ function forum_form(&$node) {
else {
$node->taxonomy = array($node->tid);
}
if (function_exists('taxonomy_node_form')) {
$form['taxonomy'] = taxonomy_node_form('forum', $node);
}
......
......@@ -1482,7 +1482,7 @@ function node_form($node) {
// Append extra node form elements.
$form = array_merge($form, $nodeapi);
}
$form['title'][weight] = isset($form['title'][weight]) ? $form['title'][weight] : -17;
$form['body'][weight] = isset($form['body'][weight]) ? $form['body'][weight] : -5;
......@@ -1492,9 +1492,9 @@ function node_form($node) {
if ($node->type) {
if (!form_get_errors()) {
if ($_POST['op'] == t('Preview')|| !variable_get('node_preview', 0)) {
}
}
}
}
$form['submit'] = array(type => 'submit', value => t('Submit'), weight => 20);
if ($node->nid && node_access('delete', $node)) {
......@@ -1760,7 +1760,7 @@ function node_page_default() {
*/
function node_page() {
$edit = $_POST['edit'];
$op = arg(1);
if (is_numeric($op)) {
......@@ -1803,7 +1803,7 @@ function node_page() {
case 'delete-revision':
node_revision_delete(arg(1), arg(3));
break;
case 'edit':
case 'edit':
if ($_POST['op'] == t('Delete')) {
// Note: we redirect from node/uid/edit to node/uid/delete to make the tabs disappear.
if ($_REQUEST['destination']) {
......
......@@ -1482,7 +1482,7 @@ function node_form($node) {
// Append extra node form elements.
$form = array_merge($form, $nodeapi);
}
$form['title'][weight] = isset($form['title'][weight]) ? $form['title'][weight] : -17;
$form['body'][weight] = isset($form['body'][weight]) ? $form['body'][weight] : -5;
......@@ -1492,9 +1492,9 @@ function node_form($node) {
if ($node->type) {
if (!form_get_errors()) {
if ($_POST['op'] == t('Preview')|| !variable_get('node_preview', 0)) {
}
}
}
}
$form['submit'] = array(type => 'submit', value => t('Submit'), weight => 20);
if ($node->nid && node_access('delete', $node)) {
......@@ -1760,7 +1760,7 @@ function node_page_default() {
*/
function node_page() {
$edit = $_POST['edit'];
$op = arg(1);
if (is_numeric($op)) {
......@@ -1803,7 +1803,7 @@ function node_page() {
case 'delete-revision':
node_revision_delete(arg(1), arg(3));
break;
case 'edit':
case 'edit':
if ($_POST['op'] == t('Delete')) {
// Note: we redirect from node/uid/edit to node/uid/delete to make the tabs disappear.
if ($_REQUEST['destination']) {
......
......@@ -88,10 +88,10 @@ function page_form(&$node) {
$form['log'] = array(
type => 'textarea', title => t('Log message'), default_value => $node->log, rows => 5,
type => 'textarea', title => t('Log message'), default_value => $node->log, rows => 5,
description => t('An explanation of the additions or updates being made to help other authors understand your motivations.')
);
return $form;
}
......
......@@ -88,10 +88,10 @@ function page_form(&$node) {
$form['log'] = array(
type => 'textarea', title => t('Log message'), default_value => $node->log, rows => 5,
type => 'textarea', title => t('Log message'), default_value => $node->log, rows => 5,
description => t('An explanation of the additions or updates being made to help other authors understand your motivations.')
);
return $form;
}
......
......@@ -304,7 +304,7 @@ function poll_view_voting(&$node, $teaser, $page, $block) {
if ($_POST['op'] == t('Vote')) {
poll_vote($node);
}
if ($node->choice) {
$list = array();
foreach ($node->choice as $i => $choice) {
......
......@@ -304,7 +304,7 @@ function poll_view_voting(&$node, $teaser, $page, $block) {
if ($_POST['op'] == t('Vote')) {
poll_vote($node);
}
if ($node->choice) {
$list = array();
foreach ($node->choice as $i => $choice) {
......
......@@ -336,16 +336,16 @@ function profile_form_profile($edit, $user, $category) {
$category = $field->category;
switch ($field->type) {
case 'textfield':
case 'url':
case 'url':
$fields[$category][$field->name] = array(type => 'textfield', title => check_plain($field->title), default_value => $edit[$field->name], size => 60, maxlength => 255, description => _profile_form_explanation($field), required => $field->required);
break;
case 'textarea':
case 'textarea':
$fields[$category][$field->name] = array(type => 'textarea', title => check_plain($field->title), default_value => $edit[$field->name], cols => 60, rows => 5, description => _profile_form_explanation($field), required => $field->required);
break;
case 'list':
$fields[$category][$field->name] = array(type => 'textarea', title => check_plain($field->title), default_value => $edit[$field->name], cols => 60, rows => 5, description => _profile_form_explanation($field), required => $field->required);
break;
case 'checkbox':
case 'checkbox':
$fields[$category][$field->name] = array(type => 'checkbox', title => check_plain($field->title), return_value => 1, default_value => $edit[$field->name], description => _profile_form_explanation($field), required => $field->required);
break;
case 'selection':
......@@ -548,7 +548,7 @@ function profile_admin_delete($fid) {
}
function _profile_field_form($type, $edit = array()) {
$form['fields'] = array(type => 'fieldset', title => t('Field settings'));
$form['fields']['category'] = array(type => 'textfield', title => t('Category'), default_value => $edit['category'], size => 60, maxlength => 128, description => t('The category the new field should be part of. Categories are used to group fields logically. An example category is "Personal information".'));
$form['fields']['title'] = array(type => 'textfield', title => t('Title'), default_value => $edit['title'], size => 60, maxlength => 128, description => t('The title of the new field. The title will be shown to the user. An example title is "Favorite color".'));
......
......@@ -336,16 +336,16 @@ function profile_form_profile($edit, $user, $category) {
$category = $field->category;
switch ($field->type) {
case 'textfield':
case 'url':
case 'url':
$fields[$category][$field->name] = array(type => 'textfield', title => check_plain($field->title), default_value => $edit[$field->name], size => 60, maxlength => 255, description => _profile_form_explanation($field), required => $field->required);
break;
case 'textarea':
case 'textarea':
$fields[$category][$field->name] = array(type => 'textarea', title => check_plain($field->title), default_value => $edit[$field->name], cols => 60, rows => 5, description => _profile_form_explanation($field), required => $field->required);
break;
case 'list':
$fields[$category][$field->name] = array(type => 'textarea', title => check_plain($field->title), default_value => $edit[$field->name], cols => 60, rows => 5, description => _profile_form_explanation($field), required => $field->required);
break;
case 'checkbox':
case 'checkbox':
$fields[$category][$field->name] = array(type => 'checkbox', title => check_plain($field->title), return_value => 1, default_value => $edit[$field->name], description => _profile_form_explanation($field), required => $field->required);
break;
case 'selection':
......@@ -548,7 +548,7 @@ function profile_admin_delete($fid) {
}
function _profile_field_form($type, $edit = array()) {
$form['fields'] = array(type => 'fieldset', title => t('Field settings'));
$form['fields']['category'] = array(type => 'textfield', title => t('Category'), default_value => $edit['category'], size => 60, maxlength => 128, description => t('The category the new field should be part of. Categories are used to group fields logically. An example category is "Personal information".'));
$form['fields']['title'] = array(type => 'textfield', title => t('Title'), default_value => $edit['title'], size => 60, maxlength => 128, description => t('The title of the new field. The title will be shown to the user. An example title is "Favorite color".'));
......
......@@ -330,7 +330,7 @@ function statistics_settings() {
$form['access']['statistics_enable_access_log'] = array(type => 'radios', title => t('Enable access log'), default_value => variable_get('statistics_enable_access_log', 0), options => $options, description => t('Log each page access. Required for referrer statistics.'));
$period = drupal_map_assoc(array(3600, 10800, 21600, 32400, 43200, 86400, 172800, 259200, 604800, 1209600, 2419200, 4838400, 9676800), 'format_interval');
$form['access']['statistics_flush_accesslog_timer'] = array(type => 'select', title => t('Discard access logs older than'), default_value => variable_get('statistics_flush_accesslog_timer', 259200), options => $period, description => t('Older access log entries (including referrer statistics) will be automatically discarded. Requires crontab.'));
// count content views settings
$form['content'] = array(type => 'fieldset', title => t('Content viewing counter settings'));
$form['content']['statistics_count_content_views'] = array(type => 'radios', title => t('Count content views'), default_value => variable_get('statistics_count_content_views', 0), options => $options, description => t('Increment a counter each time content is viewed.'));
......
......@@ -330,7 +330,7 @@ function statistics_settings() {
$form['access']['statistics_enable_access_log'] = array(type => 'radios', title => t('Enable access log'), default_value => variable_get('statistics_enable_access_log', 0), options => $options, description => t('Log each page access. Required for referrer statistics.'));
$period = drupal_map_assoc(array(3600, 10800, 21600, 32400, 43200, 86400, 172800, 259200, 604800, 1209600, 2419200, 4838400, 9676800), 'format_interval');
$form['access']['statistics_flush_accesslog_timer'] = array(type => 'select', title => t('Discard access logs older than'), default_value => variable_get('statistics_flush_accesslog_timer', 259200), options => $period, description => t('Older access log entries (including referrer statistics) will be automatically discarded. Requires crontab.'));
// count content views settings
$form['content'] = array(type => 'fieldset', title => t('Content viewing counter settings'));
$form['content']['statistics_count_content_views'] = array(type => 'radios', title => t('Count content views'), default_value => variable_get('statistics_count_content_views', 0), options => $options, description => t('Increment a counter each time content is viewed.'));
......
......@@ -118,7 +118,7 @@ function taxonomy_form_vocabulary($edit = array()) {
$form['multiple'] = array(type => 'checkbox', title => t('Multiple select'), default_value => $edit['multiple'], return_value => 1, description => t('Allows nodes to have more than one term from this vocabulary (always true for free tagging).'));
$form['required'] = array(type => 'checkbox', title => t('Required'), default_value => $edit['required'], return_value => 1, description => t('If enabled, every node <strong>must</strong> have at least one term in this vocabulary.'));
$form['weight'] = array(type => 'weight', title => t('Weight'), default_value => $edit['weight'], delta => 10, description => t('In listings, the heavier vocabularies will sink and the lighter vocabularies will be positioned nearer the top.'));
// Add extra vocabulary form elements.
$extra = module_invoke_all('taxonomy', 'form', 'vocabulary');
if (is_array($extra)) {
......@@ -519,7 +519,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);
$form[$name]['tags'][$vocabulary->vid] = array( type => textfield, default_value => $typed_string, size => 60, maxlength => 100,
autocomplete_path => 'taxonomy/autocomplete/'. $vocabulary->vid, required => ($vocabulary->required ? TRUE : FALSE), title => $vocabulary->name,
description => t('A comma-separated list of terms describing this content (Example: funny, bungie jumping, "Company, Inc.").') );
......
......@@ -118,7 +118,7 @@ function taxonomy_form_vocabulary($edit = array()) {
$form['multiple'] = array(type => 'checkbox', title => t('Multiple select'), default_value => $edit['multiple'], return_value => 1, description => t('Allows nodes to have more than one term from this vocabulary (always true for free tagging).'));
$form['required'] = array(type => 'checkbox', title => t('Required'), default_value => $edit['required'], return_value => 1, description => t('If enabled, every node <strong>must</strong> have at least one term in this vocabulary.'));
</