From c34a5967b84f7713150eac397a6d61ec7b95e01b Mon Sep 17 00:00:00 2001 From: Matthias Date: Thu, 26 Aug 2021 23:17:00 +0200 Subject: [PATCH] user-settings template for social accounts --- .../templates/InvenTree/settings/user.html | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/InvenTree/templates/InvenTree/settings/user.html b/InvenTree/templates/InvenTree/settings/user.html index 922e9ebc79..f57221c9ac 100644 --- a/InvenTree/templates/InvenTree/settings/user.html +++ b/InvenTree/templates/InvenTree/settings/user.html @@ -2,6 +2,7 @@ {% load i18n %} {% load inventree_extras %} +{% load socialaccount %} {% block label %}account{% endblock %} @@ -38,6 +39,54 @@ +
+

{% trans "Social Accounts" %}

+
+ +
+ {% if form.accounts %} +

{% blocktrans %}You can sign in to your account using any of the following third party accounts:{% endblocktrans %}

+ + +
+ {% csrf_token %} + +
+ {% if form.non_field_errors %} +
{{ form.non_field_errors }}
+ {% endif %} + + {% for base_account in form.accounts %} + {% with base_account.get_provider_account as account %} +
+ +
+ {% endwith %} + {% endfor %} + +
+ +
+ +
+ +
+ + {% else %} +

{% trans 'You currently have no social network accounts connected to this account.' %}

+ {% endif %} + +

{% trans 'Add a 3rd Party Account' %}

+ {% include "socialaccount/snippets/provider_list.html" with process="connect" %} + {% include "socialaccount/snippets/login_extra.html" %} + +
+ +

{% trans "Theme Settings" %}