Viewing File: /usr/local/cpanel/whostmgr/docroot/templates/install_ssl_form.tmpl

[%
USE Whostmgr;
USE NVData;

extra_css = BLOCK;
    INSERT 'sharedcss/sslinstall_optimized.css';
    INSERT 'css/ssl_forms_optimized.css';
    INSERT 'yui/datatable/assets/datatable-core.css';
    INSERT 'yui/datatable/assets/datatable.css';
    INSERT 'yui/autocomplete/assets/skins/sam/autocomplete.css';
END;

SET is_root = Whostmgr.hasroot();

WRAPPER 'master_templates/master.tmpl' theme="yui"
    app_key = 'install_an_ssl_certificate_on_a_domain'
    breadcrumburl = '/scripts2/installssl'
    scripts = [
        '/yui/datasource/datasource-min.js'
        '/yui/autocomplete/autocomplete-min.js'
        '/cjt/combobox-min.js'
    ]
    breadcrumburl = '/scripts2/installssl'
    extrastyle = extra_css
;

PROCESS '_ajaxapp_styles.tmpl';
PROCESS '_ajaxapp_header.tmpl';
-%]

<div class="description">
    <p>
        [% locale.maketext('Use this interface to install a certificate on a domain. To install a certificate, you can type the desired domain, and the interface will automatically fill the empty fields. You can also paste a certificate to automatically fill the domain and related information. To browse your certificates, click the “[output,strong,_1]” button.', locale.maketext('Browse Certificates')) %]
    </p>
</div>

<div id="sdiv"></div>

<div id="cjt_pagenotice_container"></div>

[% ssl_browse_html = BLOCK -%]
    <input type="button" id="sslbrowse" value="[% locale.maketext("Browse Certificates") %]" title="[% locale.maketext("Browse for certificates to install.") %]" class="btn-secondary">
[% END -%]

[% ssl_form_top = BLOCK -%]
    <div id="msg"></div>
    <div>
        <label for="ssldomain">[% locale.maketext("Domain:") %]</label>
        <span id="ssldomain_error"></span>
    </div>

    <div>
        <input type="text" name="domain" id="ssldomain" dir="ltr">
        <input type="button" id="fetch-domain" style='display:none;' value="[% locale.maketext("Autofill by Domain") %]" title="[% locale.maketext("Fill this form’s other text boxes with values that match this domain.") %]" class="btn-secondary" disabled="disabled">
    </div>

    <div id="wildcard_subdomain_warning"></div>
    <div id="autofill_message_container"></div>
[% END -%]

[% IF data.hasroot -%]
    [% ssl_form_extra_section = BLOCK -%]
        <div>
            <label>[% locale.maketext("IP Address (non-user domains only):") %]</label>
        </div>
        <div id="ipcontainer">
            <div id="ipcombobox">
                <input id="sslip" name="ip" type="text" size="20" placeholder="[% locale.maketext("Auto-discover") %]" dir="ltr"><a id="ipexpander"></a>
            </div>
            <span id="sslip_error"></span>
            <br>
            [% locale.maketext("Leave this text box blank unless you wish to create an SSL website for a domain that is not attached to a user account.") %]
        </div>
    [% END -%]
[% END -%]

[% PROCESS '_ssl_form_include.tmpl'
    ssl_browse_html = ssl_browse_html,
    ssl_form_top = ssl_form_top,
    ssl_form_extra_section = ssl_form_extra_section,
-%]

<script type="text/html" id="error-extra-block">
    &nbsp;<a href="javascript:void(0)" id="{btnId}">{label}</a>
    <div id="{areaId}" class="extra-info" style="display: none">
        {content}
    </div>
</script>

<script id="ssl-install-require-template" type="text/html">
[% IF data.hasroot %]
    [% locale.maketext("We recommend that you only create SSL websites for domains that users control as their primary domain, parked domains, subdomains, or addon domains.") %]
    [% locale.maketext("If you create a website for a domain that a user does not control, that site will use [asis,Apache]’s default document root and will have the pseudo user “[_1]” as their owner. It will also always run outside Apache jails, even if you enable jails in [output,url,_2,Tweak Settings].", 'nobody', 'tweaksettings') %]
[% ELSE %]
    [% locale.maketext("You may only create SSL websites for domains that you or one of your users control: the user’s primary domain, parked domains, subdomains, or addon domains.") %]
[% END %]
</script>

[% SET js_page_properties = {
    selectedUser => data.selected_user,
    sslips => data.ips,
    ip_options => data.sorted_ips,
    mainip => data.mainip,
} -%]
<script>
(function() {
    /**
     * This module contains all the page specific constants generated by the server.
     * @module PAGE.Properties
     */
    var PAGE = {
        properties : [% js_page_properties.json() -%],
        nvdata : [% JSON.stringify( NVData.get_page_nvdata() || {} ) %],
        auto_domains: [% JSON.stringify( data.auto_domains ) %],
    };

    // Publish the PAGE object;
    window["PAGE"] = PAGE;
})();
</script>

[%# Load this last; in particular, after PAGE is set. -%]
[% PROCESS 'sslinstall_include.tmpl' cert_browser_users = data.users -%]

[% PROCESS '_ajaxapp_footer.tmpl' -%]
[%- END -%]
Back to Directory File Manager