<?php
// Copyright 1999-2022. Plesk International GmbH. All rights reserved.
?>
<?php echo $this->partial('business-model-upgrade/_notes.phtml', $this); ?>
<?php echo $this->partial('business-model-upgrade/_tabs.phtml', array(
    'currentTab' => 'bunch',
)); ?>

<p><?php echo $this->lmsg('description') ?></p>
<p><a href="/help.php?context=business-model-upgrade.bunch.description" target="_blank" rel="noopener noreferrer"><?php echo $this->lmsg('help') ?></a></p>

<?php if (!$this->form): ?>
    <p><?php echo $this->lmsg('noActionsDescription') ?></p>
<?php else: ?>
    <?php echo $this->form; ?>
    <script type="text/javascript">
    //<![CDATA[
    Jsw.onReady(function() {
        document.querySelectorAll('.checkbox').forEach(function (element) {
            var prefix = 'business-model-upgrade-bunch-';
            var val = Jsw.Cookie.get(prefix + element.id);
            if (val == '1') {
                  element.checked = true;
            }
            element.addEventListener('click', function (event) {
                Jsw.Cookie.set(prefix + event.target.id, event.target.checked? '1': '0');
            });
        });
    });
    //]]>
    </script>
<?php endif; ?>
