{% extends "base_generic_top.html" %}

{% block budy %}
<div class="container">
        <div class="row">
            <div class="col-md-4 col-md-offset-4">
                <div class="login-panel panel panel-default">
                    <div class="panel-heading">
                        <h3 class="panel-title">Favor de firmarse para tener acceso.</h3>
                    </div>
                    <div class="panel-body">



	{% if form.errors %}
		<p>Your username and password didn't match. Please try again.</p>
	{% endif %}

	{% if next %}
	    {% if user.is_authenticated %}
	    	<p>Your account doesn't have access to this page. To proceed, please login with an account that has access.</p>
	    {% else %}
	    	<p>Favor de firmarse para tener acceso.</p>
	    {% endif %}
	{% endif %}

	<form role="form" method="post" action="{% url 'login' %}">
	{% csrf_token %}

	<div class="form-group">
          <input class="form-control" placeholder="nombre de usuario" name="{{ form.username.name }}" type="{{ form.username.class.name}}" id="{{ form.username.auto_id }}" autofocus>
	</div>
	<div class="form-group">
          <input class="form-control" placeholder="contraseña" name="{{ form.password.name }}" type="password" id="{{ form.password.auto_id }}" autofocus>
	</div>

	<div class="form-group">
	  <input type="submit" value="Ingresar" class="btn btn-lg btn-success btn-block" />
	  <input type="hidden" name="next" value="{{ next }}" />
	</div>
	</form>

	{# Assumes you setup the password_reset view in your URLconf #}
	<p><a href="{% url 'password_reset' %}">Lost password?</a></p>





                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
{% endblock %}
