From c200ae8c3cd7ce749ffa77148ff59f21ddb9ce06 Mon Sep 17 00:00:00 2001 From: Pierre-antoine Comby <comby@crans.org> Date: Sun, 22 Mar 2020 22:01:33 +0100 Subject: [PATCH] ask for cas only if available. --- templates/registration/login.html | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/templates/registration/login.html b/templates/registration/login.html index 5a4322d1..8e50fce1 100644 --- a/templates/registration/login.html +++ b/templates/registration/login.html @@ -16,11 +16,12 @@ SPDX-License-Identifier: GPL-2.0-or-later {% endblocktrans %} </p> {% endif %} - - <div class="alert alert-info"> - Vous pouvez aussi vous connecter via l'authentification centralisée <a href="{% url 'cas_login' %}">en suivant ce lien.</a> + {%url 'cas_login' as cas_url %} + {% if cas_url %} + <div class="alert alert-info"> + Vous pouvez aussi vous connecter via l'authentification centralisée <a href="{{ cas_url }}">en suivant ce lien.</a> </div> - + {%endif%} <form action="{{ app_path }}" method="post" id="login-form">{% csrf_token %} {{ form | crispy }} <input type="submit" value="{% trans 'Log in' %}" class="btn btn-primary"> -- GitLab