{% extends 'umanage/base_umanage.html' %}
{% load i18n umanage %}
{% block page_title %}Set Password - {% endblock %}

{% block breadcrumb %}
    <li>Set Password</li>
{% endblock %}

{% block umanage_content %}
<h1>Set Password</h1>

{% if request.user.has_usable_password %}
    {% url 'umanage_change_password' as change_password_url %}
    <p>{% blocktrans %}You already have a useable password set.  If you would like to change your password, please visit the <a href="{{ change_password_url }}">change password</a> page.{% endblocktrans %}</p>
    <p><a href="{% url 'umanage_account_view' %}" class="btn btn-primary">{% trans 'Back to account' %}</a></p>
{% else %}
	<p>{% trans "Please enter your new password twice so we can verify you typed it in correctly. This password will allow you to login as well as do administrative tasks such as change your email, if needed." %}</p>
	
	<form method="post" action="{% url 'umanage_set_password' %}" 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">Save</button>
	            <a href="/">cancel</a>
	        </div>
	    </div>
	</form>

{% endif %}
{% endblock %}
