diff --git a/photo21/templates/account/login.html b/photo21/templates/account/login.html index db32d3d..1e7723f 100644 --- a/photo21/templates/account/login.html +++ b/photo21/templates/account/login.html @@ -9,22 +9,16 @@ SPDX-License-Identifier: GPL-3.0-or-later {% block content %}
-

- {% trans "Sign In" %} -

{% get_providers as socialaccount_providers %} {% if socialaccount_providers %} -

{% blocktrans trimmed with site.name as site_name %}Please sign in with one - of your existing third party accounts. Or, sign up - for a {{ site_name }} account and sign in below:{% endblocktrans %}

- -
-
    +
    {% include "socialaccount/snippets/provider_list.html" with process="login" %} -
-
+
+

{% blocktrans trimmed with site.name as site_name %}Please sign in with one + of your existing third party accounts. Or, sign up + for a {{ site_name }} account and sign in below:{% endblocktrans %}

{% include "socialaccount/snippets/login_extra.html" %} @@ -38,9 +32,11 @@ SPDX-License-Identifier: GPL-3.0-or-later {% if redirect_field_value %} {% endif %} - - {% trans "Forgot Password?" %} +
+ +
+ {% trans "Forgot Password?" %}

{% trans "If any problem, please contact the server owners at" %} photos[at]crans.org.

diff --git a/photo21/templates/socialaccount/snippets/provider_list.html b/photo21/templates/socialaccount/snippets/provider_list.html new file mode 100644 index 0000000..71a8ec0 --- /dev/null +++ b/photo21/templates/socialaccount/snippets/provider_list.html @@ -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 %} +{{brand.name}} +{% endfor %} +{% endif %} +{% trans "Sign in with" %} {{provider.name}} +{% endfor %}