misc: customize login page for agent authentication (#20054)

This commit is contained in:
Serghei Mihai 2017-11-13 17:26:11 +01:00
parent 184c5b7ea1
commit a0b59ca755
2 changed files with 16 additions and 3 deletions

View File

@ -392,6 +392,13 @@ div#main-content {
width: 27em;
margin: 0 1ex;
vertical-align: top;
&.agent-auth {
margin: 0 auto;
margin-bottom: 1ex;
> p, div.login-actions {
display: none;
}
}
@media screen and (max-width: $mobile-limit) {
width: auto;
}

View File

@ -31,7 +31,13 @@
{% block content %}
<div id="login-page" class="methods{{methods|length}}{% if not user.is_authenticated and request.session.fc_id_token %} fc-authenticated{% endif %}">
{% if not request.session.fc_id_token %}
<h2>Connectez-vous à {% if request.partner %}<a href="{{ request.partner.url }}" style="color: {{ request.partner.color }}">{{ request.partner.name|default:'NOM VILLE' }}</a> avec{% endif %} votre {{ account_label }}</h2>
<h2>
{% if 'admin-cut' in request.get_host %}
Connectez-vous à votre compte agent GRANDLYON CONNECT
{% else %}
Connectez-vous à {% if request.partner %}<a href="{{ request.partner.url }}" style="color: {{ request.partner.color }}">{{ request.partner.name|default:'NOM VILLE' }}</a> avec{% endif %} votre {{ account_label }}
{% endif %}
</h2>
{% endif %}
@ -39,7 +45,7 @@
<div id="methods">
{% if not user.is_authenticated and not request.session.fc_id_token %}
{% for name, content in methods %}
<div><p>
<div{% if "admin-cut" in request.get_host %} class="agent-auth"{% endif %}><p>
{% if not forloop.last %}
Utilisez <strong>votre courriel et votre mot de passe</strong> pour accéder à votre {{ account_label }}
{% else %}
@ -79,7 +85,7 @@
{% if not request.session.fc_id_token %}
{% if registration_authorized %}
{% if registration_authorized and "admin-cut" not in request.get_host %}
<div id="login-footer">
<h2>Pas encore de compte ?</h2>
<p><a href="{{ registration_url }}" class="button">Créer un {{ account_label }}</a></p>