diff --git a/templates/Instance/settings.php b/templates/Instance/settings.php
index f020b1f..6cdfc90 100644
--- a/templates/Instance/settings.php
+++ b/templates/Instance/settings.php
@@ -1,4 +1,5 @@
'danger',
'warning' => 'warning',
@@ -82,7 +83,7 @@ function genContentForNav($sectionSettings, $appView)
$mainPanelHeight = 'calc(100vh - 42px - 1rem - 56px - 38px - 1rem)';
$container = '
';
$container .= "
{$scrollspyNav}
";
- $container .= "
{$contentHtml}
";
+ $container .= "
{$contentHtml}
";
$container .= '
';
return $container;
}
@@ -90,7 +91,8 @@ function genContentForNav($sectionSettings, $appView)
function genSection($sectionName, $subSectionSettings, $appView)
{
$sectionContent = [];
- $sectionContent[] = sprintf('', sprintf('sp-%s', h($sectionName)));
+ $sectionContent[] = '
';
+ $sectionContent[] = sprintf('
%s
', getResolvableID($sectionName), h($sectionName));
if (isLeaf($subSectionSettings)) {
$panelHTML = $appView->element('Settings/panel', [
'sectionName' => $sectionName,
@@ -120,6 +122,15 @@ function isLeaf($setting)
{
return !empty($setting['name']) && !empty($setting['type']);
}
+
+function getResolvableID($sectionName, $panelName=false)
+{
+ $id = sprintf('sp-%s', h($sectionName));
+ if (!empty($panelName)) {
+ $id .= preg_replace('/(\.|\s)/', '_', h($panelName));
+ }
+ return $id;
+}
?>