<?php
// Copyright 1999-2024. WebPros International GmbH. All rights reserved.
?>
<?php
echo $this->form;
$typeElementId = $this->form->getElement('type')->getId();
?>
<script type="text/javascript">
//<![CDATA[
Jsw.namespace('Smb.Views.SslCertificate');
Smb.Views.SslCertificate.setType = function (type) {
    document.getElementById('<?php echo $typeElementId ?>').value = type;
};

Smb.Views.SslCertificate.submitFilesForm = function (context) {
    if ('' === document.getElementById('name').value) {
        alert(<?php echo $this->jsLmsg('enterCertificateName'); ?>);
        document.getElementById('name').focus();
        return;
    }

    Smb.Views.SslCertificate.setType('sendFiles');
    Jsw.submit(context);
};
//]]>
</script>
