{% extends 'BodyRep::layout.html.twig' %}
{% block js  %}
  $(document).ready(function() 
  {
	if($('#username').val().length > 0) 
      $('#password').focus();
	else
      $('#username').focus();
  });
{% endblock %}

{% block content %}
{% include 'BodyRep:Landing:navbar.html.twig' %}

	<h1>Login</h1>

    {% if error %}
        <div class="error">{{ error.message }}</div>
    {% endif %}

    <form name='login' action="{{ path("_login_check") }}" method="post" id="login">
        <div>
            <label for="username">Username</label>
            <input type="text" id="username" name="_username" value="{{ last_username }}" />
        </div>

        <div>
            <label for="password">Password</label>
            <input type="password" id="password" name="_password" />
        </div>

        <input type="submit" class="btn btn-primary btn-mini" id='loginbtn' value="LOGIN" />
    </form>
{% endblock %}
