-
Notifications
You must be signed in to change notification settings - Fork 16
/
saml_login.html
151 lines (139 loc) · 7.14 KB
/
saml_login.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
<!-- Extends default Bootstrap Unical Italia template -->
{% extends 'idp_base.html' %}
{% load i18n %}
{% load static %}
{% block page_title %}
IDP: {% trans "Auth login" %}
{% endblock page_title %}
{% block header_wrapper %}{% endblock header_wrapper %}
{% block footer %}{% endblock footer %}
{% block container %}
<div class="container">
<div class="row">
<div class="col-lg-6 p-5 offset-md-3 align-self-center">
<image class="mb-5" src="{% static 'images/unical_logo.svg' %}" style="width:100%;"/>
<p class="mb-4">{% trans "Single Sign-On" %}</p>
<form class="needs-validation" name="login" method="post" action="{{ acs_url }}">
{% csrf_token %}
{% for form_field in form %}
{% if form_field.field.widget.input_type == "checkbox" %}
<div class="form-check">
<input name="{{ form_field.name }}"
type="checkbox"
id="id_{{ form_field.html_name }}"
{% if form_field.field.required %}
class="form-check-input"
required
{% endif %}>
<label class="form-check-label"
for="id_{{ form_field.html_name }}">
{{ form_field.label }}
</label>
</div>
{% elif form_field.field.widget.input_type == "password" %}
<div class="form-row">
<div class="col-12 form-group my-3">
<input type="{{ form_field.field.widget.input_type }}"
class="form-control input-password"
id="id_{{ form_field.html_name }}"
name="{{ form_field.name }}"
aria-labelledby="infoPassword"
minlength="{{ form_field.field.min_length }}"
{% comment %}
{% if forloop.first %} autofocus {% endif %}
{% endcomment %}
{% if form_field.field.required %}required{% endif %}>
<span class="password-icon" aria-hidden="true">
<svg class="password-icon-visible icon icon-sm">
<use xlink:href="{% static 'images/svg/sprite.svg' %}#it-password-visible"></use>
</svg>
<svg class="password-icon-invisible icon icon-sm d-none">
<use xlink:href="{% static 'images/svg/sprite.svg' %}#it-password-invisible"></use>
</svg>
</span>
<label for="id_{{ form_field.html_name }}">
<span class="form-label-content">
{{ form_field.label }}
</span>
</label>
{% comment %}
<div class="valid-feedback">{% trans "Validated" %}!</div>
{% endcomment %}
</div>
</div>
{% else %}
<div class="form-row">
<div class="col-12 form-group my-3">
<input type="{{ form_field.field.widget.input_type }}"
class="form-control"
id="id_{{ form_field.html_name }}"
name="{{ form_field.name }}"
minlength="{{ form_field.field.min_length }}"
{% comment %}
{% if forloop.first %} autofocus {% endif %}
{% endcomment %}
{% if form_field.field.required %}required{% endif %}>
<label for="id_{{ form_field.html_name }}">
<span class="form-label-content">
{{ form_field.label }}
</span>
</label>
{% comment %}
<div class="valid-feedback">{% trans "Validated" %}!</div>
{% endcomment %}
</div>
</div>
{% endif %}
{% endfor %}
<div class="py-3">
<ul style="list-style: none; padding-inline-start: 37px;">
<li>
<p style="margin-bottom: 5px;">
{% trans "Forgot your password?" %} (
<a href="https://unical.esse3.cineca.it/Anagrafica/PasswordDimenticata.do" class="grey-color">
{% trans "Students" %}
</a>
|
<a href="https://soldi.unical.it/dipendenti/login/login.php" class="grey-color">
{% trans "Employees" %}
</a>
)
</li>
<li>
<a href="https://ds.auth.unical.it/info_page/federazione-di-identita-delluniversita-della-calabria/" class="grey-color">
{% trans "Additional informations" %}
</a>
</li>
</ul>
</div>
<input type="submit"
name="confirm"
class="btn btn-lg btn-success btn-block unical-background"
value="{% trans 'Submit' %}"/>
</form>
</div>
</div>
<!-- SP logo or description -->
<div class="row">
{% if request.saml_session.SAML.sp_logo %}
<div class="col-lg-2 px-5 pb-2 pb-lg-4 pr-lg-0 offset-lg-3 align-self-center text-center text-lg-left">
<p>{% trans "Requested by" %}:</p>
<div class="mx-5 mx-lg-0">
<div class="mx-md-5 mx-lg-0">
<img src="{{ request.saml_session.SAML.sp_logo }}"
alt="{{ request.saml_session.SAML.sp_display_name }}" width="70%">
</div>
</div>
</div>
<div class="col-lg-4 px-5 pb-5 pl-lg-0 pb-lg-4 align-self-center small text-center text-lg-left">
{{ request.saml_session.SAML.sp_display_description }}
</div>
{% else %}
<div class="col-lg-2 px-5 pb-2 pb-lg-4 pr-lg-0 offset-lg-3 align-self-center text-center text-lg-left">
<p>{% trans "Requested by" %}:</p>
<p>{{ request.saml_session.SAML.sp_display_description }}</p>
</div>
{% endif %}
</div>
</div>
{% endblock container %}