<?php
// Copyright 1999-2022. Plesk International GmbH. All rights reserved.
$cuctomizeSubForm = $this->element;
$customizeElements = $cuctomizeSubForm->getElements();
$customizeElementId = $cuctomizeSubForm->getElementsBelongTo();
if (strstr($customizeElementId, ']')) {
    $customizeElementId = trim($customizeElementId, ']');
    $customizeElementId = str_replace('][', '-', $customizeElementId);
    $customizeElementId = str_replace('[', '-', $customizeElementId);
}

?>
<div id="<?php echo $customizeElementId; ?>">
    <div id="<?php echo $customizeElementId; ?>-content-area" class="aps-customize-content">
        <?php
        foreach ($customizeElements as $element) {
            echo $element->render();
        }
        ?>
    </div>
</div>
<script type="text/javascript">
//<![CDATA[
Jsw.onReady(function() {
    new Jsw.CollapsibleBlock({
        applyTo: '<?php echo Plesk_Base_Utils_String::safeForJs($customizeElementId); ?>',
        title: '<?php echo Plesk_Base_Utils_String::safeForJs($cuctomizeSubForm->getLegend()); ?>',
        cls: 'aps-customize'
    });
});
////]]>
</script>
