<?php
// Copyright 1999-2022. Plesk International GmbH. All rights reserved.
?>
<?php if ($this->form->licenseInfo): ?>
    <div class="form-box" id="licenseDetails">
        <div class="content-wrapper" id="licenseDetails-content-area">
            <div class="form-row">
                <div class="field-name"><?php echo $this->form->licenseInfo->keyNumberText ?></div>
                <div class="text-value"><?php echo $this->form->licenseInfo->keyNumber ?></div>
            </div>
            <div class="form-row">
                <div class="field-name">&#160;</div>
                <div class="text-value"><?php echo $this->form->licenseInfo->keyExpirationText ?></div>
            </div>
        </div>
    </div>
<?php endif; ?>
<div id='apsLicense' class='form-box' >
    <div id='apsLicense-content-area'>
        <p>
            <?php echo $this->form->text->content; ?>
            <?php if ($this->form->text->buyLicenseCommandText && $this->form->text->buyLicenseCommandAction): ?>
                <a href="#" onclick="Smb.ApsLicense.buy('<?php echo Plesk_Base_Utils_String::safeForJs($this->form->text->buyLicenseCommandAction) ?>'); return false;">
                    <b><?php echo $this->form->text->buyLicenseCommandText ?></b>
                </a>
            <?php endif; ?>
        </p>
        <?php if ($this->form->text->additionalContent): ?>
            <p><?php echo $this->form->text->additionalContent ?></p>
        <?php endif; ?>
        <?php foreach ($this->form as $name => $element): /* var@ $element Zend_Form_Element*/?>
            <?php echo $element->render() ?>
        <?php endforeach; ?>
        <?php if ($this->form->getLegend()): ?>
            <script type='text/javascript'>
            //<![CDATA[
            Jsw.onReady(function() {
                new Jsw.Panel({
                    title: '<?php echo Plesk_Base_Utils_String::safeForJs($this->form->getLegend()) ?>',
                    applyTo: 'apsLicense'
                });
            });
            //]]>
            </script>
        <?php endif; ?>
    </div>
</div>