diff --git a/src/shared/templates/_footer.html b/src/shared/templates/_footer.html index af91d07..63052d4 100644 --- a/src/shared/templates/_footer.html +++ b/src/shared/templates/_footer.html @@ -1,6 +1,6 @@ {% load i18n django_browser_reload %} diff --git a/src/shared/templates/account/login.html b/src/shared/templates/account/login.html new file mode 100644 index 0000000..87eb4cb --- /dev/null +++ b/src/shared/templates/account/login.html @@ -0,0 +1,36 @@ +{% extends "base.html" %} + +{% load i18n socialaccount %} +{% load allauth account %} + +{% block content %} +

{% trans "Connexion via un compte tiers" %}

+
+ + {% get_providers as providers %} + +
+ {% for provider in providers %} + {% if provider.id == "openid" %} + {% for brand in provider.get_brands %} + {{ brand.name }} + {% endfor %} + {% endif %} + + {{ provider.name }} + {% endfor %} +
+ + +{% endblock content %} + +{% block extra_body %} + {{ block.super }} + {% if PASSKEY_LOGIN_ENABLED %} + {% include "mfa/webauthn/snippets/login_script.html" with button_id="passkey_login" %} + {% endif %} +{% endblock extra_body %} diff --git a/src/shared/templates/account/logout.html b/src/shared/templates/account/logout.html new file mode 100644 index 0000000..8ff4077 --- /dev/null +++ b/src/shared/templates/account/logout.html @@ -0,0 +1,18 @@ +{% extends "base.html" %} + +{% load allauth i18n %} + +{% block content %} +

{% trans "Déconnexion" %}

+
+ +

+ {% trans "Êtes vous certain·e de vouloir vous déconnecter ?" %} +

+ +
+ {% csrf_token %} + {{ redirect_field }} + +
+{% endblock content %} diff --git a/src/shared/templates/allauth/elements/button.html b/src/shared/templates/allauth/elements/button.html index e168e8e..7fe19ef 100644 --- a/src/shared/templates/allauth/elements/button.html +++ b/src/shared/templates/allauth/elements/button.html @@ -1,4 +1,5 @@ {% load allauth %} + {% comment %} djlint:off {% endcomment %} <{% if attrs.href %}a href="{{ attrs.href }}"{% else %}button{% endif %} {% if attrs.form %}form="{{ attrs.form }}"{% endif %} diff --git a/src/shared/templates/allauth/elements/provider.html b/src/shared/templates/allauth/elements/provider.html deleted file mode 100644 index 89b8094..0000000 --- a/src/shared/templates/allauth/elements/provider.html +++ /dev/null @@ -1 +0,0 @@ -{{ attrs.name }} diff --git a/src/shared/templates/allauth/elements/provider_list.html b/src/shared/templates/allauth/elements/provider_list.html deleted file mode 100644 index 8430750..0000000 --- a/src/shared/templates/allauth/elements/provider_list.html +++ /dev/null @@ -1,6 +0,0 @@ -{% load allauth %} - -
- {% slot default %} - {% endslot %} -
diff --git a/src/shared/templates/allauth/layouts/base.html b/src/shared/templates/allauth/layouts/base.html index eb6082e..08c8108 100644 --- a/src/shared/templates/allauth/layouts/base.html +++ b/src/shared/templates/allauth/layouts/base.html @@ -1,5 +1,3 @@ -{% load django_browser_reload i18n sass_tags static %} - @@ -15,8 +13,17 @@ {% include "_hero.html" %} -
-
+
+
+ {% for message in messages %} +
+ + {{ message|safe }} +
+ {% endfor %} +
+ +
{% block content %} {% endblock content %}
diff --git a/src/shared/templates/socialaccount/authentication_error.html b/src/shared/templates/socialaccount/authentication_error.html new file mode 100644 index 0000000..679c2ea --- /dev/null +++ b/src/shared/templates/socialaccount/authentication_error.html @@ -0,0 +1,13 @@ +{% extends "base.html" %} + +{% load i18n %} +{% load allauth %} + +{% block content %} +

{% trans "Erreur lors de la connexion" %}

+
+ +

+ {% trans "Une erreur est survenue lors de votre tentative de connexion avec un compte tiers." %} +

+{% endblock content %} diff --git a/src/shared/templates/socialaccount/login.html b/src/shared/templates/socialaccount/login.html new file mode 100644 index 0000000..86b9081 --- /dev/null +++ b/src/shared/templates/socialaccount/login.html @@ -0,0 +1,23 @@ +{% extends "base.html" %} + +{% load allauth i18n %} + +{% block title %} + {% trans "Connexion" %} +{% endblock title %} + +{% block content %} +

+ {% blocktrans with provider.name as provider %}Se connecter via un compte {{ provider }}{% endblocktrans %} +

+
+ +

+ {% blocktrans with provider.name as provider %}Vous vous apprêtez à vous connecter à l'aide d'un compte tiers provenant de {{ provider }}.{% endblocktrans %} +

+ +
+ {% csrf_token %} + +
+{% endblock content %} diff --git a/src/shared/templates/socialaccount/snippets/provider_list.html b/src/shared/templates/socialaccount/snippets/provider_list.html deleted file mode 100644 index 3eb191e..0000000 --- a/src/shared/templates/socialaccount/snippets/provider_list.html +++ /dev/null @@ -1,19 +0,0 @@ -{% load allauth socialaccount %} - -{% get_providers as socialaccount_providers %} -{% if socialaccount_providers %} - {% element provider_list %} - {% for provider in socialaccount_providers %} - {% if provider.id == "openid" %} - {% for brand in provider.get_brands %} - {% provider_login_url provider openid=brand.openid_url process=process as href %} - {% element provider name=brand.name provider_id=provider.id href=href color=provider.app.settings.color %} - {% endelement %} - {% endfor %} - {% endif %} - {% provider_login_url provider process=process scope=scope auth_params=auth_params as href %} - {% element provider name=provider.name provider_id=provider.id href=href color=provider.app.settings.color %} -{% endelement %} -{% endfor %} -{% endelement %} -{% endif %}