Skip to content

Commit 697d0de

Browse files
authored
Merge pull request #42697 from nextcloud/fix/add-settings-section-type-attribute-stable28
[stable28] Fix/add settings section type attribute
2 parents 54bed64 + 6862ed4 commit 697d0de

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

apps/settings/lib/Controller/CommonSettingsTrait.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ private function getIndexResponse(string $type, string $section): TemplateRespon
151151
if ($activeSection) {
152152
$templateParams['pageTitle'] = $activeSection->getName();
153153
$templateParams['activeSectionId'] = $activeSection->getID();
154+
$templateParams['activeSectionType'] = $type;
154155
}
155156

156157
return new TemplateResponse('settings', 'settings/frame', $templateParams);

apps/settings/templates/settings/frame.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,6 @@
8484
</ul>
8585
</nav>
8686
</div>
87-
<div id="app-content" data-active-section-id="<?php print_unescaped($_['activeSectionId']) ?>">
87+
<div id="app-content" <?php if (!empty($_['activeSectionId'])) { ?> data-active-section-id="<?php print_unescaped($_['activeSectionId']) ?>" <?php } if (!empty($_['activeSectionType'])) { ?> data-active-section-type="<?php print_unescaped($_['activeSectionType']) ?>" <?php } ?>>
8888
<?php print_unescaped($_['content']); ?>
8989
</div>

0 commit comments

Comments
 (0)