{% extends 'account_layout.html' %}
{% load static %}
{% load i18n %}

{% block pagetitle %}{% trans 'WireGuard' %} - {% trans "New Device" %}{% endblock %}
{% block account_content %}
    <form method="post" class="pure-form pure-form-aligned">
        {% csrf_token %}
        <input type="hidden" name="action" value="add_key" />

        <fieldset>
            <div class="pure-control-group">
                <label for="name">{% trans 'Name' %}</label>
                <input type="text" name="name" id="name"
                    placeholder="{% trans "Name" %}"
                    class="pure-input-1-2" />
                <p class="inputinfo">
                    {% trans 'Used to identify the device in your account.' %}
                </p>
            </div>

            <div class="pure-control-group">
                <label for="public_key">{% trans 'Public Key' %}</label>
                <input type="text" name="public_key" id="public_key"
                    placeholder="{% trans "Public key (base64)" %}"
                    class="pure-input-1-2" />
                <p class="inputinfo">
                    <b>{% trans 'Optional.' %}</b>
                    {% trans 'Use an existing public key. Leave empty to generate a new one.' %}
                </p>
            </div>

            <div class="pure-controls">
                <input type="submit" class="button"
                    value="{% trans 'Create Key' %}" />
            </div>
        </fieldset>
    </form>
{% endblock %}