Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
02417da6
Commit
02417da6
authored
Feb 26, 2014
by
Angie Byron
Browse files
Issue
#1892182
by sun, nod_, jibran: #type details: Rename #collapsed to #open.
parent
a9be94a5
Changes
76
Hide whitespace changes
Inline
Side-by-side
core/includes/form.inc
View file @
02417da6
...
...
@@ -1004,7 +1004,7 @@ 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,
* Properties used: #attributes, #children, #description, #id,
* #title, #value.
*
* @ingroup themeable
...
...
@@ -1071,7 +1071,7 @@ function theme_fieldset($variables) {
* @param array $variables
* An associative array containing:
* - element: An associative array containing the properties of the element.
* Properties used: #attributes, #children, #
collapsed, #collapsible
,
* Properties used: #attributes, #children, #
open
,
* #description, #id, #title, #value, #optional.
*
* @ingroup themeable
...
...
@@ -1085,7 +1085,7 @@ function template_preprocess_details(&$variables) {
if
(
!
empty
(
$element
[
'#attributes'
][
'id'
]))
{
$variables
[
'summary_attributes'
][
'aria-controls'
]
=
$element
[
'#attributes'
][
'id'
];
}
$variables
[
'summary_attributes'
][
'aria-expanded'
]
=
empty
(
$element
[
'#attributes'
][
'open'
])
?
FALSE
:
TRUE
;
$variables
[
'summary_attributes'
][
'aria-expanded'
]
=
!
empty
(
$element
[
'#attributes'
][
'open'
]);
$variables
[
'summary_attributes'
][
'aria-pressed'
]
=
$variables
[
'summary_attributes'
][
'aria-expanded'
];
}
$variables
[
'title'
]
=
(
!
empty
(
$element
[
'#title'
]))
?
$element
[
'#title'
]
:
''
;
...
...
@@ -2063,7 +2063,7 @@ function form_pre_render_details($element) {
// Collapsible details.
$element
[
'#attached'
][
'library'
][]
=
array
(
'core'
,
'drupal.collapse'
);
if
(
empty
(
$element
[
'#
collapsed
'
]))
{
if
(
!
empty
(
$element
[
'#
open
'
]))
{
$element
[
'#attributes'
][
'open'
]
=
'open'
;
}
...
...
core/lib/Drupal/Core/Database/Install/Tasks.php
View file @
02417da6
...
...
@@ -247,7 +247,6 @@ public function getFormOptions(array $database) {
$form
[
'advanced_options'
]
=
array
(
'#type'
=>
'details'
,
'#title'
=>
t
(
'Advanced options'
),
'#collapsed'
=>
TRUE
,
'#weight'
=>
10
,
);
...
...
core/lib/Drupal/Core/FileTransfer/FileTransfer.php
View file @
02417da6
...
...
@@ -405,7 +405,6 @@ public function getSettingsForm() {
$form
[
'advanced'
]
=
array
(
'#type'
=>
'details'
,
'#title'
=>
t
(
'Advanced settings'
),
'#collapsed'
=>
TRUE
,
);
$form
[
'advanced'
][
'hostname'
]
=
array
(
'#type'
=>
'textfield'
,
...
...
core/lib/Drupal/Core/Update/Form/UpdateScriptSelectionForm.php
View file @
02417da6
...
...
@@ -30,7 +30,6 @@ public function buildForm(array $form, array &$form_state) {
$form
[
'start'
]
=
array
(
'#tree'
=>
TRUE
,
'#type'
=>
'details'
,
'#collapsed'
=>
TRUE
,
);
// Ensure system.module's updates appear first.
...
...
core/modules/action/lib/Drupal/action/Form/ActionAdminManageForm.php
View file @
02417da6
...
...
@@ -65,6 +65,7 @@ public function buildForm(array $form, array &$form_state) {
'#type'
=>
'details'
,
'#title'
=>
$this
->
t
(
'Create an advanced action'
),
'#attributes'
=>
array
(
'class'
=>
array
(
'container-inline'
)),
'#open'
=>
TRUE
,
);
$form
[
'parent'
][
'action'
]
=
array
(
'#type'
=>
'select'
,
...
...
core/modules/aggregator/lib/Drupal/aggregator/Form/SettingsForm.php
View file @
02417da6
...
...
@@ -145,7 +145,7 @@ public function buildForm(array $form, array &$form_state) {
'#type'
=>
'details'
,
'#title'
=>
$this
->
t
(
'Basic configuration'
),
'#description'
=>
$this
->
t
(
'For most aggregation tasks, the default settings are fine.'
),
'#
collapsed
'
=>
FALS
E
,
'#
open
'
=>
TRU
E
,
);
$form
[
'basic_conf'
]
+=
$basic_conf
;
}
...
...
core/modules/aggregator/lib/Drupal/aggregator/Plugin/aggregator/processor/DefaultProcessor.php
View file @
02417da6
...
...
@@ -83,7 +83,7 @@ public function buildConfigurationForm(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
),
);
}
...
...
core/modules/aggregator/tests/modules/aggregator_test/lib/Drupal/aggregator_test/Plugin/aggregator/processor/TestProcessor.php
View file @
02417da6
...
...
@@ -74,7 +74,7 @@ public function buildConfigurationForm(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
(
...
...
core/modules/block/custom_block/lib/Drupal/custom_block/CustomBlockFormController.php
View file @
02417da6
...
...
@@ -134,9 +134,8 @@ public function form(array $form, array &$form_state) {
$form
[
'revision_information'
]
=
array
(
'#type'
=>
'details'
,
'#title'
=>
$this
->
t
(
'Revision information'
),
'#collapsible'
=>
TRUE
,
// Collapsed by default when "Create new revision" is unchecked.
'#collapsed'
=>
!
$block
->
isNewRevision
(),
// Open by default when "Create new revision" is checked.
'#open'
=>
$block
->
isNewRevision
(),
'#group'
=>
'advanced'
,
'#attributes'
=>
array
(
'class'
=>
array
(
'custom-block-form-revision-information'
),
...
...
core/modules/block/custom_block/lib/Drupal/custom_block/CustomBlockTypeFormController.php
View file @
02417da6
...
...
@@ -57,8 +57,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'
,
);
...
...
core/modules/block/lib/Drupal/block/BlockFormController.php
View file @
02417da6
...
...
@@ -127,7 +127,6 @@ public function form(array $form, array &$form_state) {
$form
[
'visibility'
][
'path'
]
=
array
(
'#type'
=>
'details'
,
'#title'
=>
$this
->
t
(
'Pages'
),
'#collapsed'
=>
TRUE
,
'#group'
=>
'visibility'
,
'#weight'
=>
0
,
);
...
...
@@ -183,7 +182,6 @@ public function form(array $form, array &$form_state) {
$form
[
'visibility'
][
'language'
]
=
array
(
'#type'
=>
'details'
,
'#title'
=>
$this
->
t
(
'Languages'
),
'#collapsed'
=>
TRUE
,
'#group'
=>
'visibility'
,
'#weight'
=>
5
,
);
...
...
@@ -216,7 +214,6 @@ public function form(array $form, array &$form_state) {
$form
[
'visibility'
][
'role'
]
=
array
(
'#type'
=>
'details'
,
'#title'
=>
$this
->
t
(
'Roles'
),
'#collapsed'
=>
TRUE
,
'#group'
=>
'visibility'
,
'#weight'
=>
10
,
);
...
...
core/modules/block/lib/Drupal/block/BlockListController.php
View file @
02417da6
...
...
@@ -348,6 +348,7 @@ public function buildForm(array $form, array &$form_state) {
$form
[
'place_blocks'
][
'list'
][
$category_key
]
=
array
(
'#type'
=>
'details'
,
'#title'
=>
$category
,
'#open'
=>
TRUE
,
'content'
=>
array
(
'#theme'
=>
'links'
,
'#links'
=>
array
(),
...
...
core/modules/book/lib/Drupal/book/BookManager.php
View file @
02417da6
...
...
@@ -201,7 +201,6 @@ public function addFormElements(array $form, array &$form_state, NodeInterface $
'#type'
=>
'details'
,
'#title'
=>
$this
->
t
(
'Book outline'
),
'#weight'
=>
10
,
'#collapsed'
=>
TRUE
,
'#group'
=>
'advanced'
,
'#attributes'
=>
array
(
'class'
=>
array
(
'book-outline-form'
),
...
...
core/modules/ckeditor/lib/Drupal/ckeditor/CKEditorPluginManager.php
View file @
02417da6
...
...
@@ -156,6 +156,7 @@ public function injectPluginSettingsForm(array &$form, array &$form_state, Edito
$form
[
'plugins'
][
$plugin_id
]
=
array
(
'#type'
=>
'details'
,
'#title'
=>
$definitions
[
$plugin_id
][
'label'
],
'#open'
=>
TRUE
,
'#group'
=>
'editor][settings][plugin_settings'
,
'#attributes'
=>
array
(
'data-ckeditor-plugin-id'
=>
$plugin_id
,
...
...
core/modules/color/color.module
View file @
02417da6
...
...
@@ -45,6 +45,7 @@ function color_form_system_theme_settings_alter(&$form, &$form_state) {
$form
[
'color'
]
=
array
(
'#type'
=>
'details'
,
'#title'
=>
t
(
'Color scheme'
),
'#open'
=>
TRUE
,
'#weight'
=>
-
1
,
'#attributes'
=>
array
(
'id'
=>
'color_scheme_form'
),
'#theme'
=>
'color_scheme_form'
,
...
...
core/modules/comment/lib/Drupal/comment/CommentFormController.php
View file @
02417da6
...
...
@@ -118,7 +118,6 @@ public function form(array $form, array &$form_state) {
$form
[
'author'
]
+=
array
(
'#type'
=>
'details'
,
'#title'
=>
$this
->
t
(
'Administration'
),
'#collapsed'
=>
TRUE
,
);
}
...
...
core/modules/comment/lib/Drupal/comment/Form/CommentAdminOverview.php
View file @
02417da6
...
...
@@ -119,6 +119,7 @@ public function buildForm(array $form, array &$form_state, $type = 'new') {
$form
[
'options'
]
=
array
(
'#type'
=>
'details'
,
'#title'
=>
$this
->
t
(
'Update options'
),
'#open'
=>
TRUE
,
'#attributes'
=>
array
(
'class'
=>
array
(
'container-inline'
)),
);
...
...
core/modules/comment/lib/Drupal/comment/Plugin/Field/FieldType/CommentItem.php
View file @
02417da6
...
...
@@ -92,8 +92,7 @@ public function instanceSettingsForm(array $form, array &$form_state) {
$element
[
'comment'
]
=
array
(
'#type'
=>
'details'
,
'#title'
=>
t
(
'Comment form settings'
),
'#collapsible'
=>
TRUE
,
'#collapsed'
=>
FALSE
,
'#open'
=>
TRUE
,
'#bundle'
=>
"
{
$entity_type
}
__
{
$field_name
}
"
,
'#process'
=>
array
(
array
(
get_class
(
$this
),
'processSettingsElement'
)),
'#attributes'
=>
array
(
...
...
core/modules/comment/lib/Drupal/comment/Plugin/Field/FieldWidget/CommentWidget.php
View file @
02417da6
...
...
@@ -68,9 +68,9 @@ public function formElement(FieldItemListInterface $items, $delta, array $elemen
if
(
isset
(
$form
[
'advanced'
]))
{
$element
+=
array
(
'#type'
=>
'details'
,
//
Collapse this field
when the selected value is
the same as
stored
in
//
Open the details
when the selected value is
different to the
stored
// default values for the field instance.
'#
collapsed
'
=>
(
$items
->
status
=
=
$field_default_values
[
0
][
'status'
]),
'#
open
'
=>
(
$items
->
status
!
=
$field_default_values
[
0
][
'status'
]),
'#group'
=>
'advanced'
,
'#attributes'
=>
array
(
'class'
=>
array
(
'comment-'
.
drupal_html_class
(
$element
[
'#entity_type'
])
.
'-settings-form'
),
...
...
core/modules/config_translation/lib/Drupal/config_translation/Form/ConfigTranslationFormBase.php
View file @
02417da6
...
...
@@ -293,8 +293,7 @@ protected function buildConfigForm(Element $schema, $config_data, $base_config_d
$build
[
$key
]
=
array
(
'#type'
=>
'details'
,
'#title'
=>
(
!
empty
(
$title
)
?
(
strip_tags
(
$title
)
.
' '
)
:
''
)
.
$this
->
t
(
$definition
[
'label'
]),
'#collapsible'
=>
TRUE
,
'#collapsed'
=>
$collapsed
,
'#open'
=>
!
$collapsed
,
)
+
$sub_build
;
}
}
...
...
Prev
1
2
3
4
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment