{% extends 'core/page.html' %}
{% load i18n %}

{% block page %}

    <h1>{% trans "Update profile" %}</h1>

    {% if settings.ACCOUNT %}
    <p>
        {% url 'account_change_password' as password_url %}
        {% url 'account_email' as email_url %}
        {% blocktrans trimmed %}
        Please enter your updated account information. You can change your password using the <a href="{{ password_url }}">password form</a> and update your e-mail using the <a href="{{ email_url }}">e-mail form</a>.
        {% endblocktrans %}
    </p>
    {% endif %}

    <form method="post" action="{% url 'profile_update'  %}">
        {% csrf_token %}
        <input type="hidden" name="next" value="{{ next }}" />

        {% include 'core/bootstrap_form_fields.html' %}

        <input type="submit" value="{% trans 'Update profile' %}" class="btn {{ submit_danger|yesno:'btn-danger,btn-primary' }}" />
        <input type="submit" name="cancel" value="{% trans 'Cancel' %}" class="btn" />
    </form>

    <h2>{% trans "Delete profile" %}</h2>

    {% if settings.PROFILE_DELETE  %}

    <p>
        {% trans 'If you want to remove all your account information please proceed by clicking the button below.' %}
    </p>

    <a class="btn btn-danger" role="button" href="{% url 'profile_remove' %}">
        {% trans "Delete profile" %}
    </a>
    {% endif %}

{% endblock %}
