Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
field_group
Manage
Activity
Members
Labels
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
drupal.org
field_group
Commits
14a434bf
Commit
14a434bf
authored
6 years ago
by
Nils Destoop
Browse files
Options
Downloads
Plain Diff
Merged 8.x-3.x in field layout
parents
db60859c
9ab1b996
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
includes/field_ui.inc
+1
-1
1 addition, 1 deletion
includes/field_ui.inc
src/Element/Accordion.php
+1
-0
1 addition, 0 deletions
src/Element/Accordion.php
src/Plugin/field_group/FieldGroupFormatter/AccordionItem.php
+10
-0
10 additions, 0 deletions
src/Plugin/field_group/FieldGroupFormatter/AccordionItem.php
with
12 additions
and
1 deletion
includes/field_ui.inc
+
1
−
1
View file @
14a434bf
...
...
@@ -169,7 +169,7 @@ function field_group_field_ui_display_form_alter(&$form, FormStateInterface $for
'#type'
=>
'textfield'
,
'#default_value'
=>
$group
->
weight
,
'#size'
=>
3
,
'#attributes'
=>
[
'class'
=>
[
'field-weight'
],
'#attributes'
=>
[
'class'
=>
[
'field-weight'
]
]
,
],
'parent_wrapper'
=>
[
'parent'
=>
[
...
...
This diff is collapsed.
Click to expand it.
src/Element/Accordion.php
+
1
−
0
View file @
14a434bf
...
...
@@ -46,6 +46,7 @@ class Accordion extends RenderElement {
// Add the jQuery UI accordion.
$element
[
'#attached'
][
'library'
][]
=
'field_group/formatter.accordion'
;
$element
[
'#attached'
][
'library'
][]
=
'field_group/core'
;
// Add the effect class.
if
(
isset
(
$element
[
'#effect'
]))
{
...
...
This diff is collapsed.
Click to expand it.
src/Plugin/field_group/FieldGroupFormatter/AccordionItem.php
+
10
−
0
View file @
14a434bf
...
...
@@ -47,6 +47,16 @@ class AccordionItem extends FieldGroupFormatterBase {
$element
+=
[
'#attributes'
=>
[
'class'
=>
$classes
]];
}
if
(
$this
->
getSetting
(
'required_fields'
))
{
$element
[
'#attached'
][
'library'
][]
=
'field_group/formatter.details'
;
}
foreach
(
$element
as
$key
=>
$value
)
{
if
(
is_array
(
$value
)
&&
!
empty
(
$value
[
'#children_errors'
]))
{
$element
[
'#open'
]
=
TRUE
;
}
}
}
/**
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment