Commit b0cbc018 authored by Dries's avatar Dries

- Patch #882694 by mgifford, sun, ksenzee, bleen18, yched: add missing form...

- Patch #882694 by mgifford, sun, ksenzee, bleen18, yched: add missing form element titles for accessibility.
parent cb1f9443
......@@ -2658,19 +2658,24 @@ function form_process_date($element) {
switch ($type) {
case 'day':
$options = drupal_map_assoc(range(1, 31));
$title = t('Day');
break;
case 'month':
$options = drupal_map_assoc(range(1, 12), 'map_month');
$title = t('Month');
break;
case 'year':
$options = drupal_map_assoc(range(1900, 2050));
$title = t('Year');
break;
}
$element[$type] = array(
'#type' => 'select',
'#title' => $title,
'#title_display' => 'invisible',
'#value' => $element['#value'][$type],
'#attributes' => $element['#attributes'],
'#options' => $options,
......@@ -3000,9 +3005,16 @@ function form_process_tableselect($element) {
// Do not overwrite manually created children.
if (!isset($element[$key])) {
if ($element['#multiple']) {
$title = '';
if (!empty($element['#options'][$key]['title']['data']['#title'])) {
$title = t('Update @title', array(
'@title' => $element['#options'][$key]['title']['data']['#title'],
));
}
$element[$key] = array(
'#type' => 'checkbox',
'#title' => '',
'#title' => $title,
'#title_display' => 'invisible',
'#return_value' => $key,
'#default_value' => isset($value[$key]) ? $key : NULL,
'#attributes' => $element['#attributes'],
......
......@@ -191,11 +191,12 @@ function _book_admin_table_tree($tree, &$form) {
'#type' => 'weight',
'#default_value' => $data['link']['weight'],
'#delta' => 15,
'#title' => t('Weight for @title', array('@title' => $data['link']['title'])),
'#title_display' => 'invisible',
),
'plid' => array(
'#type' => 'textfield',
'#type' => 'hidden',
'#default_value' => $data['link']['plid'],
'#size' => 6,
),
'mlid' => array(
'#type' => 'hidden',
......
......@@ -50,6 +50,8 @@ function comment_admin_overview($form, &$form_state, $arg) {
$form['options']['operation'] = array(
'#type' => 'select',
'#title' => t('Operation'),
'#title_display' => 'invisible',
'#options' => $options,
'#default_value' => 'publish',
);
......
......@@ -1171,6 +1171,8 @@ function comment_form_node_form_alter(&$form, $form_state) {
$comment_settings = ($node->comment == COMMENT_NODE_HIDDEN && empty($comment_count)) ? COMMENT_NODE_CLOSED : $node->comment;
$form['comment_settings']['comment'] = array(
'#type' => 'radios',
'#title' => t('Comments'),
'#title_display' => 'invisible',
'#parents' => array('comment'),
'#default_value' => $comment_settings,
'#options' => array(
......
......@@ -172,6 +172,8 @@ function field_multiple_value_form($field, $instance, $langcode, $items, &$form,
// defined by widget.
$element['_weight'] = array(
'#type' => 'weight',
'#title' => t('Weight for row @number', array('@number' => $delta + 1)),
'#title_display' => 'invisible',
// Note: this 'delta' is the FAPI 'weight' element's property.
'#delta' => $max,
'#default_value' => isset($items[$delta]['_weight']) ? $items[$delta]['_weight'] : $delta,
......
......@@ -326,6 +326,8 @@ function field_ui_field_overview_form($form, &$form_state, $entity_type, $bundle
),
'weight' => array(
'#type' => 'textfield',
'#title' => t('Weight for @title', array('@title' => $instance['label'])),
'#title_display' => 'invisible',
'#default_value' => $instance['widget']['weight'],
'#size' => 3,
'#attributes' => array('class' => array('field-weight')),
......@@ -333,6 +335,8 @@ function field_ui_field_overview_form($form, &$form_state, $entity_type, $bundle
'parent_wrapper' => array(
'parent' => array(
'#type' => 'select',
'#title' => t('Parent for @title', array('@title' => $instance['label'])),
'#title_display' => 'invisible',
'#options' => $table['#parent_options'],
'#attributes' => array('class' => array('field-parent')),
'#parents' => array('fields', $name, 'parent'),
......@@ -394,11 +398,13 @@ function field_ui_field_overview_form($form, &$form_state, $entity_type, $bundle
'#size' => 3,
'#attributes' => array('class' => array('field-weight')),
'#title_display' => 'invisible',
'#title' => t('Weight for @row', array('@row' => $extra_field['label'])),
'#title' => t('Weight for @title', array('@title' => $extra_field['label'])),
),
'parent_wrapper' => array(
'parent' => array(
'#type' => 'select',
'#title' => t('Parent for @title', array('@title' => $extra_field['label'])),
'#title_display' => 'invisible',
'#options' => $table['#parent_options'],
'#attributes' => array('class' => array('field-parent')),
'#parents' => array('fields', $name, 'parent'),
......@@ -437,6 +443,8 @@ function field_ui_field_overview_form($form, &$form_state, $entity_type, $bundle
'#region_callback' => 'field_ui_field_overview_row_region',
'label' => array(
'#type' => 'textfield',
'#title' => t('New field label'),
'#title_display' => 'invisible',
'#size' => 15,
'#description' => t('Label'),
'#prefix' => '<div class="label-input"><div class="add-new-placeholder">' . t('Add new field') .'</div>',
......@@ -454,6 +462,8 @@ function field_ui_field_overview_form($form, &$form_state, $entity_type, $bundle
'parent_wrapper' => array(
'parent' => array(
'#type' => 'select',
'#title' => t('Parent for new field'),
'#title_display' => 'invisible',
'#options' => $table['#parent_options'],
'#attributes' => array('class' => array('field-parent')),
'#prefix' => '<div class="add-new-placeholder">&nbsp;</div>',
......@@ -467,6 +477,8 @@ function field_ui_field_overview_form($form, &$form_state, $entity_type, $bundle
),
'field_name' => array(
'#type' => 'textfield',
'#title' => t('New field name'),
'#title_display' => 'invisible',
// This field should stay LTR even for RTL languages.
'#field_prefix' => '<span dir="ltr">field_',
'#field_suffix' => '</span>&lrm;',
......@@ -477,6 +489,8 @@ function field_ui_field_overview_form($form, &$form_state, $entity_type, $bundle
),
'type' => array(
'#type' => 'select',
'#title' => t('Type of new field'),
'#title_display' => 'invisible',
'#options' => $field_type_options,
'#empty_option' => t('- Select a field type -'),
'#description' => t('Type of data to store.'),
......@@ -485,6 +499,8 @@ function field_ui_field_overview_form($form, &$form_state, $entity_type, $bundle
),
'widget_type' => array(
'#type' => 'select',
'#title' => t('Widget for new field'),
'#title_display' => 'invisible',
'#options' => $widget_type_options,
'#empty_option' => t('- Select a widget -'),
'#description' => t('Form element to edit the data.'),
......@@ -505,6 +521,8 @@ function field_ui_field_overview_form($form, &$form_state, $entity_type, $bundle
'#region_callback' => 'field_ui_field_overview_row_region',
'label' => array(
'#type' => 'textfield',
'#title' => t('Existing field label'),
'#title_display' => 'invisible',
'#size' => 15,
'#description' => t('Label'),
'#attributes' => array('class' => array('label-textfield')),
......@@ -523,6 +541,8 @@ function field_ui_field_overview_form($form, &$form_state, $entity_type, $bundle
'parent_wrapper' => array(
'parent' => array(
'#type' => 'select',
'#title' => t('Parent for existing field'),
'#title_display' => 'invisible',
'#options' => $table['#parent_options'],
'#attributes' => array('class' => array('field-parent')),
'#prefix' => '<div class="add-new-placeholder">&nbsp;</div>',
......@@ -536,6 +556,8 @@ function field_ui_field_overview_form($form, &$form_state, $entity_type, $bundle
),
'field_name' => array(
'#type' => 'select',
'#title' => t('Existing field to share'),
'#title_display' => 'invisible',
'#options' => $existing_field_options,
'#empty_option' => t('- Select an existing field -'),
'#description' => t('Field to share'),
......@@ -545,6 +567,8 @@ function field_ui_field_overview_form($form, &$form_state, $entity_type, $bundle
),
'widget_type' => array(
'#type' => 'select',
'#title' => t('Widget for existing field'),
'#title_display' => 'invisible',
'#options' => $widget_type_options,
'#empty_option' => t('- Select a widget -'),
'#description' => t('Form element to edit the data.'),
......@@ -880,6 +904,8 @@ function field_ui_display_overview_form($form, &$form_state, $entity_type, $bund
),
'weight' => array(
'#type' => 'textfield',
'#title' => t('Weight for @title', array('@title' => $instance['label'])),
'#title_display' => 'invisible',
'#default_value' => $display['weight'],
'#size' => 3,
'#attributes' => array('class' => array('field-weight')),
......@@ -887,6 +913,8 @@ function field_ui_display_overview_form($form, &$form_state, $entity_type, $bund
'parent_wrapper' => array(
'parent' => array(
'#type' => 'select',
'#title' => t('Label display for @title', array('@title' => $instance['label'])),
'#title_display' => 'invisible',
'#options' => $table['#parent_options'],
'#attributes' => array('class' => array('field-parent')),
'#parents' => array('fields', $name, 'parent'),
......@@ -899,6 +927,8 @@ function field_ui_display_overview_form($form, &$form_state, $entity_type, $bund
),
'label' => array(
'#type' => 'select',
'#title' => t('Label display for @title', array('@title' => $instance['label'])),
'#title_display' => 'invisible',
'#options' => $field_label_options,
'#default_value' => $display['label'],
),
......@@ -909,6 +939,8 @@ function field_ui_display_overview_form($form, &$form_state, $entity_type, $bund
$table[$name]['format'] = array(
'type' => array(
'#type' => 'select',
'#title' => t('Formatter for @title', array('@title' => $instance['label'])),
'#title_display' => 'invisible',
'#options' => $formatter_options,
'#default_value' => $display['type'],
'#parents' => array('fields', $name, 'type'),
......@@ -1033,6 +1065,8 @@ function field_ui_display_overview_form($form, &$form_state, $entity_type, $bund
),
'weight' => array(
'#type' => 'textfield',
'#title' => t('Weight for @title', array('@title' => $extra_field['label'])),
'#title_display' => 'invisible',
'#default_value' => $display['weight'],
'#size' => 3,
'#attributes' => array('class' => array('field-weight')),
......@@ -1040,6 +1074,8 @@ function field_ui_display_overview_form($form, &$form_state, $entity_type, $bund
'parent_wrapper' => array(
'parent' => array(
'#type' => 'select',
'#title' => t('Parents for @title', array('@title' => $extra_field['label'])),
'#title_display' => 'invisible',
'#options' => $table['#parent_options'],
'#attributes' => array('class' => array('field-parent')),
'#parents' => array('fields', $name, 'parent'),
......@@ -1056,6 +1092,8 @@ function field_ui_display_overview_form($form, &$form_state, $entity_type, $bund
'format' => array(
'type' => array(
'#type' => 'select',
'#title' => t('Visibility for @title', array('@title' => $extra_field['label'])),
'#title_display' => 'invisible',
'#options' => $extra_visibility_options,
'#default_value' => $display['visible'] ? 'visible' : 'hidden',
'#parents' => array('fields', $name, 'type'),
......
......@@ -674,8 +674,11 @@ function file_field_widget_process_multiple($element, &$form_state, $form) {
foreach ($element_children as $delta => $key) {
if ($key != $element['#file_upload_delta']) {
$description = _file_field_get_description_from_element($element[$key]);
$element[$key]['_weight'] = array(
'#type' => 'weight',
'#title' => $description ? t('Weight for @title', array('@title' => $description)) : t('Weight for new file'),
'#title_display' => 'invisible',
'#delta' => $count,
'#default_value' => $delta,
);
......@@ -698,6 +701,27 @@ function file_field_widget_process_multiple($element, &$form_state, $form) {
return $element;
}
/**
* Helper function for file_field_widget_process_multiple().
*
* @param $element
* The element being processed.
* @return
* A description of the file suitable for use in the administrative interface.
*/
function _file_field_get_description_from_element($element) {
// Use the actual file description, if it's available.
if (!empty($element['#default_value']['description'])) {
return $element['#default_value']['description'];
}
// Otherwise, fall back to the filename.
if (!empty($element['#default_value']['filename'])) {
return $element['#default_value']['filename'];
}
// This is probably a newly uploaded file; no description is available.
return FALSE;
}
/**
* Returns HTML for an individual file upload widget.
*
......
......@@ -431,6 +431,8 @@ function file_managed_file_process($element, &$form_state, $form) {
$element['upload'] = array(
'#name' => 'files[' . implode('_', $element['#parents']) . ']',
'#type' => 'file',
'#title' => t('Choose a file'),
'#title_display' => 'invisible',
'#size' => 22,
'#theme_wrappers' => array(),
'#weight' => -10,
......
......@@ -34,7 +34,12 @@ function filter_admin_overview($form) {
$form['formats'][$id]['roles'] = array('#markup' => $roles_markup);
$form['formats'][$id]['configure'] = array('#type' => 'link', '#title' => t('configure'), '#href' => 'admin/config/content/formats/' . $id);
$form['formats'][$id]['disable'] = array('#type' => 'link', '#title' => t('disable'), '#href' => 'admin/config/content/formats/' . $id . '/disable', '#access' => !$form['formats'][$id]['#is_fallback']);
$form['formats'][$id]['weight'] = array('#type' => 'weight', '#default_value' => $format->weight);
$form['formats'][$id]['weight'] = array(
'#type' => 'weight',
'#title' => t('Weight for @title', array('@title' => $format->name)),
'#title_display' => 'invisible',
'#default_value' => $format->weight,
);
}
$form['actions'] = array('#type' => 'actions');
$form['actions']['submit'] = array('#type' => 'submit', '#value' => t('Save changes'));
......@@ -204,6 +209,8 @@ function filter_admin_format_form($form, &$form_state, $format) {
);
$form['filters']['order'][$name]['weight'] = array(
'#type' => 'weight',
'#title' => t('Weight for @title', array('@title' => $filter['title'])),
'#title_display' => 'invisible',
'#delta' => 50,
'#default_value' => $filters[$name]->weight,
'#parents' => array('filters', $name, 'weight'),
......
......@@ -93,6 +93,8 @@ function image_style_form($form, &$form_state, $style) {
);
$form['effects'][$key]['weight'] = array(
'#type' => 'weight',
'#title' => t('Weight for @title', array('@title' => $effect['label'])),
'#title_display' => 'invisible',
'#default_value' => $effect['weight'],
'#access' => $editable,
);
......@@ -127,11 +129,15 @@ function image_style_form($form, &$form_state, $style) {
);
$form['effects']['new']['new'] = array(
'#type' => 'select',
'#title' => t('Effect'),
'#title_display' => 'invisible',
'#options' => $new_effect_options,
'#empty_option' => t('Select a new effect'),
);
$form['effects']['new']['weight'] = array(
'#type' => 'weight',
'#title' => t('Weight for new effect'),
'#title_display' => 'invisible',
'#default_value' => count($form['effects']) - 1,
);
$form['effects']['new']['add'] = array(
......
......@@ -86,6 +86,8 @@ function image_field_instance_settings_form($field, $instance) {
);
$form['max_resolution']['x'] = array(
'#type' => 'textfield',
'#title' => t('Maximum width'),
'#title_display' => 'invisible',
'#default_value' => $max_resolution[0],
'#size' => 5,
'#maxlength' => 5,
......@@ -93,6 +95,8 @@ function image_field_instance_settings_form($field, $instance) {
);
$form['max_resolution']['y'] = array(
'#type' => 'textfield',
'#title' => t('Maximum height'),
'#title_display' => 'invisible',
'#default_value' => $max_resolution[1],
'#size' => 5,
'#maxlength' => 5,
......@@ -111,6 +115,8 @@ function image_field_instance_settings_form($field, $instance) {
);
$form['min_resolution']['x'] = array(
'#type' => 'textfield',
'#title' => t('Minimum width'),
'#title_display' => 'invisible',
'#default_value' => $min_resolution[0],
'#size' => 5,
'#maxlength' => 5,
......@@ -118,6 +124,8 @@ function image_field_instance_settings_form($field, $instance) {
);
$form['min_resolution']['y'] = array(
'#type' => 'textfield',
'#title' => t('Minimum height'),
'#title_display' => 'invisible',
'#default_value' => $min_resolution[1],
'#size' => 5,
'#maxlength' => 5,
......
......@@ -28,6 +28,8 @@ function locale_languages_overview_form() {
}
$form['weight'][$langcode] = array(
'#type' => 'weight',
'#title' => t('Weight for @title', array('@title' => $language->name)),
'#title_display' => 'invisible',
'#default_value' => $language->weight,
'#attributes' => array('class' => array('language-order-weight')),
);
......@@ -35,11 +37,17 @@ function locale_languages_overview_form() {
$form['native'][$langcode] = array('#markup' => check_plain($language->native));
$form['direction'][$langcode] = array('#markup' => ($language->direction == LANGUAGE_RTL ? t('Right to left') : t('Left to right')));
}
$form['enabled'] = array('#type' => 'checkboxes',
$form['enabled'] = array(
'#type' => 'checkboxes',
'#title' => t('Enabled languages'),
'#title_display' => 'invisible',
'#options' => $options,
'#default_value' => $enabled,
);
$form['site_default'] = array('#type' => 'radios',
$form['site_default'] = array(
'#type' => 'radios',
'#title' => t('Default language'),
'#title_display' => 'invisible',
'#options' => $options,
'#default_value' => language_default('language'),
);
......@@ -545,13 +553,20 @@ function _locale_languages_configure_form_language_table(&$form, $type) {
$table_form['weight'][$id] = array(
'#type' => 'weight',
'#title' => t('Weight for @title', array('@title' => $provider['name'])),
'#title_display' => 'invisible',
'#default_value' => $weight,
'#attributes' => array('class' => array("language-provider-weight-$type")),
);
$table_form['title'][$id] = array('#markup' => check_plain($provider['name']));
$table_form['enabled'][$id] = array('#type' => 'checkbox', '#default_value' => $enabled);
$table_form['enabled'][$id] = array(
'#type' => 'checkbox',
'#title' => t('@title language provider', array('@title' => $provider['name'])),
'#title_display' => 'invisible',
'#default_value' => $enabled,
);
if ($id === LANGUAGE_NEGOTIATION_DEFAULT) {
$table_form['enabled'][$id]['#default_value'] = TRUE;
$table_form['enabled'][$id]['#attributes'] = array('disabled' => 'disabled');
......
......@@ -103,6 +103,8 @@ function _menu_overview_tree_form($tree) {
$form[$mlid]['title']['#markup'] = l($item['title'], $item['href'], $item['localized_options']) . ($item['hidden'] ? ' (' . t('disabled') . ')' : '');
$form[$mlid]['hidden'] = array(
'#type' => 'checkbox',
'#title' => t('Enable @title menu link', array('@title' => $item['title'])),
'#title_display' => 'invisible',
'#default_value' => !$item['hidden'],
);
$form[$mlid]['weight'] = array(
......@@ -110,7 +112,7 @@ function _menu_overview_tree_form($tree) {
'#delta' => 50,
'#default_value' => $item['weight'],
'#title_display' => 'invisible',
'#title' => t('Weight for @row', array('@row' => $item['title'])),
'#title' => t('Weight for @title', array('@title' => $item['title'])),
);
$form[$mlid]['mlid'] = array(
'#type' => 'hidden',
......
......@@ -374,6 +374,8 @@ function node_admin_nodes() {
}
$form['options']['operation'] = array(
'#type' => 'select',
'#title' => t('Operation'),
'#title_display' => 'invisible',
'#options' => $options,
'#default_value' => 'approve',
);
......
......@@ -390,12 +390,16 @@ function _poll_choice_form($key, $chid = NULL, $value = '', $votes = 0, $weight
$form['chtext'] = array(
'#type' => 'textfield',
'#title' => $value !== '' ? t('Choice label') : t('New choice label'),
'#title_display' => 'invisible',
'#default_value' => $value,
'#parents' => array('choice', $key, 'chtext'),
);
$form['chvotes'] = array(
'#type' => 'textfield',
'#title' => $value !== '' ? t('Vote count for choice @label', array('@label' => $value)) : t('Vote count for new choice'),
'#title_display' => 'invisible',
'#default_value' => $votes,
'#size' => 5,
'#maxlength' => 7,
......@@ -405,6 +409,8 @@ function _poll_choice_form($key, $chid = NULL, $value = '', $votes = 0, $weight
$form['weight'] = array(
'#type' => 'weight',
'#title' => $value !== '' ? t('Weight for choice @label', array('@label' => $value)) : t('Weight for new choice'),
'#title_display' => 'invisible',
'#default_value' => $weight,
'#delta' => $size,
'#parents' => array('choice', $key, 'weight'),
......@@ -688,6 +694,8 @@ function poll_view_voting($form, &$form_state, $node, $block = FALSE) {
}
$form['choice'] = array(
'#type' => 'radios',
'#title' => t('Choices'),
'#title_display' => 'invisible',
'#default_value' => -1,
'#options' => $list,
);
......
......@@ -24,8 +24,19 @@ function profile_admin_overview($form) {
$form[$field->fid]['name'] = array('#markup' => check_plain($field->name));
$form[$field->fid]['title'] = array('#markup' => check_plain($field->title));
$form[$field->fid]['type'] = array('#markup' => $field->type);
$form[$field->fid]['category'] = array('#type' => 'select', '#default_value' => $field->category, '#options' => array());
$form[$field->fid]['weight'] = array('#type' => 'weight', '#default_value' => $field->weight);
$form[$field->fid]['category'] = array(
'#type' => 'select',
'#title' => t('Category for @title', array('@title' => $field->title)),
'#title_display' => 'invisible',
'#default_value' => $field->category,
'#options' => array(),
);
$form[$field->fid]['weight'] = array(
'#type' => 'weight',
'#title' => t('Weight for @title', array('@title' => $field->title)),
'#title_display' => 'invisible',
'#default_value' => $field->weight,
);
$form[$field->fid]['edit'] = array('#type' => 'link', '#title' => t('edit'), '#href' => "admin/config/people/profile/edit/$field->fid");
$form[$field->fid]['delete'] = array('#type' => 'link', '#title' => t('delete'), '#href' => "admin/config/people/profile/delete/$field->fid");
}
......
......@@ -117,6 +117,8 @@ function search_admin_settings($form) {
);
$form['active']['search_active_modules'] = array(
'#type' => 'checkboxes',
'#title' => t('Active modules'),
'#title_display' => 'invisible',
'#default_value' => variable_get('search_active_modules', array('node', 'user')),
'#options' => _search_get_module_names(),
'#description' => t('Choose which search modules are active from the available modules.')
......
......@@ -995,6 +995,8 @@ function search_form($form, &$form_state, $action = '', $keys = '', $type = NULL
function search_box($form, &$form_state, $form_id) {
$form[$form_id] = array(
'#type' => 'textfield',
'#title' => t('Search'),
'#title_display' => 'invisible',
'#size' => 15,
'#default_value' => '',
'#attributes' => array('title' => t('Enter the terms you wish to search for.')),
......
......@@ -72,6 +72,8 @@ function shortcut_set_switch($form, &$form_state, $account = NULL) {
$form['new'] = array(
'#type' => 'textfield',
'#title' => t('Name'),
'#title_display' => 'invisible',
'#description' => t('The new set is created by copying items from your default shortcut set.'),
'#access' => $add_access,
);
......
......@@ -142,7 +142,7 @@ function theme_simpletest_test_table($variables) {
$title = $test['#title'];
$description = $test['#description'];
unset($test['#title']);
$test['#title_display'] = 'invisible';
unset($test['#description']);
// Test name is used to determine what tests to run.
......
......@@ -1246,6 +1246,8 @@ function system_modules_uninstall($form, $form_state = NULL) {
if (!empty($options)) {
$form['uninstall'] = array(
'#type' => 'checkboxes',
'#title' => t('Modules'),
'#title_display' => 'invisible',
'#options' => $options,
);
$form['actions'] = array('#type' => 'actions');
......@@ -2926,6 +2928,8 @@ function system_actions_manage_form($form, &$form_state, $options = array()) {
);
$form['parent']['action'] = array(
'#type' => 'select',
'#title' => t('Action'),
'#title_display' => 'invisible',
'#options' => $options,
);
$form['parent']['actions'] = array('#type' => 'actions');
......
......@@ -19,7 +19,13 @@ function taxonomy_overview_vocabularies($form) {
foreach ($vocabularies as $vocabulary) {
$form[$vocabulary->vid]['#vocabulary'] = $vocabulary;
$form[$vocabulary->vid]['name'] = array('#markup' => check_plain($vocabulary->name));
$form[$vocabulary->vid]['weight'] = array('#type' => 'weight', '#delta' => 10, '#default_value' => $vocabulary->weight);
$form[$vocabulary->vid]['weight'] = array(
'#type' => 'weight',
'#title' => t('Weight for @title', array('@title' => $vocabulary->name)),
'#title_display' => 'invisible',
'#delta' => 10,
'#default_value' => $vocabulary->weight,
);
$form[$vocabulary->vid]['edit'] = array('#type' => 'link', '#title' => t('edit vocabulary'), '#href' => "admin/structure/taxonomy/$vocabulary->machine_name/edit");
$form[$vocabulary->vid]['list'] = array('#type' => 'link', '#title' => t('list terms'), '#href' => "admin/structure/taxonomy/$vocabulary->machine_name");
$form[$vocabulary->vid]['add'] = array('#type' => 'link', '#title' => t('add terms'), '#href' => "admin/structure/taxonomy/$vocabulary->machine_name/add");
......@@ -663,8 +669,7 @@ function taxonomy_form_term($form, &$form_state, $edit = array(), $vocabulary =
);
$form['vocabulary_machine_name'] = array(
'#type' => 'textfield',
'#access' => FALSE,
'#type' => 'value',
'#value' => isset($term->vocabulary_machine_name) ? $term->vocabulary_machine_name : $vocabulary->name,
);
......
......@@ -179,6 +179,8 @@ function trigger_assign_form($form, $form_state, $module, $hook, $label) {
if (count($options) != 0) {
$form[$hook]['parent']['aid'] = array(
'#type' => 'select',
'#title' => t('List of trigger actions when !description', array('!description' => $label)),
'#title_display' => 'invisible',
'#options' => $options,
);
$form[$hook]['parent']['submit'] = array(
......
......@@ -183,6 +183,8 @@ function user_admin_account() {
}
$form['options']['operation'] = array(
'#type' => 'select',
'#title' => t('Operation'),
'#title_display' => 'invisible',
'#options' => $options,
'#default_value' => 'unblock',
);
......@@ -835,6 +837,8 @@ function user_admin_roles($form, $form_state) {
$form['roles'][$rid]['#weight'] = $order;
$form['roles'][$rid]['weight'] = array(
'#type' => 'textfield',
'#title' => t('Weight for @title', array('@title' => $name['label'])),
'#title_display' => 'invisible',
'#size' => 4,
'#default_value' => $order,
'#attributes' => array('class' => array('role-weight')),
......@@ -844,6 +848,8 @@ function user_admin_roles($form, $form_state) {
$form['name'] = array(
'#type' => 'textfield',
'#title' => t('Name'),
'#title_display' => 'invisible',
'#size' => 32,
'#maxlength' => 64,
);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment