From 53c88c3b132f83d6e14197284831459113983b90 Mon Sep 17 00:00:00 2001 From: Alexis Metaireau Date: Thu, 21 Oct 2021 19:16:32 +0200 Subject: [PATCH] Add a LEGAL_LINK setting. Fixes #761 (#883) --- docs/configuration.rst | 10 ++++++- ihatemoney/default_settings.py | 1 + ihatemoney/messages.pot | 3 ++ ihatemoney/static/images/legal.svg | 44 ++++++++++++++++++++++++++++++ ihatemoney/templates/layout.html | 5 ++++ 5 files changed, 62 insertions(+), 1 deletion(-) create mode 100644 ihatemoney/static/images/legal.svg diff --git a/docs/configuration.rst b/docs/configuration.rst index 140a12e6..5106282a 100644 --- a/docs/configuration.rst +++ b/docs/configuration.rst @@ -161,6 +161,15 @@ Note: this setting is actually interpreted by Flask-Babel, see the It is possible to add a simple captcha in order to filter out spammer bots on the form creation. In order to do so, you just have to set `ENABLE_CAPTCHA = True`. +`LEGAL_LINK` +------------ + +You may want to point to a special legal page, for instance to give information +about GDPR, or how you handle the data of your users. + +If you want to do this, you can use the `LEGAL_LINK` setting. Set it to the URL +you want. + Configuring emails sending -------------------------- @@ -176,4 +185,3 @@ possible to configure it to act differently, thanks to the great * **MAIL_USERNAME** : default **None** * **MAIL_PASSWORD** : default **None** * **DEFAULT_MAIL_SENDER** : default **None** - diff --git a/ihatemoney/default_settings.py b/ihatemoney/default_settings.py index 3204ed3b..860e3b1e 100644 --- a/ihatemoney/default_settings.py +++ b/ihatemoney/default_settings.py @@ -33,3 +33,4 @@ SUPPORTED_LANGUAGES = [ "zh_Hans", ] ENABLE_CAPTCHA = False +LEGAL_LINK = "" diff --git a/ihatemoney/messages.pot b/ihatemoney/messages.pot index bdb93d29..1a5e8597 100644 --- a/ihatemoney/messages.pot +++ b/ihatemoney/messages.pot @@ -739,6 +739,9 @@ msgstr "" msgid "Administation Dashboard" msgstr "" +msgid "Legal information" +msgstr "" + msgid "\"I hate money\" is free software" msgstr "" diff --git a/ihatemoney/static/images/legal.svg b/ihatemoney/static/images/legal.svg new file mode 100644 index 00000000..223ba2b0 --- /dev/null +++ b/ihatemoney/static/images/legal.svg @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ihatemoney/templates/layout.html b/ihatemoney/templates/layout.html index 6867fcf2..aca60dd1 100644 --- a/ihatemoney/templates/layout.html +++ b/ihatemoney/templates/layout.html @@ -150,6 +150,11 @@ {{ static_include("images/cog.svg") | safe }} {% endif %} + {% if config.LEGAL_LINK %} + + {{ static_include("images/legal.svg") | safe }} + + {% endif %}