{% extends "valet_keys/base.html" %}

{% block subcontent %}
    {% if not key %}
        <p>Describe your intended use for this key, below.
        <p><strong>NOTE:</strong> This will be your only means of identifying
        this key later, other than the date and time of its creation. So,
        be as clear as you can.</p>
        <form method="POST" action="" class="key">
            {{ form }}
            <button type="submit" name="action_create" class="button positive">Create</button>
            <a class="button" href="{% url valet_keys.list %}">Cancel</a>
        </form>
    {% else %}
        <p>Your new key has been created. Please make a note of the details
        below (e.g. by copying them into your application's settings). This
        information will never be displayed again, and cannot be recovered if
        lost.</p>
        <p><strong>NOTE:</strong> 
        When you're done, <a class="button" href="{% url valet_keys.list %}">return to the key list</a>.
        Reloading this page will create a new key.</p>
        <dl class="key">
            <dt>Key ID</dt>
            <dd class="key"><code>{{ key.key }}</code></dd>
            <dt>Secret</dt>
            <dd class="secret"><code>{{ secret }}</code></dd>
            <dt>Created</dt>
            <dd>{{ key.created }}</dd>
            <dt>Description</dt>
            <dd class="description">{{ key.description }}</dd>
        </dl>
    {% endif %}
{% endblock %}
