{% extends 'lizard_ui/lizardbase.html' %}
{% load i18n %}

{% block content %}


<form id="login-form" class="well"
	  action="{% url lizard_ui.login %}" method="POST">
  {% csrf_token %}
  <div>
    <label>{% trans "Name" %}</label>
    {% if form.errors.username %}
      <div class="alert alert-error">
  	    {% for error in form.errors.username %}
	      <p>{{ error }}</p>
        {% endfor %}
      </div>
    {% endif %}
    <input type="text"
           name="username"
		   {% if form.username.value %}
  		     value="{{ form.username.value }}"
		   {% endif %}
		   />

  </div>
  <div>
    <label>{% trans "Password" %}</label>
    {% if form.errors.password %}
      <div class="alert alert-error">
  	    {% for error in form.errors.password %}
	      <p>{{ error }}</p>
        {% endfor %}
      </div>
    {% endif %}
    <input type="password"
           name="password" />
  </div>
  {% if form.non_field_errors %}
    <div class="alert alert-error">
  	  {% for error in form.non_field_errors %}
	    <p>{{ error }}</p>
      {% endfor %}
    </div>
  {% endif %}

  <div>
    <input id="login-button"
           type="submit"
           value="{% trans "Login" %}" />
  </div>
  <input id="login-form-next"
         type="hidden"
         name="next_url"
         value="{{ view.next_url }}"/>

</form>
{% endblock %}

