Merge pull request #42697 from nextcloud/fix/add-settings-section-type-attribute-stable28

[stable28] Fix/add settings section type attribute
This commit is contained in:
Arthur Schiwon 2024-01-17 21:03:44 +01:00 committed by GitHub
commit 697d0de511
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 1 deletions

View file

@ -151,6 +151,7 @@ trait CommonSettingsTrait {
if ($activeSection) {
$templateParams['pageTitle'] = $activeSection->getName();
$templateParams['activeSectionId'] = $activeSection->getID();
$templateParams['activeSectionType'] = $type;
}
return new TemplateResponse('settings', 'settings/frame', $templateParams);

View file

@ -84,6 +84,6 @@ script('files', 'jquery.fileupload');
</ul>
</nav>
</div>
<div id="app-content" data-active-section-id="<?php print_unescaped($_['activeSectionId']) ?>">
<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 } ?>>
<?php print_unescaped($_['content']); ?>
</div>