Override cas_server templates
This commit is contained in:
parent
df10bb54b7
commit
cc8be8a775
10 changed files with 173 additions and 0 deletions
4
customize_cas/templates/_partials/ens_logo.html
Normal file
4
customize_cas/templates/_partials/ens_logo.html
Normal file
|
@ -0,0 +1,4 @@
|
|||
{% load static %}
|
||||
{% load i18n %}
|
||||
|
||||
<img class="logo" src="{% static "img/logo.svg" %}" alt="{% trans "ENS logo" %}" />
|
8
customize_cas/templates/_partials/head.html
Normal file
8
customize_cas/templates/_partials/head.html
Normal file
|
@ -0,0 +1,8 @@
|
|||
{% load static %}
|
||||
{% load i18n %}
|
||||
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>{% trans "ENS student authentication" %}</title>
|
||||
<link type="text/css" rel="stylesheet" href="{% static "css/style.css" %}" />
|
||||
<link rel="shortcut icon" type="image/x-icon" href="/static/cas_server/favicon.ico"/>
|
11
customize_cas/templates/_partials/header.html
Normal file
11
customize_cas/templates/_partials/header.html
Normal file
|
@ -0,0 +1,11 @@
|
|||
{% load static %}
|
||||
{% load i18n %}
|
||||
<header>
|
||||
{% include "_partials/ens_logo.html" %}
|
||||
<div id="headtext">
|
||||
<div>
|
||||
{% blocktrans %}Central Authentication Service{% endblocktrans %}
|
||||
</div>
|
||||
<div>{% blocktrans %}ENS Students{% endblocktrans %}</div>
|
||||
</div>
|
||||
</header>
|
9
customize_cas/templates/_partials/messages.html
Normal file
9
customize_cas/templates/_partials/messages.html
Normal file
|
@ -0,0 +1,9 @@
|
|||
{% if messages %}
|
||||
<ul class="messages">
|
||||
{% for message in messages %}
|
||||
<li {% if message.tags %} class="{{ message.tags }}"{% endif %}>
|
||||
{{ message }}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
27
customize_cas/templates/cas_server/base.html
Normal file
27
customize_cas/templates/cas_server/base.html
Normal file
|
@ -0,0 +1,27 @@
|
|||
{% load static %}
|
||||
{% load i18n %}
|
||||
{% get_current_language as current_language %}
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html {% if current_language %}lang="{{ current_language }}"{% endif %}>
|
||||
<head>
|
||||
{% include "_partials/head.html" %}
|
||||
{% block "extra_head" %}{% endblock %}
|
||||
</head>
|
||||
<body>
|
||||
{% include "_partials/header.html" %}
|
||||
|
||||
<main>
|
||||
{% include "_partials/messages.html" %}
|
||||
|
||||
{% block content %}
|
||||
{% endblock %}
|
||||
</main>
|
||||
|
||||
<div id="ens_logo_foot">
|
||||
{% include "_partials/ens_logo.html" %}
|
||||
</div>
|
||||
|
||||
{% block "extra_foot" %}{% endblock %}
|
||||
</body>
|
||||
</html>
|
33
customize_cas/templates/cas_server/form.html
Normal file
33
customize_cas/templates/cas_server/form.html
Normal file
|
@ -0,0 +1,33 @@
|
|||
{% load cas_server %}
|
||||
|
||||
{% if form.non_field_errors %}
|
||||
<ul class="errorlist">
|
||||
{% for error in form.non_field_errors %}
|
||||
<li>
|
||||
{{error}}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
|
||||
{% for field in form %}{% if not field|is_hidden %}
|
||||
<div id="formfield_{{ field.auto_id }}" class="formfield
|
||||
{% if not form.non_field_errors %}
|
||||
{% if field.errors %} error_field {% endif %}
|
||||
{% endif %}"
|
||||
>{% spaceless %}
|
||||
{% if field.errors %}
|
||||
<ul class="errorlist">
|
||||
{% for error in field.errors %}
|
||||
<li>{{error}}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
<div class="labelled_input {% if field|is_checkbox %}checkbox_input{% endif %}">
|
||||
<div class="label_line">
|
||||
<label class="control-label" for="{{field.auto_id}}">{{field.label}}</label>
|
||||
</div>
|
||||
{{field}}
|
||||
</div>
|
||||
{% endspaceless %}</div>
|
||||
{% else %}{{field}}{% endif %}{% endfor %}
|
43
customize_cas/templates/cas_server/logged.html
Normal file
43
customize_cas/templates/cas_server/logged.html
Normal file
|
@ -0,0 +1,43 @@
|
|||
{% extends "cas_server/base.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block content %}
|
||||
<div class="login_msg">
|
||||
<h2>{% trans "Logged in successfully" %}</h2>
|
||||
|
||||
<p>{% blocktrans %}
|
||||
You have successfully logged into the Central Authentication Service.
|
||||
{% endblocktrans %}</p>
|
||||
<p>{% blocktrans %}
|
||||
When you are done using ENS students' services, you can log out to prevent
|
||||
anyone unauthorized from accessing your sessions on this computer.
|
||||
{% endblocktrans %}</p>
|
||||
</div>
|
||||
|
||||
<form method="get" action="logout">
|
||||
<div class="formfield">
|
||||
<div class="labelled_input checkbox_input">
|
||||
<div class="label_line">
|
||||
<label for="id_all">
|
||||
{% trans "Log me out from all my sessions" %}
|
||||
</label>
|
||||
</div>
|
||||
<input type="checkbox" id="id_all" name="all" value="1" />
|
||||
</div>
|
||||
</div>
|
||||
{% if settings.CAS_FEDERATE and request.COOKIES.remember_provider %}
|
||||
<div class="formfield">
|
||||
<div class="labelled_input checkbox_input">
|
||||
<div class="label_line">
|
||||
<label for="id_forget_provider">
|
||||
{% trans "Forget the identity provider" %}
|
||||
</label>
|
||||
</div>
|
||||
<input type="checkbox" id="id_forget_provider" name="forget_provider" value="1" />
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
<button type="submit">{% trans "Logout" %}</button>
|
||||
</form>
|
||||
{% endblock %}
|
||||
|
16
customize_cas/templates/cas_server/login.html
Normal file
16
customize_cas/templates/cas_server/login.html
Normal file
|
@ -0,0 +1,16 @@
|
|||
{% extends "cas_server/base.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<h2>{% blocktrans %}
|
||||
Please log in with your Clipper credentials
|
||||
{% endblocktrans %}</h2>
|
||||
|
||||
<form method="post" id="login_form"{% if post_url %} action="{{post_url}}"{% endif %}>
|
||||
{% csrf_token %}
|
||||
{% include "cas_server/form.html" %}
|
||||
|
||||
<button type="submit">{% trans "Log in" %}</button>
|
||||
</form>
|
||||
{% endblock %}
|
11
customize_cas/templates/cas_server/logout.html
Normal file
11
customize_cas/templates/cas_server/logout.html
Normal file
|
@ -0,0 +1,11 @@
|
|||
{% extends "cas_server/base.html" %}
|
||||
{% load static %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block content %}
|
||||
<h2>{% trans "Clipper logout" %}</h2>
|
||||
<p>{% blocktrans %}
|
||||
You have been successfully logged out from your Clipper account.
|
||||
{% endblocktrans %}</p>
|
||||
{% endblock %}
|
||||
|
11
customize_cas/templates/cas_server/warn.html
Normal file
11
customize_cas/templates/cas_server/warn.html
Normal file
|
@ -0,0 +1,11 @@
|
|||
{% extends "cas_server/base.html" %}
|
||||
{% load static %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block content %}
|
||||
<form class="form-signin" method="post">
|
||||
{% csrf_token %}
|
||||
{% include "cas_server/form.html" %}
|
||||
<button type="submit">{% trans "Connect to the service" %}</button>
|
||||
</form>
|
||||
{% endblock %}
|
Loading…
Reference in a new issue