Issue #2074509 by tim.plunkett, falcon03, mgifford, Xano: Fixed Add missing #title property to ensure form accessibility.
parent
11eeb98bf3
commit
f503d2282a
|
|
@ -2470,6 +2470,7 @@ function _install_configure_form($form, &$form_state, &$install_state) {
|
||||||
);
|
);
|
||||||
$form['update_notifications']['update_status_module'] = array(
|
$form['update_notifications']['update_status_module'] = array(
|
||||||
'#type' => 'checkboxes',
|
'#type' => 'checkboxes',
|
||||||
|
'#title' => t('Update notifications'),
|
||||||
'#options' => array(
|
'#options' => array(
|
||||||
1 => t('Check for updates automatically'),
|
1 => t('Check for updates automatically'),
|
||||||
2 => t('Receive e-mail notifications'),
|
2 => t('Receive e-mail notifications'),
|
||||||
|
|
|
||||||
|
|
@ -72,7 +72,6 @@ abstract class ActionFormControllerBase extends EntityFormController {
|
||||||
|
|
||||||
$form['id'] = array(
|
$form['id'] = array(
|
||||||
'#type' => 'machine_name',
|
'#type' => 'machine_name',
|
||||||
'#title' => $this->t('Machine name'),
|
|
||||||
'#default_value' => $this->entity->id(),
|
'#default_value' => $this->entity->id(),
|
||||||
'#disabled' => !$this->entity->isNew(),
|
'#disabled' => !$this->entity->isNew(),
|
||||||
'#maxlength' => 64,
|
'#maxlength' => 64,
|
||||||
|
|
|
||||||
|
|
@ -102,7 +102,6 @@ class BlockFormController extends EntityFormController {
|
||||||
// If creating a new block, calculate a safe default machine name.
|
// If creating a new block, calculate a safe default machine name.
|
||||||
$form['machine_name'] = array(
|
$form['machine_name'] = array(
|
||||||
'#type' => 'machine_name',
|
'#type' => 'machine_name',
|
||||||
'#title' => $this->t('Machine name'),
|
|
||||||
'#maxlength' => 64,
|
'#maxlength' => 64,
|
||||||
'#description' => $this->t('A unique name for this block instance. Must be alpha-numeric and underscore separated.'),
|
'#description' => $this->t('A unique name for this block instance. Must be alpha-numeric and underscore separated.'),
|
||||||
'#default_value' => !$entity->isNew() ? $entity->id() : $this->getUniqueMachineName($entity),
|
'#default_value' => !$entity->isNew() ? $entity->id() : $this->getUniqueMachineName($entity),
|
||||||
|
|
|
||||||
|
|
@ -262,8 +262,8 @@ class BlockListController extends ConfigEntityListController implements FormInte
|
||||||
'#type' => 'select',
|
'#type' => 'select',
|
||||||
'#default_value' => $region,
|
'#default_value' => $region,
|
||||||
'#empty_value' => BLOCK_REGION_NONE,
|
'#empty_value' => BLOCK_REGION_NONE,
|
||||||
'#title_display' => 'invisible',
|
|
||||||
'#title' => t('Region for @block block', array('@block' => $info['admin_label'])),
|
'#title' => t('Region for @block block', array('@block' => $info['admin_label'])),
|
||||||
|
'#title_display' => 'invisible',
|
||||||
'#options' => $this->regions,
|
'#options' => $this->regions,
|
||||||
'#attributes' => array(
|
'#attributes' => array(
|
||||||
'class' => array('block-region-select', 'block-region-' . $region),
|
'class' => array('block-region-select', 'block-region-' . $region),
|
||||||
|
|
@ -279,8 +279,8 @@ class BlockListController extends ConfigEntityListController implements FormInte
|
||||||
'#type' => 'weight',
|
'#type' => 'weight',
|
||||||
'#default_value' => $info['weight'],
|
'#default_value' => $info['weight'],
|
||||||
'#delta' => $weight_delta,
|
'#delta' => $weight_delta,
|
||||||
'#title_display' => 'invisible',
|
|
||||||
'#title' => t('Weight for @block block', array('@block' => $info['admin_label'])),
|
'#title' => t('Weight for @block block', array('@block' => $info['admin_label'])),
|
||||||
|
'#title_display' => 'invisible',
|
||||||
'#attributes' => array(
|
'#attributes' => array(
|
||||||
'class' => array('block-weight', 'block-weight-' . $region),
|
'class' => array('block-weight', 'block-weight-' . $region),
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -160,6 +160,8 @@ function _book_admin_table_tree($tree, &$form) {
|
||||||
'depth' => array('#type' => 'value', '#value' => $data['link']['depth']),
|
'depth' => array('#type' => 'value', '#value' => $data['link']['depth']),
|
||||||
'href' => array('#type' => 'value', '#value' => $data['link']['href']),
|
'href' => array('#type' => 'value', '#value' => $data['link']['href']),
|
||||||
'title' => array(
|
'title' => array(
|
||||||
|
'#title' => t('Title'),
|
||||||
|
'#title_display' => 'invisible',
|
||||||
'#type' => 'textfield',
|
'#type' => 'textfield',
|
||||||
'#default_value' => $data['link']['link_title'],
|
'#default_value' => $data['link']['link_title'],
|
||||||
'#maxlength' => 255,
|
'#maxlength' => 255,
|
||||||
|
|
|
||||||
|
|
@ -118,6 +118,7 @@ function comment_admin_overview($form, &$form_state, $arg) {
|
||||||
'#account' => comment_prepare_author($comment),
|
'#account' => comment_prepare_author($comment),
|
||||||
);
|
);
|
||||||
$options[$comment->id()] = array(
|
$options[$comment->id()] = array(
|
||||||
|
'title' => array('data' => array('#title' => $comment->subject->value ?: $comment->id())),
|
||||||
'subject' => array(
|
'subject' => array(
|
||||||
'data' => array(
|
'data' => array(
|
||||||
'#type' => 'link',
|
'#type' => 'link',
|
||||||
|
|
|
||||||
|
|
@ -88,8 +88,8 @@ class Comment extends WizardPluginBase {
|
||||||
case 'comment':
|
case 'comment':
|
||||||
$style_form['row_options']['links'] = array(
|
$style_form['row_options']['links'] = array(
|
||||||
'#type' => 'select',
|
'#type' => 'select',
|
||||||
'#title_display' => 'invisible',
|
|
||||||
'#title' => t('Should links be displayed below each comment'),
|
'#title' => t('Should links be displayed below each comment'),
|
||||||
|
'#title_display' => 'invisible',
|
||||||
'#options' => array(
|
'#options' => array(
|
||||||
1 => t('with links (allow users to reply to the comment, etc.)'),
|
1 => t('with links (allow users to reply to the comment, etc.)'),
|
||||||
0 => t('without links'),
|
0 => t('without links'),
|
||||||
|
|
|
||||||
|
|
@ -59,9 +59,10 @@ class ConfigImportForm extends FormBase {
|
||||||
);
|
);
|
||||||
$form['import_tarball'] = array(
|
$form['import_tarball'] = array(
|
||||||
'#type' => 'file',
|
'#type' => 'file',
|
||||||
'#value' => $this->t('Select your configuration export file'),
|
'#title' => $this->t('Select your configuration export file'),
|
||||||
'#description' => $this->t('This form will redirect you to the import configuration screen.'),
|
'#description' => $this->t('This form will redirect you to the import configuration screen.'),
|
||||||
);
|
);
|
||||||
|
|
||||||
$form['submit'] = array(
|
$form['submit'] = array(
|
||||||
'#type' => 'submit',
|
'#type' => 'submit',
|
||||||
'#value' => $this->t('Upload'),
|
'#value' => $this->t('Upload'),
|
||||||
|
|
|
||||||
|
|
@ -89,6 +89,7 @@ function _content_translation_form_language_content_settings_form_alter(array &$
|
||||||
if ($fields) {
|
if ($fields) {
|
||||||
$form['settings'][$entity_type][$bundle]['translatable'] = array(
|
$form['settings'][$entity_type][$bundle]['translatable'] = array(
|
||||||
'#type' => 'checkbox',
|
'#type' => 'checkbox',
|
||||||
|
'#title' => $bundle,
|
||||||
'#default_value' => content_translation_enabled($entity_type, $bundle),
|
'#default_value' => content_translation_enabled($entity_type, $bundle),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
@ -99,6 +100,7 @@ function _content_translation_form_language_content_settings_form_alter(array &$
|
||||||
$form['settings'][$entity_type][$bundle]['fields'][$field_name] = array(
|
$form['settings'][$entity_type][$bundle]['fields'][$field_name] = array(
|
||||||
'#label' => $instance['label'],
|
'#label' => $instance['label'],
|
||||||
'#type' => 'checkbox',
|
'#type' => 'checkbox',
|
||||||
|
'#title' => $instance['label'],
|
||||||
'#default_value' => $field['translatable'],
|
'#default_value' => $field['translatable'],
|
||||||
);
|
);
|
||||||
$column_element = content_translation_field_sync_widget($field, $instance);
|
$column_element = content_translation_field_sync_widget($field, $instance);
|
||||||
|
|
|
||||||
|
|
@ -155,6 +155,8 @@ class ContentTranslationController implements ContentTranslationControllerInterf
|
||||||
'#weight' => -100,
|
'#weight' => -100,
|
||||||
'#multilingual' => TRUE,
|
'#multilingual' => TRUE,
|
||||||
'source' => array(
|
'source' => array(
|
||||||
|
'#title' => t('Select source language'),
|
||||||
|
'#title_display' => 'invisible',
|
||||||
'#type' => 'select',
|
'#type' => 'select',
|
||||||
'#default_value' => $source_langcode,
|
'#default_value' => $source_langcode,
|
||||||
'#options' => array(),
|
'#options' => array(),
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,11 @@ class UnicornEditor extends EditorBase {
|
||||||
* Implements \Drupal\editor\Plugin\EditPluginInterface::settingsForm().
|
* Implements \Drupal\editor\Plugin\EditPluginInterface::settingsForm().
|
||||||
*/
|
*/
|
||||||
function settingsForm(array $form, array &$form_state, EditorEntity $editor) {
|
function settingsForm(array $form, array &$form_state, EditorEntity $editor) {
|
||||||
$form['foo'] = array('#type' => 'textfield', '#default_value' => 'bar');
|
$form['foo'] = array(
|
||||||
|
'#title' => t('Foo'),
|
||||||
|
'#type' => 'textfield',
|
||||||
|
'#default_value' => 'bar',
|
||||||
|
);
|
||||||
return $form;
|
return $form;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -82,7 +82,6 @@ abstract class EntityDisplayModeFormBase extends EntityFormController {
|
||||||
|
|
||||||
$form['id'] = array(
|
$form['id'] = array(
|
||||||
'#type' => 'machine_name',
|
'#type' => 'machine_name',
|
||||||
'#title' => t('Machine-readable name'),
|
|
||||||
'#description' => t('A unique machine-readable name. Can only contain lowercase letters, numbers, and underscores.'),
|
'#description' => t('A unique machine-readable name. Can only contain lowercase letters, numbers, and underscores.'),
|
||||||
'#disabled' => !$this->entity->isNew(),
|
'#disabled' => !$this->entity->isNew(),
|
||||||
'#default_value' => $this->entity->id(),
|
'#default_value' => $this->entity->id(),
|
||||||
|
|
|
||||||
|
|
@ -54,6 +54,7 @@ function language_elements_configuration_element() {
|
||||||
*/
|
*/
|
||||||
function language_elements_configuration_element_test() {
|
function language_elements_configuration_element_test() {
|
||||||
$form['langcode'] = array(
|
$form['langcode'] = array(
|
||||||
|
'#title' => t('Language select'),
|
||||||
'#type' => 'language_select',
|
'#type' => 'language_select',
|
||||||
'#default_value' => language_get_default_langcode('custom_type', 'some_bundle'),
|
'#default_value' => language_get_default_langcode('custom_type', 'some_bundle'),
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -85,9 +85,10 @@
|
||||||
background: transparent url(../../../misc/menu-expanded.png) left .6em no-repeat;
|
background: transparent url(../../../misc/menu-expanded.png) left .6em no-repeat;
|
||||||
}
|
}
|
||||||
|
|
||||||
#locale-translation-status-form label {
|
#locale-translation-status-form .label {
|
||||||
color: #1d1d1d;
|
color: #1d1d1d;
|
||||||
font-size: 1.15em;
|
font-size: 1.15em;
|
||||||
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
#locale-translation-status-form .description {
|
#locale-translation-status-form .description {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|
|
||||||
|
|
@ -167,7 +167,7 @@ class LocaleUpdateTest extends LocaleUpdateBase {
|
||||||
$this->drupalGet('admin/reports/translations/check');
|
$this->drupalGet('admin/reports/translations/check');
|
||||||
|
|
||||||
// Check the status on the Available translation status page.
|
// Check the status on the Available translation status page.
|
||||||
$this->assertRaw('<label for="edit-langcodes-de" class="language-name">German</label>', 'German language found');
|
$this->assertRaw('<label class="visually-hidden" for="edit-langcodes-de">Update German</label>', 'German language found');
|
||||||
$this->assertText('Updates for: Contributed module one, Contributed module two, Custom module one, Locale test', 'Updates found');
|
$this->assertText('Updates for: Contributed module one, Contributed module two, Custom module one, Locale test', 'Updates found');
|
||||||
$this->assertText('Contributed module one (' . format_date($this->timestamp_now, 'html_date') . ')', 'Updates for Contrib module one');
|
$this->assertText('Contributed module one (' . format_date($this->timestamp_now, 'html_date') . ')', 'Updates for Contrib module one');
|
||||||
$this->assertText('Contributed module two (' . format_date($this->timestamp_new, 'html_date') . ')', 'Updates for Contrib module two');
|
$this->assertText('Contributed module two (' . format_date($this->timestamp_new, 'html_date') . ')', 'Updates for Contrib module two');
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@
|
||||||
* Interface translation summary, editing and deletion user interfaces.
|
* Interface translation summary, editing and deletion user interfaces.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
use Drupal\Component\Utility\String;
|
||||||
use Drupal\Core\Language\Language;
|
use Drupal\Core\Language\Language;
|
||||||
use Drupal\locale\SourceString;
|
use Drupal\locale\SourceString;
|
||||||
use Drupal\locale\TranslationString;
|
use Drupal\locale\TranslationString;
|
||||||
|
|
@ -520,6 +521,7 @@ function locale_translation_status_form($form, &$form_state) {
|
||||||
|
|
||||||
// Build data options for the select table.
|
// Build data options for the select table.
|
||||||
foreach($updates as $langcode => $update) {
|
foreach($updates as $langcode => $update) {
|
||||||
|
$title = String::checkPlain($languages[$langcode]->name);
|
||||||
$locale_translation_update_info = array('#theme' => 'locale_translation_update_info');
|
$locale_translation_update_info = array('#theme' => 'locale_translation_update_info');
|
||||||
foreach (array('updates', 'not_found') as $update_status) {
|
foreach (array('updates', 'not_found') as $update_status) {
|
||||||
if (isset($update[$update_status])) {
|
if (isset($update[$update_status])) {
|
||||||
|
|
@ -527,12 +529,20 @@ function locale_translation_status_form($form, &$form_state) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$options[$langcode] = array(
|
$options[$langcode] = array(
|
||||||
'title' => check_plain($languages[$langcode]->name),
|
'title' => array(
|
||||||
|
'class' => array('label'),
|
||||||
|
'data' => array(
|
||||||
|
'#title' => $title,
|
||||||
|
'#markup' => $title
|
||||||
|
),
|
||||||
|
),
|
||||||
'status' => array('class' => array('description', 'expand', 'priority-low'), 'data' => drupal_render($locale_translation_update_info)),
|
'status' => array('class' => array('description', 'expand', 'priority-low'), 'data' => drupal_render($locale_translation_update_info)),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
// Sort the table data on language name.
|
// Sort the table data on language name.
|
||||||
uasort($options, 'drupal_sort_title');
|
uasort($options, function ($a, $b) {
|
||||||
|
return strcasecmp($a['title']['data']['#title'], $b['title']['data']['#title']);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
$last_checked = Drupal::state()->get('locale.translation_last_checked');
|
$last_checked = Drupal::state()->get('locale.translation_last_checked');
|
||||||
|
|
@ -639,13 +649,6 @@ function locale_translation_status_form_submit($form, &$form_state) {
|
||||||
* translation files could not be found.
|
* translation files could not be found.
|
||||||
*/
|
*/
|
||||||
function locale_translation_language_table($form_element) {
|
function locale_translation_language_table($form_element) {
|
||||||
// Add labels to Language names.
|
|
||||||
foreach ($form_element['#options'] as $langcode => $option) {
|
|
||||||
$id = $form_element[$langcode]['#id'];
|
|
||||||
$title = $option['title'];
|
|
||||||
$form_element['#options'][$langcode]['title'] = '<label for="' . $form_element[$langcode]['#id'] . '" class="language-name">' . $title . '</label>';
|
|
||||||
}
|
|
||||||
|
|
||||||
// Remove checkboxes of languages without updates.
|
// Remove checkboxes of languages without updates.
|
||||||
if ($form_element['#not_found']) {
|
if ($form_element['#not_found']) {
|
||||||
foreach ($form_element['#not_found'] as $langcode) {
|
foreach ($form_element['#not_found'] as $langcode) {
|
||||||
|
|
|
||||||
|
|
@ -315,8 +315,8 @@ class MenuFormController extends EntityFormController {
|
||||||
'#type' => 'weight',
|
'#type' => 'weight',
|
||||||
'#delta' => $delta,
|
'#delta' => $delta,
|
||||||
'#default_value' => $item['weight'],
|
'#default_value' => $item['weight'],
|
||||||
'#title_display' => 'invisible',
|
|
||||||
'#title' => t('Weight for @title', array('@title' => $item['title'])),
|
'#title' => t('Weight for @title', array('@title' => $item['title'])),
|
||||||
|
'#title_display' => 'invisible',
|
||||||
);
|
);
|
||||||
$form[$mlid]['mlid'] = array(
|
$form[$mlid]['mlid'] = array(
|
||||||
'#type' => 'hidden',
|
'#type' => 'hidden',
|
||||||
|
|
|
||||||
|
|
@ -39,6 +39,7 @@ class NodeType extends ConditionPluginBase {
|
||||||
$options[$type->type] = $type->name;
|
$options[$type->type] = $type->name;
|
||||||
}
|
}
|
||||||
$form['bundles'] = array(
|
$form['bundles'] = array(
|
||||||
|
'#title' => t('Node types'),
|
||||||
'#type' => 'checkboxes',
|
'#type' => 'checkboxes',
|
||||||
'#options' => $options,
|
'#options' => $options,
|
||||||
'#required' => TRUE,
|
'#required' => TRUE,
|
||||||
|
|
|
||||||
|
|
@ -107,8 +107,8 @@ class Node extends WizardPluginBase {
|
||||||
case 'teasers':
|
case 'teasers':
|
||||||
$style_form['row_options']['links'] = array(
|
$style_form['row_options']['links'] = array(
|
||||||
'#type' => 'select',
|
'#type' => 'select',
|
||||||
'#title_display' => 'invisible',
|
|
||||||
'#title' => t('Should links be displayed below each node'),
|
'#title' => t('Should links be displayed below each node'),
|
||||||
|
'#title_display' => 'invisible',
|
||||||
'#options' => array(
|
'#options' => array(
|
||||||
1 => t('with links (allow users to add comments, etc.)'),
|
1 => t('with links (allow users to add comments, etc.)'),
|
||||||
0 => t('without links'),
|
0 => t('without links'),
|
||||||
|
|
@ -117,8 +117,8 @@ class Node extends WizardPluginBase {
|
||||||
);
|
);
|
||||||
$style_form['row_options']['comments'] = array(
|
$style_form['row_options']['comments'] = array(
|
||||||
'#type' => 'select',
|
'#type' => 'select',
|
||||||
'#title_display' => 'invisible',
|
|
||||||
'#title' => t('Should comments be displayed below each node'),
|
'#title' => t('Should comments be displayed below each node'),
|
||||||
|
'#title_display' => 'invisible',
|
||||||
'#options' => array(
|
'#options' => array(
|
||||||
1 => t('with comments'),
|
1 => t('with comments'),
|
||||||
0 => t('without comments'),
|
0 => t('without comments'),
|
||||||
|
|
|
||||||
|
|
@ -94,11 +94,15 @@ class DataFieldRow extends RowPluginBase {
|
||||||
'#markup' => $id,
|
'#markup' => $id,
|
||||||
);
|
);
|
||||||
$form['field_options'][$id]['alias'] = array(
|
$form['field_options'][$id]['alias'] = array(
|
||||||
|
'#title' => t('Alias for @id', array('@id' => $id)),
|
||||||
|
'#title_display' => 'invisible',
|
||||||
'#type' => 'textfield',
|
'#type' => 'textfield',
|
||||||
'#default_value' => isset($options[$id]['alias']) ? $options[$id]['alias'] : '',
|
'#default_value' => isset($options[$id]['alias']) ? $options[$id]['alias'] : '',
|
||||||
'#element_validate' => array(array($this, 'validateAliasName')),
|
'#element_validate' => array(array($this, 'validateAliasName')),
|
||||||
);
|
);
|
||||||
$form['field_options'][$id]['raw_output'] = array(
|
$form['field_options'][$id]['raw_output'] = array(
|
||||||
|
'#title' => t('Raw output for @id', array('@id' => $id)),
|
||||||
|
'#title_display' => 'invisible',
|
||||||
'#type' => 'checkbox',
|
'#type' => 'checkbox',
|
||||||
'#default_value' => isset($options[$id]['raw_output']) ? $options[$id]['raw_output'] : '',
|
'#default_value' => isset($options[$id]['raw_output']) ? $options[$id]['raw_output'] : '',
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -84,6 +84,7 @@ class CronForm extends SystemConfigFormBase {
|
||||||
);
|
);
|
||||||
|
|
||||||
$form['cron'] = array(
|
$form['cron'] = array(
|
||||||
|
'#title' => t('Cron settings'),
|
||||||
'#type' => 'details',
|
'#type' => 'details',
|
||||||
);
|
);
|
||||||
$form['cron']['cron_safe_threshold'] = array(
|
$form['cron']['cron_safe_threshold'] = array(
|
||||||
|
|
|
||||||
|
|
@ -125,7 +125,6 @@ abstract class DateFormatFormBase extends EntityFormController {
|
||||||
|
|
||||||
$form['id'] = array(
|
$form['id'] = array(
|
||||||
'#type' => 'machine_name',
|
'#type' => 'machine_name',
|
||||||
'#title' => t('Machine-readable name'),
|
|
||||||
'#description' => t('A unique machine-readable name. Can only contain lowercase letters, numbers, and underscores.'),
|
'#description' => t('A unique machine-readable name. Can only contain lowercase letters, numbers, and underscores.'),
|
||||||
'#disabled' => !$this->entity->isNew(),
|
'#disabled' => !$this->entity->isNew(),
|
||||||
'#default_value' => $this->entity->id(),
|
'#default_value' => $this->entity->id(),
|
||||||
|
|
|
||||||
|
|
@ -49,6 +49,7 @@ function ajax_forms_test_simple_form($form, &$form_state) {
|
||||||
|
|
||||||
$form = array();
|
$form = array();
|
||||||
$form['select'] = array(
|
$form['select'] = array(
|
||||||
|
'#title' => t('Color'),
|
||||||
'#type' => 'select',
|
'#type' => 'select',
|
||||||
'#options' => array(
|
'#options' => array(
|
||||||
'red' => 'red',
|
'red' => 'red',
|
||||||
|
|
@ -83,6 +84,7 @@ function ajax_forms_test_simple_form($form, &$form_state) {
|
||||||
foreach ($invalid_callbacks as $key => $value) {
|
foreach ($invalid_callbacks as $key => $value) {
|
||||||
$form['select_' . $key . '_callback'] = array(
|
$form['select_' . $key . '_callback'] = array(
|
||||||
'#type' => 'select',
|
'#type' => 'select',
|
||||||
|
'#title' => t('Test %key callbacks', array('%key' => $key)),
|
||||||
'#options' => array('red' => 'red'),
|
'#options' => array('red' => 'red'),
|
||||||
'#ajax' => array('callback' => $value),
|
'#ajax' => array('callback' => $value),
|
||||||
);
|
);
|
||||||
|
|
@ -542,6 +544,7 @@ function ajax_forms_test_lazy_load_form($form, &$form_state) {
|
||||||
'data' => array('test' => 'currentPathUpdate'),
|
'data' => array('test' => 'currentPathUpdate'),
|
||||||
);
|
);
|
||||||
$form['add_files'] = array(
|
$form['add_files'] = array(
|
||||||
|
'#title' => t('Add files'),
|
||||||
'#type' => 'checkbox',
|
'#type' => 'checkbox',
|
||||||
'#default_value' => FALSE,
|
'#default_value' => FALSE,
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -312,6 +312,7 @@ function _batch_test_nested_drupal_form_submit_callback($value) {
|
||||||
*/
|
*/
|
||||||
function batch_test_mock_form($form, $form_state) {
|
function batch_test_mock_form($form, $form_state) {
|
||||||
$form['test_value'] = array(
|
$form['test_value'] = array(
|
||||||
|
'#title' => t('Test value'),
|
||||||
'#type' => 'textfield',
|
'#type' => 'textfield',
|
||||||
);
|
);
|
||||||
$form['submit'] = array(
|
$form['submit'] = array(
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
use Drupal\Component\Utility\String;
|
||||||
use Drupal\Core\Database\Query\AlterableInterface;
|
use Drupal\Core\Database\Query\AlterableInterface;
|
||||||
use Symfony\Component\HttpFoundation\JsonResponse;
|
use Symfony\Component\HttpFoundation\JsonResponse;
|
||||||
|
|
||||||
|
|
@ -233,6 +234,7 @@ function database_test_theme_tablesort($form, &$form_state) {
|
||||||
|
|
||||||
foreach (user_load_multiple($uids) as $account) {
|
foreach (user_load_multiple($uids) as $account) {
|
||||||
$options[$account->id()] = array(
|
$options[$account->id()] = array(
|
||||||
|
'title' => array('data' => array('#title' => String::checkPlain($account->getUsername()))),
|
||||||
'username' => check_plain($account->getUsername()),
|
'username' => check_plain($account->getUsername()),
|
||||||
'status' => $account->isActive() ? t('active') : t('blocked'),
|
'status' => $account->isActive() ? t('active') : t('blocked'),
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -701,6 +701,7 @@ function _form_test_tableselect_get_data() {
|
||||||
);
|
);
|
||||||
|
|
||||||
$options['row1'] = array(
|
$options['row1'] = array(
|
||||||
|
'title' => array('data' => array('#title' => t('row1'))),
|
||||||
'one' => 'row1col1',
|
'one' => 'row1col1',
|
||||||
'two' => t('row1col2'),
|
'two' => t('row1col2'),
|
||||||
'three' => t('row1col3'),
|
'three' => t('row1col3'),
|
||||||
|
|
@ -708,6 +709,7 @@ function _form_test_tableselect_get_data() {
|
||||||
);
|
);
|
||||||
|
|
||||||
$options['row2'] = array(
|
$options['row2'] = array(
|
||||||
|
'title' => array('data' => array('#title' => t('row2'))),
|
||||||
'one' => 'row2col1',
|
'one' => 'row2col1',
|
||||||
'two' => t('row2col2'),
|
'two' => t('row2col2'),
|
||||||
'three' => t('row2col3'),
|
'three' => t('row2col3'),
|
||||||
|
|
@ -715,6 +717,7 @@ function _form_test_tableselect_get_data() {
|
||||||
);
|
);
|
||||||
|
|
||||||
$options['row3'] = array(
|
$options['row3'] = array(
|
||||||
|
'title' => array('data' => array('#title' => t('row3'))),
|
||||||
'one' => 'row3col1',
|
'one' => 'row3col1',
|
||||||
'two' => t('row3col2'),
|
'two' => t('row3col2'),
|
||||||
'three' => t('row3col3'),
|
'three' => t('row3col3'),
|
||||||
|
|
@ -1044,21 +1047,21 @@ function form_label_test_form() {
|
||||||
$form['form_checkboxes_title_attribute'] = array(
|
$form['form_checkboxes_title_attribute'] = array(
|
||||||
'#type' => 'checkboxes',
|
'#type' => 'checkboxes',
|
||||||
'#title' => 'Checkboxes test',
|
'#title' => 'Checkboxes test',
|
||||||
|
'#title_display' => 'attribute',
|
||||||
'#options' => array(
|
'#options' => array(
|
||||||
'first-checkbox' => 'First checkbox',
|
'first-checkbox' => 'First checkbox',
|
||||||
'second-checkbox' => 'Second checkbox',
|
'second-checkbox' => 'Second checkbox',
|
||||||
),
|
),
|
||||||
'#title_display' => 'attribute',
|
|
||||||
'#required' => TRUE,
|
'#required' => TRUE,
|
||||||
);
|
);
|
||||||
$form['form_radios_title_attribute'] = array(
|
$form['form_radios_title_attribute'] = array(
|
||||||
'#type' => 'radios',
|
'#type' => 'radios',
|
||||||
'#title' => 'Radios test',
|
'#title' => 'Radios test',
|
||||||
|
'#title_display' => 'attribute',
|
||||||
'#options' => array(
|
'#options' => array(
|
||||||
'first-radio' => 'First radio',
|
'first-radio' => 'First radio',
|
||||||
'second-radio' => 'Second radio',
|
'second-radio' => 'Second radio',
|
||||||
),
|
),
|
||||||
'#title_display' => 'attribute',
|
|
||||||
'#required' => TRUE,
|
'#required' => TRUE,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
@ -1338,25 +1341,30 @@ function form_test_language_select() {
|
||||||
$form['#submit'] = array('_form_test_submit_values_json');
|
$form['#submit'] = array('_form_test_submit_values_json');
|
||||||
|
|
||||||
$form['languages_all'] = array(
|
$form['languages_all'] = array(
|
||||||
|
'#title' => t('Languages: All'),
|
||||||
'#type' => 'language_select',
|
'#type' => 'language_select',
|
||||||
'#languages' => Language::STATE_ALL,
|
'#languages' => Language::STATE_ALL,
|
||||||
'#default_value' => 'xx',
|
'#default_value' => 'xx',
|
||||||
);
|
);
|
||||||
$form['languages_configurable'] = array(
|
$form['languages_configurable'] = array(
|
||||||
|
'#title' => t('Languages: Configurable'),
|
||||||
'#type' => 'language_select',
|
'#type' => 'language_select',
|
||||||
'#languages' => Language::STATE_CONFIGURABLE,
|
'#languages' => Language::STATE_CONFIGURABLE,
|
||||||
'#default_value' => 'en',
|
'#default_value' => 'en',
|
||||||
);
|
);
|
||||||
$form['languages_locked'] = array(
|
$form['languages_locked'] = array(
|
||||||
|
'#title' => t('Languages: Locked'),
|
||||||
'#type' => 'language_select',
|
'#type' => 'language_select',
|
||||||
'#languages' => Language::STATE_LOCKED,
|
'#languages' => Language::STATE_LOCKED,
|
||||||
);
|
);
|
||||||
$form['languages_config_and_locked'] = array(
|
$form['languages_config_and_locked'] = array(
|
||||||
|
'#title' => t('Languages: Configurable and locked'),
|
||||||
'#type' => 'language_select',
|
'#type' => 'language_select',
|
||||||
'#languages' => Language::STATE_CONFIGURABLE | Language::STATE_LOCKED,
|
'#languages' => Language::STATE_CONFIGURABLE | Language::STATE_LOCKED,
|
||||||
'#default_value' => 'dummy_value',
|
'#default_value' => 'dummy_value',
|
||||||
);
|
);
|
||||||
$form['language_custom_options'] = array(
|
$form['language_custom_options'] = array(
|
||||||
|
'#title' => t('Languages: Custom'),
|
||||||
'#type' => 'language_select',
|
'#type' => 'language_select',
|
||||||
'#languages' => Language::STATE_CONFIGURABLE | Language::STATE_LOCKED,
|
'#languages' => Language::STATE_CONFIGURABLE | Language::STATE_LOCKED,
|
||||||
'#options' => array('opt1' => 'First option', 'opt2' => 'Second option', 'opt3' => 'Third option'),
|
'#options' => array('opt1' => 'First option', 'opt2' => 'Second option', 'opt3' => 'Third option'),
|
||||||
|
|
@ -1907,6 +1915,7 @@ function _form_test_input_forgery($form, &$form_state) {
|
||||||
// For testing that a user can't submit a value not matching one of the
|
// For testing that a user can't submit a value not matching one of the
|
||||||
// allowed options.
|
// allowed options.
|
||||||
$form['checkboxes'] = array(
|
$form['checkboxes'] = array(
|
||||||
|
'#title' => t('Checkboxes'),
|
||||||
'#type' => 'checkboxes',
|
'#type' => 'checkboxes',
|
||||||
'#options' => array(
|
'#options' => array(
|
||||||
'one' => 'One',
|
'one' => 'One',
|
||||||
|
|
@ -2050,6 +2059,7 @@ function form_test_programmatic_form($form, &$form_state) {
|
||||||
);
|
);
|
||||||
|
|
||||||
$form['checkboxes'] = array(
|
$form['checkboxes'] = array(
|
||||||
|
'#title' => t('Checkboxes'),
|
||||||
'#type' => 'checkboxes',
|
'#type' => 'checkboxes',
|
||||||
'#options' => array(
|
'#options' => array(
|
||||||
1 => 'First checkbox',
|
1 => 'First checkbox',
|
||||||
|
|
@ -2296,6 +2306,7 @@ function form_test_load_include_custom($form, &$form_state) {
|
||||||
|
|
||||||
function form_test_checkbox_type_juggling($form, $form_state, $default_value, $return_value) {
|
function form_test_checkbox_type_juggling($form, $form_state, $default_value, $return_value) {
|
||||||
$form['checkbox'] = array(
|
$form['checkbox'] = array(
|
||||||
|
'#title' => t('Checkbox'),
|
||||||
'#type' => 'checkbox',
|
'#type' => 'checkbox',
|
||||||
'#return_value' => $return_value,
|
'#return_value' => $return_value,
|
||||||
'#default_value' => $default_value,
|
'#default_value' => $default_value,
|
||||||
|
|
@ -2305,15 +2316,18 @@ function form_test_checkbox_type_juggling($form, $form_state, $default_value, $r
|
||||||
|
|
||||||
function form_test_checkboxes_zero($form, &$form_state, $json = TRUE) {
|
function form_test_checkboxes_zero($form, &$form_state, $json = TRUE) {
|
||||||
$form['checkbox_off'] = array(
|
$form['checkbox_off'] = array(
|
||||||
|
'#title' => t('Checkbox off'),
|
||||||
'#type' => 'checkboxes',
|
'#type' => 'checkboxes',
|
||||||
'#options' => array('foo', 'bar', 'baz'),
|
'#options' => array('foo', 'bar', 'baz'),
|
||||||
);
|
);
|
||||||
$form['checkbox_zero_default'] = array(
|
$form['checkbox_zero_default'] = array(
|
||||||
|
'#title' => t('Zero default'),
|
||||||
'#type' => 'checkboxes',
|
'#type' => 'checkboxes',
|
||||||
'#options' => array('foo', 'bar', 'baz'),
|
'#options' => array('foo', 'bar', 'baz'),
|
||||||
'#default_value' => array(0),
|
'#default_value' => array(0),
|
||||||
);
|
);
|
||||||
$form['checkbox_string_zero_default'] = array(
|
$form['checkbox_string_zero_default'] = array(
|
||||||
|
'#title' => t('Zero default (string)'),
|
||||||
'#type' => 'checkboxes',
|
'#type' => 'checkboxes',
|
||||||
'#options' => array('foo', 'bar', 'baz'),
|
'#options' => array('foo', 'bar', 'baz'),
|
||||||
'#default_value' => array('0'),
|
'#default_value' => array('0'),
|
||||||
|
|
|
||||||
|
|
@ -258,8 +258,8 @@ class OverviewTerms extends FormBase {
|
||||||
$form['terms'][$key]['weight'] = array(
|
$form['terms'][$key]['weight'] = array(
|
||||||
'#type' => 'weight',
|
'#type' => 'weight',
|
||||||
'#delta' => $delta,
|
'#delta' => $delta,
|
||||||
'#title_display' => 'invisible',
|
|
||||||
'#title' => $this->t('Weight for added term'),
|
'#title' => $this->t('Weight for added term'),
|
||||||
|
'#title_display' => 'invisible',
|
||||||
'#default_value' => $term->weight->value,
|
'#default_value' => $term->weight->value,
|
||||||
'#attributes' => array(
|
'#attributes' => array(
|
||||||
'class' => array('term-weight'),
|
'class' => array('term-weight'),
|
||||||
|
|
|
||||||
|
|
@ -162,6 +162,11 @@ function update_manager_update_form($form, $form_state = array(), $context) {
|
||||||
continue 2;
|
continue 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Use the project title for the tableselect checkboxes.
|
||||||
|
$entry['title'] = array('data' => array(
|
||||||
|
'#title' => $entry['title'],
|
||||||
|
'#markup' => $entry['title'],
|
||||||
|
));
|
||||||
$entry['#attributes'] = array('class' => array('update-' . $type));
|
$entry['#attributes'] = array('class' => array('update-' . $type));
|
||||||
|
|
||||||
// Drupal core needs to be upgraded manually.
|
// Drupal core needs to be upgraded manually.
|
||||||
|
|
|
||||||
|
|
@ -139,7 +139,7 @@ class UserPermissionsForm extends FormBase {
|
||||||
'restrict access' => FALSE,
|
'restrict access' => FALSE,
|
||||||
'warning' => !empty($perm_item['restrict access']) ? $this->t('Warning: Give to trusted roles only; this permission has security implications.') : '',
|
'warning' => !empty($perm_item['restrict access']) ? $this->t('Warning: Give to trusted roles only; this permission has security implications.') : '',
|
||||||
);
|
);
|
||||||
$options[$perm] = '';
|
$options[$perm] = $perm_item['title'];
|
||||||
$user_permission_description = array(
|
$user_permission_description = array(
|
||||||
'#theme' => 'user_permission_description',
|
'#theme' => 'user_permission_description',
|
||||||
'#permission_item' => $perm_item,
|
'#permission_item' => $perm_item,
|
||||||
|
|
|
||||||
|
|
@ -35,6 +35,7 @@ class Text extends TokenizeAreaPluginBase {
|
||||||
parent::buildOptionsForm($form, $form_state);
|
parent::buildOptionsForm($form, $form_state);
|
||||||
|
|
||||||
$form['content'] = array(
|
$form['content'] = array(
|
||||||
|
'#title' => t('Content'),
|
||||||
'#type' => 'text_format',
|
'#type' => 'text_format',
|
||||||
'#default_value' => $this->options['content'],
|
'#default_value' => $this->options['content'],
|
||||||
'#rows' => 6,
|
'#rows' => 6,
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,7 @@ class TextCustom extends TokenizeAreaPluginBase {
|
||||||
parent::buildOptionsForm($form, $form_state);
|
parent::buildOptionsForm($form, $form_state);
|
||||||
|
|
||||||
$form['content'] = array(
|
$form['content'] = array(
|
||||||
|
'#title' => t('Content'),
|
||||||
'#type' => 'textarea',
|
'#type' => 'textarea',
|
||||||
'#default_value' => $this->options['content'],
|
'#default_value' => $this->options['content'],
|
||||||
'#rows' => 6,
|
'#rows' => 6,
|
||||||
|
|
|
||||||
|
|
@ -184,6 +184,8 @@ abstract class ArgumentPluginBase extends HandlerBase {
|
||||||
'#markup' => '<div class="clearfix"></div>',
|
'#markup' => '<div class="clearfix"></div>',
|
||||||
);
|
);
|
||||||
$form['default_action'] = array(
|
$form['default_action'] = array(
|
||||||
|
'#title' => t('Default actions'),
|
||||||
|
'#title_display' => 'invisible',
|
||||||
'#type' => 'radios',
|
'#type' => 'radios',
|
||||||
'#process' => array(array($this, 'processContainerRadios')),
|
'#process' => array(array($this, 'processContainerRadios')),
|
||||||
'#default_value' => $this->options['default_action'],
|
'#default_value' => $this->options['default_action'],
|
||||||
|
|
|
||||||
|
|
@ -185,6 +185,7 @@ class Attachment extends DisplayPluginBase {
|
||||||
case 'attachment_position':
|
case 'attachment_position':
|
||||||
$form['#title'] .= t('Position');
|
$form['#title'] .= t('Position');
|
||||||
$form['attachment_position'] = array(
|
$form['attachment_position'] = array(
|
||||||
|
'#title' => t('Position'),
|
||||||
'#type' => 'radios',
|
'#type' => 'radios',
|
||||||
'#description' => t('Attach before or after the parent display?'),
|
'#description' => t('Attach before or after the parent display?'),
|
||||||
'#options' => $this->attachmentPositions(),
|
'#options' => $this->attachmentPositions(),
|
||||||
|
|
@ -200,6 +201,7 @@ class Attachment extends DisplayPluginBase {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$form['displays'] = array(
|
$form['displays'] = array(
|
||||||
|
'#title' => t('Displays'),
|
||||||
'#type' => 'checkboxes',
|
'#type' => 'checkboxes',
|
||||||
'#description' => t('Select which display or displays this should attach to.'),
|
'#description' => t('Select which display or displays this should attach to.'),
|
||||||
'#options' => $displays,
|
'#options' => $displays,
|
||||||
|
|
|
||||||
|
|
@ -1411,6 +1411,7 @@ abstract class DisplayPluginBase extends PluginBase {
|
||||||
case 'title':
|
case 'title':
|
||||||
$form['#title'] .= t('The title of this view');
|
$form['#title'] .= t('The title of this view');
|
||||||
$form['title'] = array(
|
$form['title'] = array(
|
||||||
|
'#title' => t('Title'),
|
||||||
'#type' => 'textfield',
|
'#type' => 'textfield',
|
||||||
'#description' => t('This title will be displayed with the view, wherever titles are normally displayed; i.e, as the page title, block title, etc.'),
|
'#description' => t('This title will be displayed with the view, wherever titles are normally displayed; i.e, as the page title, block title, etc.'),
|
||||||
'#default_value' => $this->getOption('title'),
|
'#default_value' => $this->getOption('title'),
|
||||||
|
|
@ -1500,6 +1501,8 @@ abstract class DisplayPluginBase extends PluginBase {
|
||||||
|
|
||||||
$access = $this->getOption('access');
|
$access = $this->getOption('access');
|
||||||
$form['access']['type'] = array(
|
$form['access']['type'] = array(
|
||||||
|
'#title' => t('Access'),
|
||||||
|
'#title_display' => 'invisible',
|
||||||
'#type' => 'radios',
|
'#type' => 'radios',
|
||||||
'#options' => views_fetch_plugin_names('access', $this->getType(), array($this->view->storage->get('base_table'))),
|
'#options' => views_fetch_plugin_names('access', $this->getType(), array($this->view->storage->get('base_table'))),
|
||||||
'#default_value' => $access['type'],
|
'#default_value' => $access['type'],
|
||||||
|
|
@ -1535,6 +1538,8 @@ abstract class DisplayPluginBase extends PluginBase {
|
||||||
|
|
||||||
$cache = $this->getOption('cache');
|
$cache = $this->getOption('cache');
|
||||||
$form['cache']['type'] = array(
|
$form['cache']['type'] = array(
|
||||||
|
'#title' => t('Caching'),
|
||||||
|
'#title_display' => 'invisible',
|
||||||
'#type' => 'radios',
|
'#type' => 'radios',
|
||||||
'#options' => views_fetch_plugin_names('cache', $this->getType(), array($this->view->storage->get('base_table'))),
|
'#options' => views_fetch_plugin_names('cache', $this->getType(), array($this->view->storage->get('base_table'))),
|
||||||
'#default_value' => $cache['type'],
|
'#default_value' => $cache['type'],
|
||||||
|
|
@ -1626,6 +1631,8 @@ abstract class DisplayPluginBase extends PluginBase {
|
||||||
$form['#title'] .= t('How should this view be styled');
|
$form['#title'] .= t('How should this view be styled');
|
||||||
$style_plugin = $this->getPlugin('style');
|
$style_plugin = $this->getPlugin('style');
|
||||||
$form['style'] = array(
|
$form['style'] = array(
|
||||||
|
'#title' => t('Style'),
|
||||||
|
'#title_display' => 'invisible',
|
||||||
'#type' => 'radios',
|
'#type' => 'radios',
|
||||||
'#options' => views_fetch_plugin_names('style', $this->getType(), array($this->view->storage->get('base_table'))),
|
'#options' => views_fetch_plugin_names('style', $this->getType(), array($this->view->storage->get('base_table'))),
|
||||||
'#default_value' => $style_plugin->definition['id'],
|
'#default_value' => $style_plugin->definition['id'],
|
||||||
|
|
@ -1668,6 +1675,8 @@ abstract class DisplayPluginBase extends PluginBase {
|
||||||
$form['#title'] .= t('How should each row in this view be styled');
|
$form['#title'] .= t('How should each row in this view be styled');
|
||||||
$row_plugin_instance = $this->getPlugin('row');
|
$row_plugin_instance = $this->getPlugin('row');
|
||||||
$form['row'] = array(
|
$form['row'] = array(
|
||||||
|
'#title' => t('Row'),
|
||||||
|
'#title_display' => 'invisible',
|
||||||
'#type' => 'radios',
|
'#type' => 'radios',
|
||||||
'#options' => views_fetch_plugin_names('row', $this->getType(), array($this->view->storage->get('base_table'))),
|
'#options' => views_fetch_plugin_names('row', $this->getType(), array($this->view->storage->get('base_table'))),
|
||||||
'#default_value' => $row_plugin_instance->definition['id'],
|
'#default_value' => $row_plugin_instance->definition['id'],
|
||||||
|
|
@ -1692,6 +1701,7 @@ abstract class DisplayPluginBase extends PluginBase {
|
||||||
$options['custom_url'] = t('Custom URL');
|
$options['custom_url'] = t('Custom URL');
|
||||||
if (count($options)) {
|
if (count($options)) {
|
||||||
$form['link_display'] = array(
|
$form['link_display'] = array(
|
||||||
|
'#title' => t('Custom URL'),
|
||||||
'#type' => 'radios',
|
'#type' => 'radios',
|
||||||
'#options' => $options,
|
'#options' => $options,
|
||||||
'#description' => t("Which display to use to get this display's path for things like summary links, rss feed links, more links, etc."),
|
'#description' => t("Which display to use to get this display's path for things like summary links, rss feed links, more links, etc."),
|
||||||
|
|
@ -1859,6 +1869,8 @@ abstract class DisplayPluginBase extends PluginBase {
|
||||||
'#suffix' => '</div>',
|
'#suffix' => '</div>',
|
||||||
);
|
);
|
||||||
$form['box']['theme'] = array(
|
$form['box']['theme'] = array(
|
||||||
|
'#title' => t('Theme'),
|
||||||
|
'#title_display' => 'invisible',
|
||||||
'#type' => 'select',
|
'#type' => 'select',
|
||||||
'#options' => $options,
|
'#options' => $options,
|
||||||
'#default_value' => $this->theme,
|
'#default_value' => $this->theme,
|
||||||
|
|
@ -1987,6 +1999,8 @@ abstract class DisplayPluginBase extends PluginBase {
|
||||||
|
|
||||||
$exposed_form = $this->getOption('exposed_form');
|
$exposed_form = $this->getOption('exposed_form');
|
||||||
$form['exposed_form']['type'] = array(
|
$form['exposed_form']['type'] = array(
|
||||||
|
'#title' => t('Exposed form'),
|
||||||
|
'#title_display' => 'invisible',
|
||||||
'#type' => 'radios',
|
'#type' => 'radios',
|
||||||
'#options' => views_fetch_plugin_names('exposed_form', $this->getType(), array($this->view->storage->get('base_table'))),
|
'#options' => views_fetch_plugin_names('exposed_form', $this->getType(), array($this->view->storage->get('base_table'))),
|
||||||
'#default_value' => $exposed_form['type'],
|
'#default_value' => $exposed_form['type'],
|
||||||
|
|
@ -2021,6 +2035,8 @@ abstract class DisplayPluginBase extends PluginBase {
|
||||||
|
|
||||||
$pager = $this->getOption('pager');
|
$pager = $this->getOption('pager');
|
||||||
$form['pager']['type'] = array(
|
$form['pager']['type'] = array(
|
||||||
|
'#title' => t('Pager'),
|
||||||
|
'#title_display' => 'invisible',
|
||||||
'#type' => 'radios',
|
'#type' => 'radios',
|
||||||
'#options' => views_fetch_plugin_names('pager', !$this->usesPager() ? 'basic' : NULL, array($this->view->storage->get('base_table'))),
|
'#options' => views_fetch_plugin_names('pager', !$this->usesPager() ? 'basic' : NULL, array($this->view->storage->get('base_table'))),
|
||||||
'#default_value' => $pager['type'],
|
'#default_value' => $pager['type'],
|
||||||
|
|
|
||||||
|
|
@ -218,6 +218,7 @@ class Feed extends PathPluginBase {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$form['displays'] = array(
|
$form['displays'] = array(
|
||||||
|
'#title' => t('Displays'),
|
||||||
'#type' => 'checkboxes',
|
'#type' => 'checkboxes',
|
||||||
'#description' => t('The feed icon will be available only to the selected displays.'),
|
'#description' => t('The feed icon will be available only to the selected displays.'),
|
||||||
'#options' => $displays,
|
'#options' => $displays,
|
||||||
|
|
|
||||||
|
|
@ -305,6 +305,7 @@ abstract class PathPluginBase extends DisplayPluginBase implements DisplayRouter
|
||||||
$form['#title'] .= t('The menu path or URL of this view');
|
$form['#title'] .= t('The menu path or URL of this view');
|
||||||
$form['path'] = array(
|
$form['path'] = array(
|
||||||
'#type' => 'textfield',
|
'#type' => 'textfield',
|
||||||
|
'#title' => t('Path'),
|
||||||
'#description' => t('This view will be displayed by visiting this path on your site. You may use "%" in your URL to represent values that will be used for contextual filters: For example, "node/%/feed".'),
|
'#description' => t('This view will be displayed by visiting this path on your site. You may use "%" in your URL to represent values that will be used for contextual filters: For example, "node/%/feed".'),
|
||||||
'#default_value' => $this->getOption('path'),
|
'#default_value' => $this->getOption('path'),
|
||||||
'#field_prefix' => '<span dir="ltr">' . url(NULL, array('absolute' => TRUE)),
|
'#field_prefix' => '<span dir="ltr">' . url(NULL, array('absolute' => TRUE)),
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@
|
||||||
namespace Drupal\views\Plugin\views\filter;
|
namespace Drupal\views\Plugin\views\filter;
|
||||||
|
|
||||||
use Drupal\views\Plugin\views\HandlerBase;
|
use Drupal\views\Plugin\views\HandlerBase;
|
||||||
|
use Drupal\Component\Utility\String;
|
||||||
use Drupal\views\Plugin\views\display\DisplayPluginBase;
|
use Drupal\views\Plugin\views\display\DisplayPluginBase;
|
||||||
use Drupal\Component\Annotation\Plugin;
|
use Drupal\Component\Annotation\Plugin;
|
||||||
use Drupal\views\ViewExecutable;
|
use Drupal\views\ViewExecutable;
|
||||||
|
|
@ -745,6 +746,7 @@ abstract class FilterPluginBase extends HandlerBase {
|
||||||
$value = $this->options['group_info']['identifier'];
|
$value = $this->options['group_info']['identifier'];
|
||||||
|
|
||||||
$form[$value] = array(
|
$form[$value] = array(
|
||||||
|
'#title' => String::checkPlain($this->options['group_info']['label']),
|
||||||
'#type' => $this->options['group_info']['widget'],
|
'#type' => $this->options['group_info']['widget'],
|
||||||
'#default_value' => $this->group_info,
|
'#default_value' => $this->group_info,
|
||||||
'#options' => $groups,
|
'#options' => $groups,
|
||||||
|
|
@ -785,10 +787,6 @@ abstract class FilterPluginBase extends HandlerBase {
|
||||||
$this->operatorForm($form, $form_state);
|
$this->operatorForm($form, $form_state);
|
||||||
$form[$operator] = $form['operator'];
|
$form[$operator] = $form['operator'];
|
||||||
|
|
||||||
if (isset($form[$operator]['#title'])) {
|
|
||||||
unset($form[$operator]['#title']);
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->exposedTranslate($form[$operator], 'operator');
|
$this->exposedTranslate($form[$operator], 'operator');
|
||||||
|
|
||||||
unset($form['operator']);
|
unset($form['operator']);
|
||||||
|
|
@ -954,7 +952,7 @@ abstract class FilterPluginBase extends HandlerBase {
|
||||||
// In each row, we have to display the operator form and the value from
|
// In each row, we have to display the operator form and the value from
|
||||||
// $row acts as a fake form to render each widget in a row.
|
// $row acts as a fake form to render each widget in a row.
|
||||||
$row = array();
|
$row = array();
|
||||||
$groups[$item_id] = '';
|
$groups[$item_id] = t('Grouping @id', array('@id' => $item_id));
|
||||||
$this->operatorForm($row, $form_state);
|
$this->operatorForm($row, $form_state);
|
||||||
// Force the operator form to be a select box. Some handlers uses
|
// Force the operator form to be a select box. Some handlers uses
|
||||||
// radios and they occupy a lot of space in a table row.
|
// radios and they occupy a lot of space in a table row.
|
||||||
|
|
@ -1012,12 +1010,16 @@ abstract class FilterPluginBase extends HandlerBase {
|
||||||
// Per item group, we have a title that identifies it.
|
// Per item group, we have a title that identifies it.
|
||||||
$form['group_info']['group_items'][$item_id] = array(
|
$form['group_info']['group_items'][$item_id] = array(
|
||||||
'title' => array(
|
'title' => array(
|
||||||
|
'#title' => t('Label'),
|
||||||
|
'#title_display' => 'invisible',
|
||||||
'#type' => 'textfield',
|
'#type' => 'textfield',
|
||||||
'#size' => 20,
|
'#size' => 20,
|
||||||
'#default_value' => $default_title,
|
'#default_value' => $default_title,
|
||||||
),
|
),
|
||||||
'operator' => $row['operator'],
|
'operator' => $row['operator'],
|
||||||
'value' => $row['value'],
|
'value' => $row['value'],
|
||||||
|
// No title is given here, since this input is never displayed. It is
|
||||||
|
// only triggered by JavaScript.
|
||||||
'remove' => array(
|
'remove' => array(
|
||||||
'#type' => 'checkbox',
|
'#type' => 'checkbox',
|
||||||
'#id' => 'views-removed-' . $item_id,
|
'#id' => 'views-removed-' . $item_id,
|
||||||
|
|
@ -1025,6 +1027,8 @@ abstract class FilterPluginBase extends HandlerBase {
|
||||||
'#default_value' => 0,
|
'#default_value' => 0,
|
||||||
),
|
),
|
||||||
'weight' => array(
|
'weight' => array(
|
||||||
|
'#title' => t('Weight'),
|
||||||
|
'#title_display' => 'invisible',
|
||||||
'#type' => 'weight',
|
'#type' => 'weight',
|
||||||
'#delta' => 10,
|
'#delta' => 10,
|
||||||
'#default_value' => $default_weight++,
|
'#default_value' => $default_weight++,
|
||||||
|
|
|
||||||
|
|
@ -164,6 +164,7 @@ abstract class SortPluginBase extends HandlerBase {
|
||||||
$options = $this->sortOptions();
|
$options = $this->sortOptions();
|
||||||
if (!empty($options)) {
|
if (!empty($options)) {
|
||||||
$form['order'] = array(
|
$form['order'] = array(
|
||||||
|
'#title' => t('Order'),
|
||||||
'#type' => 'radios',
|
'#type' => 'radios',
|
||||||
'#options' => $options,
|
'#options' => $options,
|
||||||
'#default_value' => $this->options['order'],
|
'#default_value' => $this->options['order'],
|
||||||
|
|
|
||||||
|
|
@ -301,12 +301,16 @@ class Table extends StylePluginBase {
|
||||||
$column_selector = ':input[name="style_options[columns][' . $field . ']"]';
|
$column_selector = ':input[name="style_options[columns][' . $field . ']"]';
|
||||||
|
|
||||||
$form['columns'][$field] = array(
|
$form['columns'][$field] = array(
|
||||||
|
'#title' => t('Columns for @field', array('@field' => $field)),
|
||||||
|
'#title_display' => 'invisible',
|
||||||
'#type' => 'select',
|
'#type' => 'select',
|
||||||
'#options' => $field_names,
|
'#options' => $field_names,
|
||||||
'#default_value' => $column,
|
'#default_value' => $column,
|
||||||
);
|
);
|
||||||
if ($handlers[$field]->clickSortable()) {
|
if ($handlers[$field]->clickSortable()) {
|
||||||
$form['info'][$field]['sortable'] = array(
|
$form['info'][$field]['sortable'] = array(
|
||||||
|
'#title' => t('Sortable for @field', array('@field' => $field)),
|
||||||
|
'#title_display' => 'invisible',
|
||||||
'#type' => 'checkbox',
|
'#type' => 'checkbox',
|
||||||
'#default_value' => !empty($this->options['info'][$field]['sortable']),
|
'#default_value' => !empty($this->options['info'][$field]['sortable']),
|
||||||
'#states' => array(
|
'#states' => array(
|
||||||
|
|
@ -316,6 +320,8 @@ class Table extends StylePluginBase {
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
$form['info'][$field]['default_sort_order'] = array(
|
$form['info'][$field]['default_sort_order'] = array(
|
||||||
|
'#title' => t('Default sort order for @field', array('@field' => $field)),
|
||||||
|
'#title_display' => 'invisible',
|
||||||
'#type' => 'select',
|
'#type' => 'select',
|
||||||
'#options' => array('asc' => t('Ascending'), 'desc' => t('Descending')),
|
'#options' => array('asc' => t('Ascending'), 'desc' => t('Descending')),
|
||||||
'#default_value' => !empty($this->options['info'][$field]['default_sort_order']) ? $this->options['info'][$field]['default_sort_order'] : 'asc',
|
'#default_value' => !empty($this->options['info'][$field]['default_sort_order']) ? $this->options['info'][$field]['default_sort_order'] : 'asc',
|
||||||
|
|
@ -329,6 +335,8 @@ class Table extends StylePluginBase {
|
||||||
// Provide an ID so we can have such things.
|
// Provide an ID so we can have such things.
|
||||||
$radio_id = drupal_html_id('edit-default-' . $field);
|
$radio_id = drupal_html_id('edit-default-' . $field);
|
||||||
$form['default'][$field] = array(
|
$form['default'][$field] = array(
|
||||||
|
'#title' => t('Default sort for @field', array('@field' => $field)),
|
||||||
|
'#title_display' => 'invisible',
|
||||||
'#type' => 'radio',
|
'#type' => 'radio',
|
||||||
'#return_value' => $field,
|
'#return_value' => $field,
|
||||||
'#parents' => array('style_options', 'default'),
|
'#parents' => array('style_options', 'default'),
|
||||||
|
|
@ -344,6 +352,8 @@ class Table extends StylePluginBase {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
$form['info'][$field]['align'] = array(
|
$form['info'][$field]['align'] = array(
|
||||||
|
'#title' => t('Alignment for @field', array('@field' => $field)),
|
||||||
|
'#title_display' => 'invisible',
|
||||||
'#type' => 'select',
|
'#type' => 'select',
|
||||||
'#default_value' => !empty($this->options['info'][$field]['align']) ? $this->options['info'][$field]['align'] : '',
|
'#default_value' => !empty($this->options['info'][$field]['align']) ? $this->options['info'][$field]['align'] : '',
|
||||||
'#options' => array(
|
'#options' => array(
|
||||||
|
|
@ -359,6 +369,8 @@ class Table extends StylePluginBase {
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
$form['info'][$field]['separator'] = array(
|
$form['info'][$field]['separator'] = array(
|
||||||
|
'#title' => t('Separator for @field', array('@field' => $field)),
|
||||||
|
'#title_display' => 'invisible',
|
||||||
'#type' => 'textfield',
|
'#type' => 'textfield',
|
||||||
'#size' => 10,
|
'#size' => 10,
|
||||||
'#default_value' => isset($this->options['info'][$field]['separator']) ? $this->options['info'][$field]['separator'] : '',
|
'#default_value' => isset($this->options['info'][$field]['separator']) ? $this->options['info'][$field]['separator'] : '',
|
||||||
|
|
@ -369,6 +381,8 @@ class Table extends StylePluginBase {
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
$form['info'][$field]['empty_column'] = array(
|
$form['info'][$field]['empty_column'] = array(
|
||||||
|
'#title' => t('Hide empty column for @field', array('@field' => $field)),
|
||||||
|
'#title_display' => 'invisible',
|
||||||
'#type' => 'checkbox',
|
'#type' => 'checkbox',
|
||||||
'#default_value' => isset($this->options['info'][$field]['empty_column']) ? $this->options['info'][$field]['empty_column'] : FALSE,
|
'#default_value' => isset($this->options['info'][$field]['empty_column']) ? $this->options['info'][$field]['empty_column'] : FALSE,
|
||||||
'#states' => array(
|
'#states' => array(
|
||||||
|
|
@ -378,6 +392,8 @@ class Table extends StylePluginBase {
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
$form['info'][$field]['responsive'] = array(
|
$form['info'][$field]['responsive'] = array(
|
||||||
|
'#title' => t('Responsive setting for @field', array('@field' => $field)),
|
||||||
|
'#title_display' => 'invisible',
|
||||||
'#type' => 'select',
|
'#type' => 'select',
|
||||||
'#default_value' => isset($this->options['info'][$field]['responsive']) ? $this->options['info'][$field]['responsive'] : '',
|
'#default_value' => isset($this->options['info'][$field]['responsive']) ? $this->options['info'][$field]['responsive'] : '',
|
||||||
'#options' => array('' => t('High'), RESPONSIVE_PRIORITY_MEDIUM => t('Medium'), RESPONSIVE_PRIORITY_LOW => t('Low')),
|
'#options' => array('' => t('High'), RESPONSIVE_PRIORITY_MEDIUM => t('Medium'), RESPONSIVE_PRIORITY_LOW => t('Low')),
|
||||||
|
|
@ -396,6 +412,8 @@ class Table extends StylePluginBase {
|
||||||
|
|
||||||
// Provide a radio for no default sort
|
// Provide a radio for no default sort
|
||||||
$form['default'][-1] = array(
|
$form['default'][-1] = array(
|
||||||
|
'#title' => t('No default sort'),
|
||||||
|
'#title_display' => 'invisible',
|
||||||
'#type' => 'radio',
|
'#type' => 'radio',
|
||||||
'#return_value' => -1,
|
'#return_value' => -1,
|
||||||
'#parents' => array('style_options', 'default'),
|
'#parents' => array('style_options', 'default'),
|
||||||
|
|
|
||||||
|
|
@ -211,6 +211,7 @@ abstract class WizardPluginBase extends PluginBase implements WizardInterface {
|
||||||
|
|
||||||
$form['displays']['page'] = array(
|
$form['displays']['page'] = array(
|
||||||
'#type' => 'fieldset',
|
'#type' => 'fieldset',
|
||||||
|
'#title' => t('Page settings'),
|
||||||
'#attributes' => array('class' => array('views-attachment', 'fieldset-no-legend')),
|
'#attributes' => array('class' => array('views-attachment', 'fieldset-no-legend')),
|
||||||
'#tree' => TRUE,
|
'#tree' => TRUE,
|
||||||
);
|
);
|
||||||
|
|
@ -248,6 +249,7 @@ abstract class WizardPluginBase extends PluginBase implements WizardInterface {
|
||||||
);
|
);
|
||||||
$form['displays']['page']['options']['style'] = array(
|
$form['displays']['page']['options']['style'] = array(
|
||||||
'#type' => 'fieldset',
|
'#type' => 'fieldset',
|
||||||
|
'#title' => t('Page display settings'),
|
||||||
'#attributes' => array('class' => array('container-inline', 'fieldset-no-legend')),
|
'#attributes' => array('class' => array('container-inline', 'fieldset-no-legend')),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
@ -354,6 +356,7 @@ abstract class WizardPluginBase extends PluginBase implements WizardInterface {
|
||||||
|
|
||||||
$form['displays']['block'] = array(
|
$form['displays']['block'] = array(
|
||||||
'#type' => 'fieldset',
|
'#type' => 'fieldset',
|
||||||
|
'#title' => t('Block settings'),
|
||||||
'#attributes' => array('class' => array('views-attachment', 'fieldset-no-legend')),
|
'#attributes' => array('class' => array('views-attachment', 'fieldset-no-legend')),
|
||||||
'#tree' => TRUE,
|
'#tree' => TRUE,
|
||||||
);
|
);
|
||||||
|
|
@ -385,6 +388,7 @@ abstract class WizardPluginBase extends PluginBase implements WizardInterface {
|
||||||
);
|
);
|
||||||
$form['displays']['block']['options']['style'] = array(
|
$form['displays']['block']['options']['style'] = array(
|
||||||
'#type' => 'fieldset',
|
'#type' => 'fieldset',
|
||||||
|
'#title' => t('Block display settings'),
|
||||||
'#attributes' => array('class' => array('container-inline', 'fieldset-no-legend')),
|
'#attributes' => array('class' => array('container-inline', 'fieldset-no-legend')),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -82,6 +82,7 @@ class DisplayTest extends DisplayPluginBase {
|
||||||
case 'test_option':
|
case 'test_option':
|
||||||
$form['#title'] .= t('Test option');
|
$form['#title'] .= t('Test option');
|
||||||
$form['test_option'] = array(
|
$form['test_option'] = array(
|
||||||
|
'#title' => t('Test option'),
|
||||||
'#type' => 'textfield',
|
'#type' => 'textfield',
|
||||||
'#description' => t('This is a textfield for test_option.'),
|
'#description' => t('This is a textfield for test_option.'),
|
||||||
'#default_value' => $this->getOption('test_option'),
|
'#default_value' => $this->getOption('test_option'),
|
||||||
|
|
|
||||||
|
|
@ -69,6 +69,7 @@ class DisplayExtenderTest extends DisplayExtenderPluginBase {
|
||||||
case 'test_extender_test_option':
|
case 'test_extender_test_option':
|
||||||
$form['#title'] .= t('Test option');
|
$form['#title'] .= t('Test option');
|
||||||
$form['test_extender_test_option'] = array(
|
$form['test_extender_test_option'] = array(
|
||||||
|
'#title' => t('Test option'),
|
||||||
'#type' => 'textfield',
|
'#type' => 'textfield',
|
||||||
'#description' => t('This is a textfield for test_option.'),
|
'#description' => t('This is a textfield for test_option.'),
|
||||||
'#default_value' => $this->displayHandler->getOption('test_extender_test_option'),
|
'#default_value' => $this->displayHandler->getOption('test_extender_test_option'),
|
||||||
|
|
|
||||||
|
|
@ -50,6 +50,7 @@ class RowTest extends RowPluginBase {
|
||||||
parent::buildOptionsForm($form, $form_state);
|
parent::buildOptionsForm($form, $form_state);
|
||||||
|
|
||||||
$form['test_option'] = array(
|
$form['test_option'] = array(
|
||||||
|
'#title' => t('Test option'),
|
||||||
'#type' => 'textfield',
|
'#type' => 'textfield',
|
||||||
'#description' => t('This is a textfield for test_option.'),
|
'#description' => t('This is a textfield for test_option.'),
|
||||||
'#default_value' => $this->options['test_option'],
|
'#default_value' => $this->options['test_option'],
|
||||||
|
|
|
||||||
|
|
@ -58,6 +58,7 @@ class StyleTest extends StylePluginBase {
|
||||||
parent::buildOptionsForm($form, $form_state);
|
parent::buildOptionsForm($form, $form_state);
|
||||||
|
|
||||||
$form['test_option'] = array(
|
$form['test_option'] = array(
|
||||||
|
'#title' => t('Test option'),
|
||||||
'#type' => 'textfield',
|
'#type' => 'textfield',
|
||||||
'#description' => t('This is a textfield for test_option.'),
|
'#description' => t('This is a textfield for test_option.'),
|
||||||
'#default_value' => $this->options['test_option'],
|
'#default_value' => $this->options['test_option'],
|
||||||
|
|
|
||||||
|
|
@ -95,23 +95,26 @@ class Rearrange extends ViewsFormBase {
|
||||||
if (!empty($field['relationship']) && !empty($relationships[$field['relationship']])) {
|
if (!empty($field['relationship']) && !empty($relationships[$field['relationship']])) {
|
||||||
$name = '(' . $relationships[$field['relationship']] . ') ' . $name;
|
$name = '(' . $relationships[$field['relationship']] . ') ' . $name;
|
||||||
}
|
}
|
||||||
|
$markup = $name;
|
||||||
$form['fields'][$id]['name'] = array(
|
|
||||||
'#markup' => $name,
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$form['fields'][$id]['name'] = array('#markup' => $this->t('Broken field @id', array('@id' => $id)));
|
$name = $id;
|
||||||
|
$markup = $this->t('Broken field @id', array('@id' => $id));
|
||||||
}
|
}
|
||||||
|
$form['fields'][$id]['name'] = array('#markup' => $markup);
|
||||||
|
|
||||||
$form['fields'][$id]['weight'] = array(
|
$form['fields'][$id]['weight'] = array(
|
||||||
'#type' => 'textfield',
|
'#type' => 'textfield',
|
||||||
'#default_value' => ++$count,
|
'#default_value' => ++$count,
|
||||||
'#attributes' => array('class' => array('weight')),
|
'#attributes' => array('class' => array('weight')),
|
||||||
|
'#title' => t('Weight for @title', array('@title' => $name)),
|
||||||
|
'#title_display' => 'invisible',
|
||||||
);
|
);
|
||||||
|
|
||||||
$form['fields'][$id]['removed'] = array(
|
$form['fields'][$id]['removed'] = array(
|
||||||
'#type' => 'checkbox',
|
'#type' => 'checkbox',
|
||||||
|
'#title' => t('Remove @title', array('@title' => $name)),
|
||||||
|
'#title_display' => 'invisible',
|
||||||
'#id' => 'views-removed-' . $id,
|
'#id' => 'views-removed-' . $id,
|
||||||
'#attributes' => array('class' => array('views-remove-checkbox')),
|
'#attributes' => array('class' => array('views-remove-checkbox')),
|
||||||
'#default_value' => 0,
|
'#default_value' => 0,
|
||||||
|
|
@ -119,11 +122,6 @@ class Rearrange extends ViewsFormBase {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
$name = NULL;
|
|
||||||
if (isset($form_state['update_name'])) {
|
|
||||||
$name = $form_state['update_name'];
|
|
||||||
}
|
|
||||||
|
|
||||||
$view->getStandardButtons($form, $form_state, 'views_ui_rearrange_form');
|
$view->getStandardButtons($form, $form_state, 'views_ui_rearrange_form');
|
||||||
|
|
||||||
return $form;
|
return $form;
|
||||||
|
|
|
||||||
|
|
@ -158,11 +158,15 @@ class RearrangeFilter extends ViewsFormBase {
|
||||||
$form['#group_renders'][$field['group']][] = $id;
|
$form['#group_renders'][$field['group']][] = $id;
|
||||||
|
|
||||||
$form['filters'][$id]['weight'] = array(
|
$form['filters'][$id]['weight'] = array(
|
||||||
|
'#title' => t('Weight for @id', array('@id' => $id)),
|
||||||
|
'#title_display' => 'invisible',
|
||||||
'#type' => 'textfield',
|
'#type' => 'textfield',
|
||||||
'#default_value' => ++$count,
|
'#default_value' => ++$count,
|
||||||
'#size' => 8,
|
'#size' => 8,
|
||||||
);
|
);
|
||||||
$form['filters'][$id]['group'] = array(
|
$form['filters'][$id]['group'] = array(
|
||||||
|
'#title' => t('Group for @id', array('@id' => $id)),
|
||||||
|
'#title_display' => 'invisible',
|
||||||
'#type' => 'select',
|
'#type' => 'select',
|
||||||
'#options' => $group_options,
|
'#options' => $group_options,
|
||||||
'#default_value' => $field['group'],
|
'#default_value' => $field['group'],
|
||||||
|
|
@ -186,6 +190,8 @@ class RearrangeFilter extends ViewsFormBase {
|
||||||
$form['filters'][$id]['name'] = array('#markup' => $this->t('Broken field @id', array('@id' => $id)));
|
$form['filters'][$id]['name'] = array('#markup' => $this->t('Broken field @id', array('@id' => $id)));
|
||||||
}
|
}
|
||||||
$form['filters'][$id]['removed'] = array(
|
$form['filters'][$id]['removed'] = array(
|
||||||
|
'#title' => t('Remove @id', array('@id' => $id)),
|
||||||
|
'#title_display' => 'invisible',
|
||||||
'#type' => 'checkbox',
|
'#type' => 'checkbox',
|
||||||
'#id' => 'views-removed-' . $id,
|
'#id' => 'views-removed-' . $id,
|
||||||
'#attributes' => array('class' => array('views-remove-checkbox')),
|
'#attributes' => array('class' => array('views-remove-checkbox')),
|
||||||
|
|
|
||||||
|
|
@ -98,6 +98,8 @@ class ReorderDisplays extends ViewsFormBase {
|
||||||
|
|
||||||
$form['displays'][$id]['removed'] = array(
|
$form['displays'][$id]['removed'] = array(
|
||||||
'checkbox' => array(
|
'checkbox' => array(
|
||||||
|
'#title' => t('Remove @id', array('@id' => $id)),
|
||||||
|
'#title_display' => 'invisible',
|
||||||
'#type' => 'checkbox',
|
'#type' => 'checkbox',
|
||||||
'#id' => 'display-removed-' . $id,
|
'#id' => 'display-removed-' . $id,
|
||||||
'#attributes' => array(
|
'#attributes' => array(
|
||||||
|
|
|
||||||
|
|
@ -95,6 +95,7 @@ class BasicSettingsForm extends SystemConfigFormBase {
|
||||||
|
|
||||||
$form['live_preview']['options']['ui_show_sql_query_where'] = array(
|
$form['live_preview']['options']['ui_show_sql_query_where'] = array(
|
||||||
'#type' => 'radios',
|
'#type' => 'radios',
|
||||||
|
'#title' => t('Show SQL query'),
|
||||||
'#options' => array(
|
'#options' => array(
|
||||||
'above' => $this->t('Above the preview'),
|
'above' => $this->t('Above the preview'),
|
||||||
'below' => $this->t('Below the preview'),
|
'below' => $this->t('Below the preview'),
|
||||||
|
|
|
||||||
|
|
@ -69,6 +69,7 @@ class ViewAddFormController extends ViewFormControllerBase {
|
||||||
|
|
||||||
$form['name'] = array(
|
$form['name'] = array(
|
||||||
'#type' => 'fieldset',
|
'#type' => 'fieldset',
|
||||||
|
'#title' => t('View basic information'),
|
||||||
'#attributes' => array('class' => array('fieldset-no-legend')),
|
'#attributes' => array('class' => array('fieldset-no-legend')),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
@ -118,6 +119,7 @@ class ViewAddFormController extends ViewFormControllerBase {
|
||||||
// properties of what the view will display.
|
// properties of what the view will display.
|
||||||
$form['displays']['show'] = array(
|
$form['displays']['show'] = array(
|
||||||
'#type' => 'fieldset',
|
'#type' => 'fieldset',
|
||||||
|
'#title' => t('View settings'),
|
||||||
'#tree' => TRUE,
|
'#tree' => TRUE,
|
||||||
'#attributes' => array('class' => array('container-inline')),
|
'#attributes' => array('class' => array('container-inline')),
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue