{% extends "cosinnus/base.html" %}
{% load i18n  cosinnus_tags widget_tweaks %}

{% block page_title %}{% trans 'Password reset' %}{% endblock %}

{% block jshead %}
    {% comment %} This page deals with authentication data and loads only the most necessary vendor scripts! {% endcomment %}
{% endblock jshead %}

{% block leftnav %}
    {% include "cosinnus/registration/leftnav.html"  with current_page="reset_password" %}
{% endblock leftnav %}

{% block breadcrumb %}
        {{ block.super }}
        <li class="active">{% trans "Password reset" %}</li>
{% endblock %}

{% block content %}

{% if validlink %}

	<form action="" method="post" class="cosinnus-form form-horizontal">
	  {% csrf_token %}
	    
	    <!-- a box with semi transparent background -->
	    <div class="content-box">
	        {{ form.non_field_errors }}
	        
	        <h2>{% trans 'Enter new password' %}</h2>
	    
	        <p class="large-space">{% trans "Please enter your new password twice so we can verify you typed it in correctly." %}</p>
	        
	        {# Regular Field #}
			{% trans "New password" as newpassword1_label %}
			{% trans "Enter a password you don't use anywhere else. The longer the better!" as newpassword1_legend %}
			{% trans "New password" as newpassword1_placeholder %}
			{% include 'cosinnus/fields/default_field.html' with field=form.new_password1 legend=newpassword1_legend label=newpassword1_label placeholder=newpassword1_placeholder first=True %}
				        
            {# Regular Field #}
			{% trans "Repeat your password just to make sure" as newpassword2_label %}
			{% trans "New password confirmation" as newpassword2_placeholder %}
			{% include 'cosinnus/fields/default_field.html' with field=form.new_password2  label=newpassword2_label placeholder=newpassword2_placeholder %}
				        
	        
	    </div>
	    
	    <button type="submit" class="btn btn-emphasized">
	        <ul class="media-list">
	            <li class="media">
	                <a class="pull-left" href="#" tabindex="-1">
	                    <i class="fa fa-hand-o-right"></i>
	                </a>
	                <div class="media-body">
	                    {% trans 'Reset' %}
	                </div>
	            </li>
	        </ul>
	    </button>
	    
	</form>
	
	

{% else %}

    <div class="alert alert-danger alert-dismissable">
        <i class="fa fa-exclamation-triangle fa-3x"></i>
        <p>{% trans 'Password reset unsuccessful' %}</p>
        <p>{% trans "The password reset link was invalid, possibly because it has already been used.  Please request a new password reset." %}</p>
    </div>
    
{% endif %}
	

{% endblock content %}


