{% extends 'musette/base_musette.html' %}

{% load i18n %}

{% block content %}

{% if validlink %}

<div class="reset-background">
    <div class="container">
        <div id="loginbox" class="mainbox col-md-6 col-md-offset-3 col-sm-6 col-sm-offset-3">
            <br>
            <div class="panel panel-default" >
                <div class="panel-heading">
                    <div class="panel-title text-center">{% trans "Change password" %}</div>
                </div>

                <div class="panel-body">
                    <p>{% trans "Please enter your new password twice so we can verify you typed it in correctly." %}</p>
                    <form action="" method="post">{% csrf_token %}
                        <div class="input-group">
                            <span class="input-group-addon"><i class="fa fa-lock"></i></span>
                            <input id="id_{{ form.new_password1.name }}" placeholder="{% trans 'New password' %}" class="form-control"
                            name="{{ form.new_password1.name }}" type="password">
                        </div>
                        <div style="color: red">{{ form.new_password1.errors|striptags }}</div>
                        <br>

                        <div class="input-group">
                            <span class="input-group-addon"><i class="fa fa-lock"></i></span>
                            <input id="id_{{ form.new_password2.name }}" placeholder="{% trans 'Confirm password' %}"
                            class="form-control" name="{{ form.new_password2.name }}" type="password">
                        </div>
                        <div style="color: red">{{ form.new_password2.errors|striptags }}</div>
                        <br>

                        <p><input type="submit" class="btn btn-default" value="{% trans 'Change my password' %}" /></p>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>

{% else %}

<div class="reset-background">
    <div class="container">
    <p>{% trans "The password reset link was invalid, possibly because it has already been used.  Please request a new password reset." %}</p>
    </div>
</div>

{% endif %}

{% endblock %}
