mirror of
https://gitlab.crans.org/bde/nk20
synced 2025-07-20 16:09:12 +02:00
Merge branch 'main' into family
This commit is contained in:
@ -5,6 +5,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
||||
<!DOCTYPE html>
|
||||
{% get_current_language as LANGUAGE_CODE %}{% get_current_language_bidi as LANGUAGE_BIDI %}
|
||||
<html lang="{{ LANGUAGE_CODE|default:"en" }}" {% if LANGUAGE_BIDI %}dir="rtl"{% endif %} class="position-relative h-100">
|
||||
{% if not config.MAINTENANCE %}
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
@ -145,9 +146,12 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
||||
<a class="dropdown-item" href="{% url 'member:user_detail' pk=request.user.pk %}">
|
||||
<i class="fa fa-user"></i> {% trans "My account" %}
|
||||
</a>
|
||||
<a class="dropdown-item" href="{% url 'logout' %}">
|
||||
<i class="fa fa-sign-out"></i> {% trans "Log out" %}
|
||||
</a>
|
||||
<form method="post" action="{% url 'logout' %}">
|
||||
{% csrf_token %}
|
||||
<button class="dropdown-item" type=submit">
|
||||
<i class="fa fa-sign-out"></i> {% trans "Log out" %}
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</li>
|
||||
{% else %}
|
||||
@ -195,7 +199,11 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
||||
{% endblocktrans %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{# TODO Add banners #}
|
||||
{% if config.BANNER_MESSAGE and user.is_authenticated %}
|
||||
<div class="alert alert-{{ config.BANNER_TYPE }}">
|
||||
{{ config.BANNER_MESSAGE }}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% block content %}
|
||||
<p>Default content...</p>
|
||||
@ -217,6 +225,10 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
||||
class="text-muted">{% trans "Charte Info (FR)" %}</a> —
|
||||
<a href="https://note.crans.org/doc/faq/"
|
||||
class="text-muted">{% trans "FAQ (FR)" %}</a> —
|
||||
<a href="https://bde.ens-cachan.fr"
|
||||
class="text-muted">{% trans "Managed by BDE" %}</a> —
|
||||
<a href="https://crans.org"
|
||||
class="text-muted">{% trans "Hosted by Cr@ns" %}</a> —
|
||||
</span>
|
||||
{% csrf_token %}
|
||||
<select title="language" name="language"
|
||||
@ -253,4 +265,15 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
{% block extrajavascript %}{% endblock %}
|
||||
</body>
|
||||
{% endif %}
|
||||
{% if config.MAINTENANCE %}
|
||||
<body>
|
||||
<div style="text-align:center">
|
||||
<br />
|
||||
{% trans "The note is not available for now" %}<br /><br />
|
||||
{{ config.MAINTENANCE_MESSAGE }}<br /><br />
|
||||
{% trans "Thank you for your understanding -- The Respos Info of BDE" %}
|
||||
</div>
|
||||
</body>
|
||||
{% endif %}
|
||||
</html>
|
||||
|
28
note_kfet/templates/cas/logged.html
Normal file
28
note_kfet/templates/cas/logged.html
Normal file
@ -0,0 +1,28 @@
|
||||
{% extends "base.html" %}
|
||||
{% comment %}
|
||||
Copyright (C) by BDE ENS-Paris-Saclay
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
{% endcomment %}
|
||||
{% load i18n %}
|
||||
{% block content %}
|
||||
<div class="alert alert-success" role="alert">{% blocktrans %}<h3>Log In Successful</h3>You have successfully logged into the Central Authentication Service.<br/>For security reasons, please Log Out and Exit your web browser when you are done accessing services that require authentication!{% endblocktrans %}</div>
|
||||
<div class="card bg-light mx-auto" style="max-width:30rem;">
|
||||
<div class="card-body">
|
||||
<form class="form-signin" method="get" action="logout">
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="checkbox" name="all" value="1">{% trans "Log me out from all my sessions" %}
|
||||
</label>
|
||||
</div>
|
||||
{% if settings.CAS_FEDERATE and request.COOKIES.remember_provider %}
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="checkbox" name="forget_provider" value="1">{% trans "Forget the identity provider" %}
|
||||
</label>
|
||||
</div>
|
||||
{% endif %}
|
||||
<button class="btn btn-danger btn-block btn-lg" type="submit">{% trans "Logout" %}</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
42
note_kfet/templates/cas/login.html
Normal file
42
note_kfet/templates/cas/login.html
Normal file
@ -0,0 +1,42 @@
|
||||
{% extends "base.html" %}
|
||||
{% comment %}
|
||||
Copyright (C) by BDE ENS-Paris-Saclay
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
{% endcomment %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block ante_messages %}
|
||||
{% if auto_submit %}<noscript>{% endif %}
|
||||
<div class="card-header text-center">
|
||||
<h2 class="form-signin-heading">{% trans "Please log in" %}</h2>
|
||||
</div>
|
||||
{% if auto_submit %}</noscript>{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="card bg-light mx-auto" style="max-width: 30rem;">
|
||||
<div class="card-body">
|
||||
<form class="form-signin" method="post" id="login_form"{% if post_url %} action="{{post_url}}"{% endif %}>
|
||||
{% csrf_token %}
|
||||
{% include "cas_server/bs4/form.html" %}
|
||||
{% if auto_submit %}<noscript>{% endif %}
|
||||
<button class="btn btn-primary btn-block btn-lg" type="submit">{% trans "Login" %}</button>
|
||||
{% if auto_submit %}</noscript>{% endif %}
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block javascript_inline %}
|
||||
jQuery(function( $ ){
|
||||
$("#id_warn").click(function(e){
|
||||
if($("#id_warn").is(':checked')){
|
||||
createCookie("warn", "on", 10 * 365);
|
||||
} else {
|
||||
eraseCookie("warn");
|
||||
}
|
||||
});
|
||||
});
|
||||
{% if auto_submit %}document.getElementById('login_form').submit(); // SUBMIT FORM{% endif %}
|
||||
{% endblock %}
|
10
note_kfet/templates/cas/logout.html
Normal file
10
note_kfet/templates/cas/logout.html
Normal file
@ -0,0 +1,10 @@
|
||||
{% extends "base.html" %}
|
||||
{% comment %}
|
||||
Copyright (C) by BDE ENS-Paris-Saclay
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
{% endcomment %}
|
||||
{% load i18n static %}
|
||||
{% block content %}
|
||||
<div class="alert alert-success" role="alert">{{ logout_msg }}</div>
|
||||
{% endblock %}
|
||||
|
19
note_kfet/templates/cas/warn.html
Normal file
19
note_kfet/templates/cas/warn.html
Normal file
@ -0,0 +1,19 @@
|
||||
{% extends "base.html" %}
|
||||
{% comment %}
|
||||
Copyright (C) by BDE ENS-Paris-Saclay
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
{% endcomment %}
|
||||
{% load i18n static %}
|
||||
|
||||
{% block content %}
|
||||
<div class="card bg-light mx-auto" style="max-width: 30rem;">
|
||||
<div class="card-body">
|
||||
<form class="form-signin" method="post">
|
||||
{% csrf_token %}
|
||||
{% include "cas_server/bs4/form.html" %}
|
||||
<button class="btn btn-primary btn-block btn-lg" type="submit">{% trans "Connect to the service" %}</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
Reference in New Issue
Block a user