Newer
Older
{% extends 'portal/public/base.html' %}
{% load i18n %}
{% block login %}{% endblock %}
{% block main_content %}
<div class="container" style="min-height: 400px;">
{% if form.errors or next %}
<div class="row">
<div class="col-sm-8 mx-auto">
{% if form.errors %}
{% include 'portal/widgets/alert_widget.html' with msg=_("Your username and password didn't match. Please try again.") %}
{% elif next %}
{% if user.is_authenticated %}
{% include 'portal/widgets/alert_widget.html' with msg=_("Your account doesn't have access to this page.<br />To proceed, please login with an account that has access.") %}
{% else %}
{% include 'portal/widgets/alert_widget.html' with msg=_("Please login to see this page.") %}
{% endif %}
{% endif %}
</div>
</div>
{% endif %}
<div class="form-signin">
<form role="form" method="post" action="">
{% csrf_token %}
<h2 class="form-signin-heading">{% trans 'Please sign in' %}</h2>
{% if azuread_oauth %}
<a class="btn btn-lg btn-block btn-info mt-3 mb-5" href="">
<i class="fa fa-university fa-lg mr-2"></i>{% trans "Login with University of Montreal account" %}
</a>
<h4 class="form-signin-heading">{% trans 'Not a UdeM member ?' %}</h4>
{% endif %}
<input type="text" class="form-control mt-2" name="username" placeholder="{% trans 'Login' %}" required autofocus />
<input type="password" class="form-control" name="password" placeholder="{% trans 'Password' %}" required />
<button class="btn btn-lg btn-primary btn-block" type="submit">
{% trans 'Sign in' %}
</button>
<input type="hidden" name="next" value="{{ next }}" />
</form>
<div id="forgotten-password">
<a href="{% url 'password_reset' %}" class="text-muted">
<em>{% trans 'Forgot your password' %}?</em>
</a>
</div>
</div>
</div>