{% extends "panel.html.twig" %}

{% block panel_contents %}
    <h1 class="title">Config builder</h1>
    <form target="_blank" action="/panel/config-builder" method="post" class="form">
        <div class="row">
            <label for="server">Server</label>
            <select name="fingerprint" id="server">
                {% for server in servers %}
                    <option value="{{ server.getFingerprint() }}">{{ server.getFqdn() }}</option>
                {% endfor %}
            </select>
        </div>
        <div class="row">
            <label for="certificate">Certificate</label>
            <select name="cert" id="certificate">
                {% for certificate in user.getActiveCertificates() %}
                    <option value="{{ certificate.getName() }}">{{ certificate.getName() }}</option>
                {% endfor %}
            </select>
        </div>
        <div class="buttons">
            <button type="submit">Build</button>
        </div>
    </form>
{% endblock %}
