Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
uw_fdsu_theme_resp
Manage
Activity
Members
Labels
Code
Merge requests
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
WCMS
uw_fdsu_theme_resp
Commits
a3d7cf02
Commit
a3d7cf02
authored
8 months ago
by
Eric Bremner
Browse files
Options
Downloads
Patches
Plain Diff
ISTWCMS-6944: fix for search details/summary label in project block
parent
4c66872b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!131
ISTWCMS-6944: add label to block title if flag is set
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
uw_fdsu_theme_resp.theme
+29
-23
29 additions, 23 deletions
uw_fdsu_theme_resp.theme
with
29 additions
and
23 deletions
uw_fdsu_theme_resp.theme
+
29
−
23
View file @
a3d7cf02
...
...
@@ -736,37 +736,43 @@ function uw_fdsu_theme_resp_preprocess_details(&$variables) {
}
else
{
// If there is an element, process it.
if
(
isset
(
$variables
[
'element'
]))
{
// Search input needs a special form id, so setting that, if not
// We continue the old fix.
if
(
isset
(
$variables
[
'element'
][
'search'
]))
{
$variables
[
'form_field_id'
]
=
$variables
[
'element'
][
'search'
][
'#attributes'
][
'id'
];
}
else
{
// Step through each of the indexes and ensure that we
// have an actual element, which means it will be an array.
foreach
(
$variables
[
'element'
]
as
$index
=>
$value
)
{
// If there is an element, process it.
if
(
isset
(
$variables
[
'element'
]))
{
// If this is an array, then we have an element to look at.
if
(
is_array
(
$value
))
{
// Step through each of the indexes and ensure that we
// have an actual element, which means it will be an array.
foreach
(
$variables
[
'element'
]
as
$index
=>
$value
)
{
//
One more check to ensure
th
at
we have an element.
if
(
is
set
(
$variables
[
'element'
][
$index
][
'#type'
]
))
{
//
If this is an array,
th
en
we have an element
to look at
.
if
(
is
_array
(
$value
))
{
// Get the id based on where the id is stored, either it
// is by itself or within the attributes.
if
(
isset
(
$variables
[
'element'
][
$index
][
'#id'
]))
{
$variables
[
'form_field_id'
]
=
$variables
[
'element'
][
$index
][
'#id'
];
}
elseif
(
isset
(
$variables
[
'element'
][
$index
][
'#attributes'
][
'id'
]))
{
$variables
[
'form_field_id'
]
=
$variables
[
'element'
][
$index
][
'#attributes'
][
'id'
];
}
// One more check to ensure that we have an element.
if
(
isset
(
$variables
[
'element'
][
$index
][
'#type'
]))
{
// Break out of the loop to save computational time.
break
;
// Get the id based on where the id is stored, either it
// is by itself or within the attributes.
if
(
isset
(
$variables
[
'element'
][
$index
][
'#id'
]))
{
$variables
[
'form_field_id'
]
=
$variables
[
'element'
][
$index
][
'#id'
];
}
elseif
(
isset
(
$variables
[
'element'
][
$index
][
'#attributes'
][
'id'
]))
{
$variables
[
'form_field_id'
]
=
$variables
[
'element'
][
$index
][
'#attributes'
][
'id'
];
}
// Break out of the loop to save computational time.
break
;
}
}
}
}
// If there is a data drupal selector use it for form field id.
elseif
(
isset
(
$variables
[
'element'
][
0
][
'#attributes'
][
'data-drupal-selector'
]))
{
$variables
[
'form_field_id'
]
=
$variables
[
'element'
][
0
][
'#attributes'
][
'data-drupal-selector'
];
}
}
// If there is a data drupal selector use it for form field id.
elseif
(
isset
(
$variables
[
'element'
][
0
][
'#attributes'
][
'data-drupal-selector'
]))
{
$variables
[
'form_field_id'
]
=
$variables
[
'element'
][
0
][
'#attributes'
][
'data-drupal-selector'
];
}
}
}
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