Commit c4e52bb6 authored by alexpott's avatar alexpott
Browse files

Issue #1892182 by nod_: #type details: Rename #collapsed to #open.

parent 686a2ef6
......@@ -2859,8 +2859,8 @@ function form_get_options($element, $key) {
* @param $variables
* An associative array containing:
* - element: An associative array containing the properties of the element.
* Properties used: #attributes, #children, #collapsed, #description, #id,
* #title, #value.
* Properties used: #attributes, #children, #description, #id, #title,
* #value.
*
* @ingroup themeable
*/
......@@ -2905,8 +2905,8 @@ function theme_fieldset($variables) {
* @param $variables
* An associative array containing:
* - element: An associative array containing the properties of the element.
* Properties used: #attributes, #children, #collapsed, #description, #id,
* #title, #value.
* Properties used: #attributes, #children, #description, #id, #title,
* #value.
*
* @ingroup themeable
*/
......@@ -2923,7 +2923,7 @@ function theme_details($variables) {
if (!empty($element['#attributes']['id'])) {
$summary_attributes['aria-controls'] = $element['#attributes']['id'];
}
$summary_attributes['aria-expanded'] = empty($element['#attributes']['open']) ? FALSE : TRUE;
$summary_attributes['aria-expanded'] = !empty($element['#attributes']['open']);
$summary_attributes['aria-pressed'] = $summary_attributes['aria-expanded'];
$output .= '<summary' . $summary_attributes . '>' . $element['#title'] . '</summary>';
}
......@@ -3930,7 +3930,7 @@ function form_pre_render_details($element) {
// Collapsible details.
$element['#attached']['library'][] = array('system', 'drupal.collapse');
if (empty($element['#collapsed'])) {
if (!empty($element['#open'])) {
$element['#attributes']['open'] = 'open';
}
......
......@@ -233,7 +233,6 @@ public function getFormOptions($database) {
$form['advanced_options'] = array(
'#type' => 'details',
'#title' => st('Advanced options'),
'#collapsed' => TRUE,
'#description' => st("These options are only necessary for some sites. If you're not sure what you should enter here, leave the default settings or check with your hosting provider."),
'#weight' => 10,
);
......
......@@ -408,7 +408,6 @@ public function getSettingsForm() {
$form['advanced'] = array(
'#type' => 'details',
'#title' => t('Advanced settings'),
'#collapsed' => TRUE,
);
$form['advanced']['hostname'] = array(
'#type' => 'textfield',
......
......@@ -131,7 +131,7 @@ public function buildForm(array $form, array &$form_state) {
'#type' => 'details',
'#title' => t('Basic configuration'),
'#description' => t('For most aggregation tasks, the default settings are fine.'),
'#collapsed' => FALSE,
'#open' => TRUE,
);
$form['basic_conf'] += $basic_conf;
}
......
......@@ -45,7 +45,7 @@ public function settingsForm(array $form, array &$form_state) {
'#type' => 'details',
'#title' => t('Default processor settings'),
'#description' => $info['description'],
'#collapsed' => !in_array($info['id'], $processors),
'#open' => in_array($info['id'], $processors),
);
}
......
......@@ -38,7 +38,7 @@ public function settingsForm(array $form, array &$form_state) {
'#type' => 'details',
'#title' => t('Test processor settings'),
'#description' => $info['description'],
'#collapsed' => !in_array($info['id'], $processors),
'#open' => in_array($info['id'], $processors),
);
// Add some dummy settings to verify settingsForm is called.
$form['processors'][$info['id']]['dummy_length'] = array(
......
......@@ -94,7 +94,7 @@ public function form(array $form, array &$form_state) {
'#title' => t('Revision information'),
'#collapsible' => TRUE,
// Collapsed by default when "Create new revision" is unchecked.
'#collapsed' => !$block->isNewRevision(),
'#open' => $block->isNewRevision(),
'#group' => 'advanced',
'#attributes' => array(
'class' => array('custom-block-form-revision-information'),
......
......@@ -56,8 +56,6 @@ public function form(array $form, array &$form_state) {
$form['language'] = array(
'#type' => 'details',
'#title' => t('Language settings'),
'#collapsible' => TRUE,
'#collapsed' => TRUE,
'#group' => 'additional_settings',
);
......
......@@ -58,7 +58,6 @@ public function form(array $form, array &$form_state) {
$form['visibility']['path'] = array(
'#type' => 'details',
'#title' => t('Pages'),
'#collapsed' => TRUE,
'#group' => 'visibility',
'#weight' => 0,
);
......@@ -121,7 +120,6 @@ public function form(array $form, array &$form_state) {
$form['visibility']['language'] = array(
'#type' => 'details',
'#title' => t('Languages'),
'#collapsed' => TRUE,
'#group' => 'visibility',
'#weight' => 5,
);
......@@ -154,7 +152,6 @@ public function form(array $form, array &$form_state) {
$form['visibility']['role'] = array(
'#type' => 'details',
'#title' => t('Roles'),
'#collapsed' => TRUE,
'#group' => 'visibility',
'#weight' => 10,
);
......
......@@ -416,7 +416,6 @@ function _book_add_form_elements(&$form, &$form_state, EntityInterface $node) {
'#type' => 'details',
'#title' => t('Book outline'),
'#weight' => 10,
'#collapsed' => TRUE,
'#group' => 'advanced',
'#attributes' => array(
'class' => array('book-outline-form'),
......
......@@ -993,7 +993,6 @@ function comment_form_node_type_form_alter(&$form, $form_state) {
$form['comment'] = array(
'#type' => 'details',
'#title' => t('Comment settings'),
'#collapsed' => TRUE,
'#group' => 'additional_settings',
'#attributes' => array(
'class' => array('comment-node-type-settings-form'),
......@@ -1099,7 +1098,6 @@ function comment_form_node_form_alter(&$form, $form_state) {
'#type' => 'details',
'#access' => user_access('administer comments'),
'#title' => t('Comment settings'),
'#collapsed' => TRUE,
'#group' => 'advanced',
'#attributes' => array(
'class' => array('comment-node-settings-form'),
......
......@@ -54,7 +54,6 @@ public function form(array $form, array &$form_state) {
$form['author'] += array(
'#type' => 'details',
'#title' => t('Administration'),
'#collapsed' => TRUE,
);
}
......
......@@ -230,7 +230,7 @@ function dblog_filter_form($form) {
$form['filters'] = array(
'#type' => 'details',
'#title' => t('Filter log messages'),
'#collapsed' => empty($_SESSION['dblog_overview_filter']),
'#open' => !empty($_SESSION['dblog_overview_filter']),
);
foreach ($filters as $key => $filter) {
$form['filters']['status'][$key] = array(
......@@ -307,7 +307,6 @@ function dblog_clear_log_form($form) {
'#type' => 'details',
'#title' => t('Clear log messages'),
'#description' => t('This will permanently remove the log messages from the database.'),
'#collapsed' => TRUE,
);
$form['dblog_clear']['clear'] = array(
'#type' => 'submit',
......
......@@ -460,7 +460,6 @@ function multiple_options_form(&$form, &$form_state) {
$form['multiple_field_settings'] = array(
'#type' => 'details',
'#title' => t('Multiple field settings'),
'#collapsed' => TRUE,
'#weight' => 5,
);
......
......@@ -352,7 +352,6 @@ public function buildForm(array $form, array &$form_state, $entity_type = NULL,
$form['modes'] = array(
'#type' => 'details',
'#title' => t('Custom display settings'),
'#collapsed' => TRUE,
);
// Collect options and default values for the 'Custom display settings'
// checkboxes.
......
......@@ -617,7 +617,6 @@ function language_negotiation_configure_browser_form($form, &$form_state) {
$form['new_mapping'] = array(
'#type' => 'details',
'#title' => t('Add a new mapping'),
'#collapsed' => TRUE,
'#tree' => TRUE,
);
$form['new_mapping']['browser_langcode'] = array(
......
......@@ -177,7 +177,6 @@ function locale_translate_export_form($form, &$form_state) {
$form['content_options'] = array(
'#type' => 'details',
'#title' => t('Export options'),
'#collapsed' => TRUE,
'#tree' => TRUE,
'#states' => array(
'invisible' => array(
......
......@@ -170,7 +170,7 @@ function locale_translate_filter_form($form, &$form_state) {
$form['filters'] = array(
'#type' => 'details',
'#title' => t('Filter translatable strings'),
'#collapsed' => FALSE,
'#open' => TRUE,
);
foreach ($filters as $key => $filter) {
// Special case for 'string' filter.
......
......@@ -569,7 +569,7 @@ function menu_form_node_form_alter(&$form, $form_state) {
'#type' => 'details',
'#title' => t('Menu settings'),
'#access' => user_access('administer menu'),
'#collapsed' => !$link['link_title'],
'#open' => !empty($link['link_title']),
'#group' => 'advanced',
'#attached' => array(
'library' => array(array('menu', 'drupal.menu')),
......@@ -669,7 +669,6 @@ function menu_form_node_type_form_alter(&$form, $form_state) {
$form['menu'] = array(
'#type' => 'details',
'#title' => t('Menu settings'),
'#collapsed' => TRUE,
'#attached' => array(
'library' => array(array('menu', 'drupal.menu.admin')),
),
......
......@@ -192,7 +192,6 @@ function node_type_form($form, &$form_state, $type = NULL) {
$form['workflow'] = array(
'#type' => 'details',
'#title' => t('Publishing options'),
'#collapsed' => TRUE,
'#group' => 'additional_settings',
);
$form['workflow']['node_options'] = array('#type' => 'checkboxes',
......@@ -210,7 +209,6 @@ function node_type_form($form, &$form_state, $type = NULL) {
$form['language'] = array(
'#type' => 'details',
'#title' => t('Language settings'),
'#collapsed' => TRUE,
'#group' => 'additional_settings',
);
......@@ -229,7 +227,6 @@ function node_type_form($form, &$form_state, $type = NULL) {
$form['display'] = array(
'#type' => 'details',
'#title' => t('Display settings'),
'#collapsed' => TRUE,
'#group' => 'additional_settings',
);
$form['display']['node_submitted'] = array(
......
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