Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
gin_everywhere
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
gin_everywhere
Merge requests
!2
#3426896
Check for active theme befor altering the form.
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
#3426896
Check for active theme befor altering the form.
issue/gin_everywhere-3426896:3426896-check-active-theme
into
1.0.x
Overview
0
Commits
2
Pipelines
2
Changes
1
Merged
Pascal Crott
requested to merge
issue/gin_everywhere-3426896:3426896-check-active-theme
into
1.0.x
1 year ago
Overview
0
Commits
2
Pipelines
2
Changes
1
Expand
Closes
#3426896
0
0
Merge request reports
Compare
1.0.x
version 2
7938136a
1 year ago
version 1
d54370fd
1 year ago
1.0.x (base)
and
latest version
latest version
7938136a
2 commits,
1 year ago
version 2
7938136a
2 commits,
1 year ago
version 1
d54370fd
1 commit,
1 year ago
1 file
+
9
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
gin_everywhere.module
+
9
−
0
Options
@@ -43,6 +43,15 @@ function gin_everywhere_form_alter(&$form, FormStateInterface $form_state, $form
if
(
!
$form_state
->
getFormObject
()
instanceof
ContentEntityFormInterface
)
{
return
;
}
// Don't transform the form if we are not on the gin theme. This may happen if
// we are acting in a frontend form like layout_builder.
$active_theme
=
\Drupal
::
theme
()
->
getActiveTheme
();
$base_themes
=
(
array
)
$active_theme
->
getBaseThemeExtensions
();
if
(
!
(
$active_theme
->
getName
()
===
'gin'
||
array_key_exists
(
'gin'
,
$base_themes
)))
{
return
;
}
if
(
!
isset
(
$form
[
'advanced'
]))
{
$form
[
'advanced'
]
=
[
'#type'
=>
'vertical_tabs'
,
Loading