{% extends 'base.html' %}

{% block title %} | Superuser tools - Provider: {{ provider.name }}{% endblock %}

{% block main %}
<div class="page-header">
    <div class="container">
        <h1>Superuser tools</h1>
        {% include 'superusertools/navigation.html' %}
    </div>
</div>

<div class="container">
    {% include 'snippets/messages.html' %}

    <div class="row">
        <form class="col-md-8 col-md-offset-2" method="POST" action="#" novalidate>
            {% csrf_token %}

            <h2 class="header">{{ provider.name }} provider</h2>

            <div class="form-group">
                <label for="client-id" class="control-label">Client ID (required)</label>
                <input type="text" class="form-control input-lg" id="client-id" name="client_id" maxlength="100" required {%if social_app.client_id %}value="{{ social_app.client_id }}"{% endif %} />
            </div>

            <div class="form-group">
                <label for="secret" class="control-label">Secret</label>
                <input type="text" class="form-control input-lg" id="secret" name="secret" maxlength="100" {%if social_app.secret %}value="{{ social_app.secret }}"{% endif %} />
            </div>

            <div class="form-group">
                <label for="key" class="control-label">Key</label>
                <input type="text" class="form-control input-lg" id="key" name="key" maxlength="100" {%if social_app.key %}value="{{ social_app.key }}"{% endif %} />
            </div>

            <div class="form-group">
                <button type="submit" class="btn btn-primary">Save</button>
                <a role="button" href="{% url 'admin:superusertools_provider_list' %}" class="btn btn-link">Cancel</a>
            </div>
        </form>
    </div>
</div>
{% endblock %}

{% block libraries %}
<script src="/static/js/admin.ui.forms.validate.js"></script>
{% endblock %}
