{% extends 'umanage/base_umanage.html' %}
{% load i18n umanage %}
{% block page_title %}{% trans 'Change Email Address' %} - {% endblock %}

{% block breadcrumb %}
    <li>{% trans 'Change Email Address' %}</li>
{% endblock %}

{% block umanage_content %}
<h1>{% trans 'Change Email Address' %}</h1>

{% if request.user.has_usable_password %}
	<p>{% trans "Please enter your password, for security purposes, and then enter your new email address." %}</p>
	
	<form method="post" action="{% url 'umanage_change_email' %}" class="form-umanage form-horizontal">
	    {% csrf_token %}
	    {{ form|render_umanage_form }}
	    <div class="form-group umanage-button-container">
	        <div class="col-sm-offset-2 col-sm-10">
	            <button type="submit" class="btn btn-primary">Change Email</button>
	            <a href="/">cancel</a>
	        </div>
	    </div>
	</form>

{% else %}
    <p>{% blocktrans %}You must have a password set for this account in order to change your email address.  Follow the link below to add a password for this account.{% endblocktrans %}</p>
    <p><a href="{% url 'umanage_set_password' %}?next={% url 'umanage_change_email' %}" class="btn btn-primary">{% trans 'Set Password' %}</a></p>
{% endif %}

{% endblock %}
