puphpet/puphpet

View on GitHub
src/PuphpetBundle/Resources/views/letsencrypt/domain.html.twig

Summary

Maintainability
Test Coverage
{% set uniqid = uniqid ?? uniqid('domain_') %}
{% set idBase = "letsencrypt-domains-#{uniqid}" %}
{% set nameBase = "letsencrypt[domains][#{uniqid}]" %}

<div id="{{ idBase }}" data-uniqid="{{ uniqid }}" data-name="{{ nameBase }}"
     class="tab-pane {{ active is defined and active ? 'active' }}">
    <div class="form-group col-xs-12">
        <label for="{{ idBase }}-hosts">
            Hosts
        </label>
        <select id="{{ idBase }}-hosts"
                name="{{ nameBase }}[hosts][]"
                multiple class="form-control select-tags-editable">
            {% for host in domain.hosts %}
                <option selected value="{{ host }}">{{ host }}</option>
            {% endfor %}
        </select>
        <div class="help-block">
            <p>The domain must be public and reachable from the internet.</p>

            <p>If you do not know your server's IP address ahead of time,
                <code>$ vagrant up</code> may fail initially. You need to assign
                your domain to the new server via an <code>A</code> record
                or a floating IP address. As long as your domain resolves
                to the created server this will work!</p>

            <p>Simply run <code>$ vagrant provision</code> once the domain is
                resolving properly!</p>

            <p>Make sure your domain's Server Name is defined first, followed by any aliases.</p>
        </div>
    </div>

    <div class="clearfix"></div>
</div>