39 lines
1.6 KiB
HTML
39 lines
1.6 KiB
HTML
{% load bootstrap3 %}
|
|
|
|
{% block content %}
|
|
{% bootstrap_messages %}
|
|
<div class="panel panel-default">
|
|
<div class="panel-heading"><h3 class="panel-title">Maraude ALSA</h3></div>
|
|
<div class="panel-body text-center">
|
|
{% if user.is_authenticated %}
|
|
<p>Bienvenue {{ user }} !</p>
|
|
<div class="btn-group">
|
|
<a href="{% url 'maraudes:index' %}" class="btn btn-primary">Entrer</a>
|
|
{% if user.is_superuser %}
|
|
<a href="admin/" class="btn btn-warning">Administration</a>
|
|
{% endif %}
|
|
</div>
|
|
{% else %}
|
|
{% if form.errors %}
|
|
<p>Your username and password didn't match. Please try again.</p>
|
|
{% endif %}
|
|
{% if next %}
|
|
{% if user.is_authenticated %}
|
|
<div class="alert alert-warning"><p>Your account doesn't have access to this page. To proceed,
|
|
please login with an account that has access.</p></div>
|
|
{% else %}
|
|
<div class="alert alert-danger"><p>Veuillez vous connecter pour accéder à cette page.</p></div>
|
|
{% endif %}
|
|
{% endif %}
|
|
<form method="post" action="{% url 'django.contrib.auth.views.login' %}">
|
|
{% csrf_token %}
|
|
{% bootstrap_form form %}
|
|
{% bootstrap_button "Connexion" button_type="submit" button_class="btn-lg btn-primary" %}
|
|
<input type="hidden" name="next" value="{{ next|default:'maraudes/' }}" />
|
|
</form>
|
|
{% endif %}
|
|
</div>
|
|
<div class="panel-footer"><p>version: 0.01</p></div>
|
|
</div>
|
|
{% endblock %}
|