{% extends "master.html" %}
{% from "_formhelper.html" import render_bootstrap_field %}

{% block title %}Login{% endblock %}
{% set tag = "home" %}

{% block content %}

<div class="container">
  <div class="row">
    <div class="col-md-4 mx-auto pt-5">
      <h4 class="text-center font-weight-bold mb-4">Login</h4>
      <form action="{{ url_for('ui_ns.do_login') }}" method="post">
        <input type="hidden" value="{{ next_url }}" name="next_url" />
        {{ render_bootstrap_field(form.username) }}
        {{ render_bootstrap_field(form.password,
                                  rightlink={'url': url_for('ui_ns.lost_password'), 'text': 'Forgot?' }) }}
        <input class="btn btn-primary btn-block mt-4" type="submit" value="Login">
        {{ form.csrf_token }}
      </form>
      <div>
        <a class="btn btn-link btn-block" href="{{url_for('ui_ns.new_user') }}">
          Create a new account
        </a>
      </div>
    </div>
  </div>
</div>

{% endblock %}
