Update login layout
This commit is contained in:
parent
82c37a2eb2
commit
4ce88a36b0
2 changed files with 30 additions and 13 deletions
|
|
@ -9,23 +9,17 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="card mx-auto login">
|
<div class="card mx-auto login">
|
||||||
<h3 class="card-header text-center">
|
|
||||||
{% trans "Sign In" %}
|
|
||||||
</h3>
|
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
{% get_providers as socialaccount_providers %}
|
{% get_providers as socialaccount_providers %}
|
||||||
{% if socialaccount_providers %}
|
{% if socialaccount_providers %}
|
||||||
|
<div class="d-grid col-6 mx-auto">
|
||||||
|
{% include "socialaccount/snippets/provider_list.html" with process="login" %}
|
||||||
|
</div>
|
||||||
|
<hr/>
|
||||||
<p>{% blocktrans trimmed with site.name as site_name %}Please sign in with one
|
<p>{% blocktrans trimmed with site.name as site_name %}Please sign in with one
|
||||||
of your existing third party accounts. Or, <a href="{{ signup_url }}">sign up</a>
|
of your existing third party accounts. Or, <a href="{{ signup_url }}">sign up</a>
|
||||||
for a {{ site_name }} account and sign in below:{% endblocktrans %}</p>
|
for a {{ site_name }} account and sign in below:{% endblocktrans %}</p>
|
||||||
|
|
||||||
<div class="socialaccount_ballot">
|
|
||||||
<ul class="socialaccount_providers">
|
|
||||||
{% include "socialaccount/snippets/provider_list.html" with process="login" %}
|
|
||||||
</ul>
|
|
||||||
<div class="login-or">{% trans 'or' %}</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{% include "socialaccount/snippets/login_extra.html" %}
|
{% include "socialaccount/snippets/login_extra.html" %}
|
||||||
|
|
||||||
{% else %}
|
{% else %}
|
||||||
|
|
@ -38,9 +32,11 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
{% if redirect_field_value %}
|
{% if redirect_field_value %}
|
||||||
<input type="hidden" name="{{ redirect_field_name }}" value="{{ redirect_field_value }}" />
|
<input type="hidden" name="{{ redirect_field_name }}" value="{{ redirect_field_value }}" />
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<button type="submit" class="btn btn-primary mt-2">{% trans "Sign In" %}</button>
|
<div class="d-grid col-6 mx-auto">
|
||||||
<a class="btn mt-2" href="{% url 'account_reset_password' %}">{% trans "Forgot Password?" %}</a>
|
<button type="submit" class="btn btn-primary btn-lg my-2">{% trans "Sign In" %}</button>
|
||||||
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
<a class="link-secondary" href="{% url 'account_reset_password' %}">{% trans "Forgot Password?" %}</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<p class="small text-center mt-1">{% trans "If any problem, please contact the server owners at" %} <code>photos[at]crans.org</code>.</p>
|
<p class="small text-center mt-1">{% trans "If any problem, please contact the server owners at" %} <code>photos[at]crans.org</code>.</p>
|
||||||
|
|
|
||||||
21
photo21/templates/socialaccount/snippets/provider_list.html
Normal file
21
photo21/templates/socialaccount/snippets/provider_list.html
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
{% comment %}
|
||||||
|
This file is part of photo21
|
||||||
|
Copyright (C) 2022 Amicale des élèves de l'ENS Paris-Saclay
|
||||||
|
SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
{% endcomment %}
|
||||||
|
{% load i18n socialaccount %}
|
||||||
|
|
||||||
|
{% get_providers as socialaccount_providers %}
|
||||||
|
|
||||||
|
{% for provider in socialaccount_providers %}
|
||||||
|
{% if provider.id == "openid" %}
|
||||||
|
{% for brand in provider.get_brands %}
|
||||||
|
<a title="{{brand.name}}"
|
||||||
|
class="btn btn-success"
|
||||||
|
href="{% provider_login_url provider.id openid=brand.openid_url process=process %}"
|
||||||
|
>{{brand.name}}</a>
|
||||||
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
|
<a title="{{provider.name}}" class="btn btn-success"
|
||||||
|
href="{% provider_login_url provider.id process=process scope=scope auth_params=auth_params %}">{% trans "Sign in with" %} {{provider.name}}</a>
|
||||||
|
{% endfor %}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue