Commit 1f5e126d authored by Dries's avatar Dries
Browse files

Issue #1852104 by sun, nod_, Cottser, swentel: #type details: Remove #collapsible property.

parent e7ecf68c
......@@ -1710,10 +1710,9 @@ function form_error(&$element, $message = '') {
* can also be used to set additional properties or implement special logic
* other than adding child elements: for example, for the 'details' element
* type, one of the functions in this array is form_process_details(), which
* adds the attributes and JavaScript needed to make the details collapsible
* if the #collapsible property is set. The #process functions are called in
* preorder traversal, meaning they are called for the parent element first,
* then for the child elements.
* adds the attributes and JavaScript needed to make the details work in older
* browsers. The #process functions are called in preorder traversal, meaning
* they are called for the parent element first, then for the child elements.
* - $element['#after_build']: An array of functions called after form_builder()
* is done with its processing of the element. These are called in postorder
* traversal, meaning they are called for the child elements first, then for
......@@ -2817,8 +2816,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, #collapsible,
* #description, #id, #title, #value.
* Properties used: #attributes, #children, #collapsed, #description, #id,
* #title, #value.
*
* @ingroup themeable
*/
......@@ -2863,8 +2862,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, #collapsible,
* #description, #id, #title, #value.
* Properties used: #attributes, #children, #collapsed, #description, #id,
* #title, #value.
*
* @ingroup themeable
*/
......@@ -3972,10 +3971,7 @@ function form_pre_render_details($element) {
}
// Collapsible details.
if (!empty($element['#collapsible'])) {
$element['#attached']['library'][] = array('system', 'drupal.collapse');
$element['#attributes']['class'][] = 'collapsible';
}
$element['#attached']['library'][] = array('system', 'drupal.collapse');
if (empty($element['#collapsed'])) {
$element['#attributes']['open'] = 'open';
}
......
......@@ -2189,7 +2189,6 @@ function _install_configure_form($form, &$form_state, &$install_state) {
$form['site_information'] = array(
'#type' => 'details',
'#title' => st('Site information'),
'#collapsible' => FALSE,
);
$form['site_information']['site_name'] = array(
'#type' => 'textfield',
......@@ -2208,7 +2207,6 @@ function _install_configure_form($form, &$form_state, &$install_state) {
$form['admin_account'] = array(
'#type' => 'details',
'#title' => st('Site maintenance account'),
'#collapsible' => FALSE,
);
$form['admin_account']['account']['#tree'] = TRUE;
......@@ -2237,7 +2235,6 @@ function _install_configure_form($form, &$form_state, &$install_state) {
$form['server_settings'] = array(
'#type' => 'details',
'#title' => st('Server settings'),
'#collapsible' => FALSE,
);
$countries = country_get_list();
......@@ -2264,7 +2261,6 @@ function _install_configure_form($form, &$form_state, &$install_state) {
$form['update_notifications'] = array(
'#type' => 'details',
'#title' => st('Update notifications'),
'#collapsible' => FALSE,
);
$form['update_notifications']['update_status_module'] = array(
'#type' => 'checkboxes',
......
......@@ -234,7 +234,6 @@ public function getFormOptions($database) {
$form['advanced_options'] = array(
'#type' => 'details',
'#title' => st('Advanced options'),
'#collapsible' => TRUE,
'#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'),
'#collapsible' => TRUE,
'#collapsed' => TRUE,
);
$form['advanced']['hostname'] = array(
......
......@@ -174,7 +174,7 @@ Drupal.behaviors.collapse = {
if (isDetailsSupported) {
return;
}
var $collapsibleDetails = $(context).find('details.collapsible').once('collapse');
var $collapsibleDetails = $(context).find('details').once('collapse');
if ($collapsibleDetails.length) {
for (var i = 0; i < $collapsibleDetails.length; i++) {
CollapsibleDetails.instances.push(new CollapsibleDetails($collapsibleDetails[i], settings.collapsibleDetails));
......
......@@ -44,7 +44,7 @@ Drupal.behaviors.verticalTabs = {
});
tab_list.append(vertical_tab.item);
$this
.removeClass('collapsible collapsed')
.removeClass('collapsed')
.attr('open', true)
.addClass('vertical-tabs-pane')
.data('verticalTab', vertical_tab);
......
......@@ -413,7 +413,6 @@ function aggregator_admin_form($form, $form_state) {
'#type' => 'details',
'#title' => t('Basic configuration'),
'#description' => t('For most aggregation tasks, the default settings are fine.'),
'#collapsible' => TRUE,
'#collapsed' => FALSE,
);
$form['basic_conf'] += $basic_conf;
......
......@@ -94,13 +94,12 @@ function aggregator_form_aggregator_admin_form_alter(&$form, $form_state) {
$period = drupal_map_assoc(array(3600, 10800, 21600, 32400, 43200, 86400, 172800, 259200, 604800, 1209600, 2419200, 4838400, 9676800), 'format_interval');
$period[AGGREGATOR_CLEAR_NEVER] = t('Never');
// Only wrap into a collapsible details if there is a basic configuration.
// Only wrap into details if there is a basic configuration.
if (isset($form['basic_conf'])) {
$form['modules']['aggregator'] = array(
'#type' => 'details',
'#title' => t('Default processor settings'),
'#description' => $info['description'],
'#collapsible' => TRUE,
'#collapsed' => !in_array('aggregator', $aggregator_processors),
);
}
......
......@@ -434,7 +434,6 @@ function _book_add_form_elements(&$form, &$form_state, Node $node) {
'#type' => 'details',
'#title' => t('Book outline'),
'#weight' => 10,
'#collapsible' => TRUE,
'#collapsed' => TRUE,
'#group' => 'advanced',
'#attributes' => array(
......
......@@ -145,8 +145,6 @@ function book_outline_form($form, &$form_state, Node $node) {
$form['#id'] = 'book-outline';
_book_add_form_elements($form, $form_state, $node);
$form['book']['#collapsible'] = FALSE;
$form['update'] = array(
'#type' => 'submit',
'#value' => $node->book['original_bid'] ? t('Update book outline') : t('Add to book outline'),
......
......@@ -1017,7 +1017,6 @@ function comment_form_node_type_form_alter(&$form, $form_state) {
$form['comment'] = array(
'#type' => 'details',
'#title' => t('Comment settings'),
'#collapsible' => TRUE,
'#collapsed' => TRUE,
'#group' => 'additional_settings',
'#attributes' => array(
......@@ -1124,7 +1123,6 @@ function comment_form_node_form_alter(&$form, $form_state) {
'#type' => 'details',
'#access' => user_access('administer comments'),
'#title' => t('Comment settings'),
'#collapsible' => TRUE,
'#collapsed' => TRUE,
'#group' => 'advanced',
'#attributes' => array(
......
......@@ -53,7 +53,6 @@ public function form(array $form, array &$form_state, EntityInterface $comment)
$form['author'] += array(
'#type' => 'details',
'#title' => t('Administration'),
'#collapsible' => TRUE,
'#collapsed' => TRUE,
);
}
......
......@@ -335,7 +335,6 @@ function contact_form_user_profile_form_alter(&$form, &$form_state) {
'#type' => 'details',
'#title' => t('Contact settings'),
'#weight' => 5,
'#collapsible' => TRUE,
);
$account = $form_state['controller']->getEntity($form_state);
$account_data = drupal_container()->get('user.data')->get('contact', $account->id(), 'enabled');
......
......@@ -320,7 +320,6 @@ function dblog_filter_form($form) {
$form['filters'] = array(
'#type' => 'details',
'#title' => t('Filter log messages'),
'#collapsible' => TRUE,
'#collapsed' => empty($_SESSION['dblog_overview_filter']),
);
foreach ($filters as $key => $filter) {
......@@ -398,7 +397,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.'),
'#collapsible' => TRUE,
'#collapsed' => TRUE,
);
$form['dblog_clear']['clear'] = array(
......
......@@ -467,7 +467,6 @@ function multiple_options_form(&$form, &$form_state) {
$form['multiple_field_settings'] = array(
'#type' => 'details',
'#title' => t('Multiple field settings'),
'#collapsible' => TRUE,
'#collapsed' => TRUE,
'#weight' => 5,
);
......
......@@ -933,7 +933,6 @@ function field_ui_default_value_widget($field, $instance, &$form, &$form_state)
$element = array(
'#type' => 'details',
'#title' => t('Default value'),
'#collapsible' => FALSE,
'#tree' => TRUE,
'#description' => t('The default value for this field, used when creating new content.'),
// Stick to an empty 'parents' on this form in order not to breaks widgets
......
......@@ -352,7 +352,6 @@ public function form(array $form, array &$form_state) {
$form['modes'] = array(
'#type' => 'details',
'#title' => t('Custom display settings'),
'#collapsible' => TRUE,
'#collapsed' => TRUE,
);
// Collect options and default values for the 'Custom display settings'
......
......@@ -828,7 +828,6 @@ function language_negotiation_configure_browser_form($form, &$form_state) {
$form['new_mapping'] = array(
'#type' => 'details',
'#title' => t('Add a new mapping'),
'#collapsible' => TRUE,
'#collapsed' => TRUE,
'#tree' => TRUE,
);
......
......@@ -177,7 +177,6 @@ function locale_translate_export_form($form, &$form_state) {
$form['content_options'] = array(
'#type' => 'details',
'#title' => t('Export options'),
'#collapsible' => TRUE,
'#collapsed' => TRUE,
'#tree' => TRUE,
'#states' => array(
......
......@@ -169,7 +169,6 @@ function locale_translate_filter_form($form, &$form_state) {
$form['filters'] = array(
'#type' => 'details',
'#title' => t('Filter translatable strings'),
'#collapsible' => TRUE,
'#collapsed' => FALSE,
);
foreach ($filters as $key => $filter) {
......
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