From 8f1caddbe0f83ee83e6321e19ec67ad53b3df031 Mon Sep 17 00:00:00 2001 From: Yohann D'ANELLO Date: Sat, 7 Mar 2020 18:18:35 +0100 Subject: [PATCH] Add signup link, customize templates --- locale/de/LC_MESSAGES/django.po | 191 +++++++++++----- locale/fr/LC_MESSAGES/django.po | 207 +++++++++++++----- note_kfet/settings/base.py | 18 ++ note_kfet/settings/development.py | 5 + templates/cas_server/base.html | 99 +++++++++ templates/cas_server/form.html | 26 +++ templates/cas_server/logged.html | 21 ++ templates/cas_server/login.html | 33 +++ templates/cas_server/logout.html | 7 + templates/cas_server/proxy.xml | 5 + templates/cas_server/samlValidate.xml | 59 +++++ templates/cas_server/samlValidateError.xml | 14 ++ templates/cas_server/serviceValidate.xml | 19 ++ templates/cas_server/serviceValidateError.xml | 3 + templates/cas_server/warn.html | 11 + 15 files changed, 607 insertions(+), 111 deletions(-) create mode 100644 templates/cas_server/base.html create mode 100644 templates/cas_server/form.html create mode 100644 templates/cas_server/logged.html create mode 100644 templates/cas_server/login.html create mode 100644 templates/cas_server/logout.html create mode 100644 templates/cas_server/proxy.xml create mode 100644 templates/cas_server/samlValidate.xml create mode 100644 templates/cas_server/samlValidateError.xml create mode 100644 templates/cas_server/serviceValidate.xml create mode 100644 templates/cas_server/serviceValidateError.xml create mode 100644 templates/cas_server/warn.html diff --git a/locale/de/LC_MESSAGES/django.po b/locale/de/LC_MESSAGES/django.po index 386db34c..ce17f5de 100644 --- a/locale/de/LC_MESSAGES/django.po +++ b/locale/de/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-02-27 17:39+0100\n" +"POT-Creation-Date: 2020-03-07 18:01+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -24,8 +24,8 @@ msgstr "" #: apps/activity/models.py:19 apps/activity/models.py:44 #: apps/member/models.py:60 apps/member/models.py:111 -#: apps/note/models/notes.py:184 apps/note/models/transactions.py:24 -#: apps/note/models/transactions.py:44 templates/member/profile_detail.html:11 +#: apps/note/models/notes.py:187 apps/note/models/transactions.py:24 +#: apps/note/models/transactions.py:44 templates/member/profile_detail.html:15 msgid "name" msgstr "" @@ -49,7 +49,7 @@ msgstr "" msgid "description" msgstr "" -#: apps/activity/models.py:54 apps/note/models/notes.py:160 +#: apps/activity/models.py:54 apps/note/models/notes.py:163 #: apps/note/models/transactions.py:62 msgid "type" msgstr "" @@ -90,39 +90,43 @@ msgstr "" msgid "Logs" msgstr "" -#: apps/logs/models.py:20 apps/note/models/notes.py:105 +#: apps/logs/models.py:21 apps/note/models/notes.py:116 msgid "user" msgstr "" #: apps/logs/models.py:27 +msgid "IP Address" +msgstr "" + +#: apps/logs/models.py:35 msgid "model" msgstr "" -#: apps/logs/models.py:34 +#: apps/logs/models.py:42 msgid "identifier" msgstr "" -#: apps/logs/models.py:39 +#: apps/logs/models.py:47 msgid "previous data" msgstr "" -#: apps/logs/models.py:44 +#: apps/logs/models.py:52 msgid "new data" msgstr "" -#: apps/logs/models.py:51 +#: apps/logs/models.py:59 msgid "action" msgstr "" -#: apps/logs/models.py:59 +#: apps/logs/models.py:67 msgid "timestamp" msgstr "" -#: apps/logs/models.py:63 +#: apps/logs/models.py:71 msgid "Logs cannot be destroyed." msgstr "" -#: apps/member/apps.py:10 +#: apps/member/apps.py:14 msgid "member" msgstr "" @@ -130,7 +134,7 @@ msgstr "" msgid "phone number" msgstr "" -#: apps/member/models.py:29 templates/member/profile_detail.html:24 +#: apps/member/models.py:29 templates/member/profile_detail.html:28 msgid "section" msgstr "" @@ -138,7 +142,7 @@ msgstr "" msgid "e.g. \"1A0\", \"9A♥\", \"SAPHIRE\"" msgstr "" -#: apps/member/models.py:36 templates/member/profile_detail.html:27 +#: apps/member/models.py:36 templates/member/profile_detail.html:31 msgid "address" msgstr "" @@ -184,7 +188,7 @@ msgid "" "members can renew their membership." msgstr "" -#: apps/member/models.py:93 apps/note/models/notes.py:135 +#: apps/member/models.py:93 apps/note/models/notes.py:138 msgid "club" msgstr "" @@ -220,19 +224,23 @@ msgstr "" msgid "memberships" msgstr "" -#: apps/member/views.py:63 templates/member/profile_detail.html:42 +#: apps/member/views.py:69 templates/member/profile_detail.html:46 msgid "Update Profile" msgstr "" -#: apps/member/views.py:79 +#: apps/member/views.py:82 msgid "An alias with a similar name already exists." msgstr "" -#: apps/member/views.py:130 +#: apps/member/views.py:132 #, python-format msgid "Account #%(id)s: %(username)s" msgstr "" +#: apps/member/views.py:200 +msgid "Alias successfully deleted" +msgstr "" + #: apps/note/admin.py:120 apps/note/models/transactions.py:93 msgid "source" msgstr "" @@ -242,11 +250,23 @@ msgstr "" msgid "destination" msgstr "" -#: apps/note/apps.py:14 apps/note/models/notes.py:54 +#: apps/note/apps.py:14 apps/note/models/notes.py:57 msgid "note" msgstr "" -#: apps/note/forms.py:49 +#: apps/note/forms.py:26 +msgid "New Alias" +msgstr "" + +#: apps/note/forms.py:31 +msgid "select an image" +msgstr "" + +#: apps/note/forms.py:32 +msgid "Maximal size: 2MB" +msgstr "" + +#: apps/note/forms.py:77 msgid "Source and destination must be different." msgstr "" @@ -280,81 +300,77 @@ msgstr "" msgid "display image" msgstr "" -#: apps/note/models/notes.py:49 apps/note/models/transactions.py:102 +#: apps/note/models/notes.py:52 apps/note/models/transactions.py:102 msgid "created at" msgstr "" -#: apps/note/models/notes.py:55 +#: apps/note/models/notes.py:58 msgid "notes" msgstr "" -#: apps/note/models/notes.py:63 +#: apps/note/models/notes.py:66 msgid "Note" msgstr "" -#: apps/note/models/notes.py:73 apps/note/models/notes.py:97 +#: apps/note/models/notes.py:76 apps/note/models/notes.py:100 msgid "This alias is already taken." msgstr "" -#: apps/note/models/notes.py:113 -msgid "user" -msgstr "" - -#: apps/note/models/notes.py:117 +#: apps/note/models/notes.py:120 msgid "one's note" msgstr "" -#: apps/note/models/notes.py:118 +#: apps/note/models/notes.py:121 msgid "users note" msgstr "" -#: apps/note/models/notes.py:124 +#: apps/note/models/notes.py:127 #, python-format msgid "%(user)s's note" msgstr "" -#: apps/note/models/notes.py:139 +#: apps/note/models/notes.py:142 msgid "club note" msgstr "" -#: apps/note/models/notes.py:140 +#: apps/note/models/notes.py:143 msgid "clubs notes" msgstr "" -#: apps/note/models/notes.py:146 +#: apps/note/models/notes.py:149 #, python-format msgid "Note of %(club)s club" msgstr "" -#: apps/note/models/notes.py:166 +#: apps/note/models/notes.py:169 msgid "special note" msgstr "" -#: apps/note/models/notes.py:167 +#: apps/note/models/notes.py:170 msgid "special notes" msgstr "" -#: apps/note/models/notes.py:190 +#: apps/note/models/notes.py:193 msgid "Invalid alias" msgstr "" -#: apps/note/models/notes.py:206 +#: apps/note/models/notes.py:209 msgid "alias" msgstr "" -#: apps/note/models/notes.py:207 templates/member/profile_detail.html:33 +#: apps/note/models/notes.py:210 templates/member/profile_detail.html:37 msgid "aliases" msgstr "" -#: apps/note/models/notes.py:233 +#: apps/note/models/notes.py:228 msgid "Alias is too long." msgstr "" -#: apps/note/models/notes.py:238 -msgid "An alias with a similar name already exists:" +#: apps/note/models/notes.py:233 +msgid "An alias with a similar name already exists: {} " msgstr "" -#: apps/note/models/notes.py:246 +#: apps/note/models/notes.py:242 msgid "You can't delete your main alias." msgstr "" @@ -422,22 +438,79 @@ msgstr "" msgid "Consommations" msgstr "" -#: note_kfet/settings/base.py:155 +#: note_kfet/settings/base.py:162 msgid "German" msgstr "" -#: note_kfet/settings/base.py:156 +#: note_kfet/settings/base.py:163 msgid "English" msgstr "" -#: note_kfet/settings/base.py:157 +#: note_kfet/settings/base.py:164 msgid "French" msgstr "" +#: note_kfet/settings/base.py:215 +msgid "" +"The Central Authentication Service grants you access to most of our websites " +"by authenticating only once, so you don't need to type your credentials " +"again unless your session expires or you logout." +msgstr "" + #: templates/base.html:13 msgid "The ENS Paris-Saclay BDE note." msgstr "" +#: templates/cas_server/base.html:7 templates/cas_server/base.html:26 +msgid "Central Authentication Service" +msgstr "" + +#: templates/cas_server/base.html:43 +#, python-format +msgid "" +"A new version of the application is available. This instance runs " +"%(VERSION)s and the last version is %(LAST_VERSION)s. Please consider " +"upgrading." +msgstr "" + +#: templates/cas_server/logged.html:4 +msgid "" +"

Log In Successful

You have successfully logged into the Central " +"Authentication Service.
For security reasons, please Log Out and Exit " +"your web browser when you are done accessing services that require " +"authentication!" +msgstr "" + +#: templates/cas_server/logged.html:8 +msgid "Log me out from all my sessions" +msgstr "" + +#: templates/cas_server/logged.html:14 +msgid "Forget the identity provider" +msgstr "" + +#: templates/cas_server/logged.html:18 +msgid "Logout" +msgstr "" + +#: templates/cas_server/login.html:6 +msgid "Please log in" +msgstr "" + +#: templates/cas_server/login.html:11 +msgid "" +"If you don't have any Note Kfet account, please follow this link to sign up." +msgstr "" + +#: templates/cas_server/login.html:17 +msgid "Login" +msgstr "" + +#: templates/cas_server/warn.html:9 +msgid "Connect to the service" +msgstr "" + #: templates/member/club_detail.html:10 msgid "Membership starts on" msgstr "" @@ -450,10 +523,14 @@ msgstr "" msgid "Membership duration" msgstr "" -#: templates/member/club_detail.html:18 templates/member/profile_detail.html:30 +#: templates/member/club_detail.html:18 templates/member/profile_detail.html:34 msgid "balance" msgstr "" +#: templates/member/club_detail.html:51 templates/member/profile_detail.html:75 +msgid "Transaction history" +msgstr "" + #: templates/member/manage_auth_tokens.html:16 msgid "Token" msgstr "" @@ -466,27 +543,35 @@ msgstr "" msgid "Regenerate token" msgstr "" -#: templates/member/profile_detail.html:11 +#: templates/member/profile_alias.html:10 +msgid "Add alias" +msgstr "" + +#: templates/member/profile_detail.html:15 msgid "first name" msgstr "" -#: templates/member/profile_detail.html:14 +#: templates/member/profile_detail.html:18 msgid "username" msgstr "" -#: templates/member/profile_detail.html:17 +#: templates/member/profile_detail.html:21 msgid "password" msgstr "" -#: templates/member/profile_detail.html:20 +#: templates/member/profile_detail.html:24 msgid "Change password" msgstr "" -#: templates/member/profile_detail.html:38 +#: templates/member/profile_detail.html:42 msgid "Manage auth token" msgstr "" -#: templates/member/profile_detail.html:54 +#: templates/member/profile_detail.html:49 +msgid "View Profile" +msgstr "" + +#: templates/member/profile_detail.html:62 msgid "View my memberships" msgstr "" diff --git a/locale/fr/LC_MESSAGES/django.po b/locale/fr/LC_MESSAGES/django.po index e7341740..3a8cfb79 100644 --- a/locale/fr/LC_MESSAGES/django.po +++ b/locale/fr/LC_MESSAGES/django.po @@ -3,7 +3,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-02-27 17:39+0100\n" +"POT-Creation-Date: 2020-03-07 18:01+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -19,8 +19,8 @@ msgstr "activité" #: apps/activity/models.py:19 apps/activity/models.py:44 #: apps/member/models.py:60 apps/member/models.py:111 -#: apps/note/models/notes.py:184 apps/note/models/transactions.py:24 -#: apps/note/models/transactions.py:44 templates/member/profile_detail.html:11 +#: apps/note/models/notes.py:187 apps/note/models/transactions.py:24 +#: apps/note/models/transactions.py:44 templates/member/profile_detail.html:15 msgid "name" msgstr "nom" @@ -44,7 +44,7 @@ msgstr "types d'activité" msgid "description" msgstr "description" -#: apps/activity/models.py:54 apps/note/models/notes.py:160 +#: apps/activity/models.py:54 apps/note/models/notes.py:163 #: apps/note/models/transactions.py:62 msgid "type" msgstr "type" @@ -85,43 +85,49 @@ msgstr "" msgid "Logs" msgstr "" -#: apps/logs/models.py:20 apps/note/models/notes.py:105 +#: apps/logs/models.py:21 apps/note/models/notes.py:116 msgid "user" msgstr "utilisateur" #: apps/logs/models.py:27 +#, fuzzy +#| msgid "address" +msgid "IP Address" +msgstr "adresse" + +#: apps/logs/models.py:35 msgid "model" msgstr "Modèle" -#: apps/logs/models.py:34 +#: apps/logs/models.py:42 msgid "identifier" msgstr "Identifiant" -#: apps/logs/models.py:39 +#: apps/logs/models.py:47 msgid "previous data" msgstr "Données précédentes" -#: apps/logs/models.py:44 +#: apps/logs/models.py:52 #, fuzzy #| msgid "end date" msgid "new data" msgstr "Nouvelles données" -#: apps/logs/models.py:51 +#: apps/logs/models.py:59 #, fuzzy #| msgid "section" msgid "action" msgstr "Action" -#: apps/logs/models.py:59 +#: apps/logs/models.py:67 msgid "timestamp" msgstr "Date" -#: apps/logs/models.py:63 +#: apps/logs/models.py:71 msgid "Logs cannot be destroyed." msgstr "Les logs ne peuvent pas être détruits." -#: apps/member/apps.py:10 +#: apps/member/apps.py:14 msgid "member" msgstr "adhérent" @@ -129,7 +135,7 @@ msgstr "adhérent" msgid "phone number" msgstr "numéro de téléphone" -#: apps/member/models.py:29 templates/member/profile_detail.html:24 +#: apps/member/models.py:29 templates/member/profile_detail.html:28 msgid "section" msgstr "section" @@ -137,7 +143,7 @@ msgstr "section" msgid "e.g. \"1A0\", \"9A♥\", \"SAPHIRE\"" msgstr "e.g. \"1A0\", \"9A♥\", \"SAPHIRE\"" -#: apps/member/models.py:36 templates/member/profile_detail.html:27 +#: apps/member/models.py:36 templates/member/profile_detail.html:31 msgid "address" msgstr "adresse" @@ -187,7 +193,7 @@ msgstr "" "Combien de temps l'adhésion peut durer après le 1er Janvier de l'année " "suivante avant que les adhérents peuvent renouveler leur adhésion." -#: apps/member/models.py:93 apps/note/models/notes.py:135 +#: apps/member/models.py:93 apps/note/models/notes.py:138 msgid "club" msgstr "club" @@ -223,19 +229,23 @@ msgstr "adhésion" msgid "memberships" msgstr "adhésions" -#: apps/member/views.py:63 templates/member/profile_detail.html:42 +#: apps/member/views.py:69 templates/member/profile_detail.html:46 msgid "Update Profile" msgstr "Modifier le profil" -#: apps/member/views.py:79 +#: apps/member/views.py:82 msgid "An alias with a similar name already exists." msgstr "Un alias avec un nom similaire existe déjà." -#: apps/member/views.py:130 +#: apps/member/views.py:132 #, python-format msgid "Account #%(id)s: %(username)s" msgstr "Compte n°%(id)s : %(username)s" +#: apps/member/views.py:200 +msgid "Alias successfully deleted" +msgstr "" + #: apps/note/admin.py:120 apps/note/models/transactions.py:93 msgid "source" msgstr "source" @@ -245,11 +255,25 @@ msgstr "source" msgid "destination" msgstr "destination" -#: apps/note/apps.py:14 apps/note/models/notes.py:54 +#: apps/note/apps.py:14 apps/note/models/notes.py:57 msgid "note" msgstr "note" -#: apps/note/forms.py:49 +#: apps/note/forms.py:26 +msgid "New Alias" +msgstr "" + +#: apps/note/forms.py:31 +#, fuzzy +#| msgid "display image" +msgid "select an image" +msgstr "image affichée" + +#: apps/note/forms.py:32 +msgid "Maximal size: 2MB" +msgstr "" + +#: apps/note/forms.py:77 msgid "Source and destination must be different." msgstr "La source et la destination doivent être différentes." @@ -284,81 +308,79 @@ msgstr "" msgid "display image" msgstr "image affichée" -#: apps/note/models/notes.py:49 apps/note/models/transactions.py:102 +#: apps/note/models/notes.py:52 apps/note/models/transactions.py:102 msgid "created at" msgstr "créée le" -#: apps/note/models/notes.py:55 +#: apps/note/models/notes.py:58 msgid "notes" msgstr "notes" -#: apps/note/models/notes.py:63 +#: apps/note/models/notes.py:66 msgid "Note" msgstr "Note" -#: apps/note/models/notes.py:73 apps/note/models/notes.py:97 +#: apps/note/models/notes.py:76 apps/note/models/notes.py:100 msgid "This alias is already taken." msgstr "Cet alias est déjà pris." -#: apps/note/models/notes.py:113 -msgid "user" -msgstr "utilisateur" - -#: apps/note/models/notes.py:117 +#: apps/note/models/notes.py:120 msgid "one's note" msgstr "note d'un utilisateur" -#: apps/note/models/notes.py:118 +#: apps/note/models/notes.py:121 msgid "users note" msgstr "notes des utilisateurs" -#: apps/note/models/notes.py:124 +#: apps/note/models/notes.py:127 #, python-format msgid "%(user)s's note" msgstr "Note de %(user)s" -#: apps/note/models/notes.py:139 +#: apps/note/models/notes.py:142 msgid "club note" msgstr "note d'un club" -#: apps/note/models/notes.py:140 +#: apps/note/models/notes.py:143 msgid "clubs notes" msgstr "notes des clubs" -#: apps/note/models/notes.py:146 +#: apps/note/models/notes.py:149 #, python-format msgid "Note of %(club)s club" msgstr "Note du club %(club)s" -#: apps/note/models/notes.py:166 +#: apps/note/models/notes.py:169 msgid "special note" msgstr "note spéciale" -#: apps/note/models/notes.py:167 +#: apps/note/models/notes.py:170 msgid "special notes" msgstr "notes spéciales" -#: apps/note/models/notes.py:190 +#: apps/note/models/notes.py:193 msgid "Invalid alias" msgstr "Alias invalide" -#: apps/note/models/notes.py:206 +#: apps/note/models/notes.py:209 msgid "alias" msgstr "alias" -#: apps/note/models/notes.py:207 templates/member/profile_detail.html:33 +#: apps/note/models/notes.py:210 templates/member/profile_detail.html:37 msgid "aliases" msgstr "alias" -#: apps/note/models/notes.py:233 +#: apps/note/models/notes.py:228 msgid "Alias is too long." msgstr "L'alias est trop long." -#: apps/note/models/notes.py:238 -msgid "An alias with a similar name already exists:" +#: apps/note/models/notes.py:233 +#, fuzzy +#| msgid "An alias with a similar name already exists:" +msgid "An alias with a similar name already exists: {} " msgstr "Un alias avec un nom similaire existe déjà." -#: apps/note/models/notes.py:246 +#: apps/note/models/notes.py:242 msgid "You can't delete your main alias." msgstr "Vous ne pouvez pas supprimer votre alias principal." @@ -427,22 +449,81 @@ msgstr "Transfert d'argent de ton compte vers un ou plusieurs autres" msgid "Consommations" msgstr "transactions" -#: note_kfet/settings/base.py:155 +#: note_kfet/settings/base.py:162 msgid "German" msgstr "" -#: note_kfet/settings/base.py:156 +#: note_kfet/settings/base.py:163 msgid "English" msgstr "" -#: note_kfet/settings/base.py:157 +#: note_kfet/settings/base.py:164 msgid "French" msgstr "" +#: note_kfet/settings/base.py:215 +msgid "" +"The Central Authentication Service grants you access to most of our websites " +"by authenticating only once, so you don't need to type your credentials " +"again unless your session expires or you logout." +msgstr "" + #: templates/base.html:13 msgid "The ENS Paris-Saclay BDE note." msgstr "La note du BDE de l'ENS Paris-Saclay." +#: templates/cas_server/base.html:7 templates/cas_server/base.html:26 +msgid "Central Authentication Service" +msgstr "" + +#: templates/cas_server/base.html:43 +#, python-format +msgid "" +"A new version of the application is available. This instance runs " +"%(VERSION)s and the last version is %(LAST_VERSION)s. Please consider " +"upgrading." +msgstr "" + +#: templates/cas_server/logged.html:4 +msgid "" +"

Log In Successful

You have successfully logged into the Central " +"Authentication Service.
For security reasons, please Log Out and Exit " +"your web browser when you are done accessing services that require " +"authentication!" +msgstr "" + +#: templates/cas_server/logged.html:8 +msgid "Log me out from all my sessions" +msgstr "" + +#: templates/cas_server/logged.html:14 +msgid "Forget the identity provider" +msgstr "" + +#: templates/cas_server/logged.html:18 +msgid "Logout" +msgstr "" + +#: templates/cas_server/login.html:6 +msgid "Please log in" +msgstr "" + +#: templates/cas_server/login.html:11 +msgid "" +"If you don't have any Note Kfet account, please follow this link to sign up." +msgstr "" +"Si vous n'avez pas de compte Note Kfet, veuillez suivre ce lien pour vous inscrire." + +#: templates/cas_server/login.html:17 +msgid "Login" +msgstr "" + +#: templates/cas_server/warn.html:9 +msgid "Connect to the service" +msgstr "" + #: templates/member/club_detail.html:10 msgid "Membership starts on" msgstr "L'adhésion commence le" @@ -455,10 +536,14 @@ msgstr "L'adhésion finie le" msgid "Membership duration" msgstr "Durée de l'adhésion" -#: templates/member/club_detail.html:18 templates/member/profile_detail.html:30 +#: templates/member/club_detail.html:18 templates/member/profile_detail.html:34 msgid "balance" msgstr "solde du compte" +#: templates/member/club_detail.html:51 templates/member/profile_detail.html:75 +msgid "Transaction history" +msgstr "Historique des transactions" + #: templates/member/manage_auth_tokens.html:16 msgid "Token" msgstr "Jeton" @@ -471,33 +556,39 @@ msgstr "Créé le" msgid "Regenerate token" msgstr "Regénérer le jeton" -#: templates/member/profile_detail.html:11 +#: templates/member/profile_alias.html:10 +#, fuzzy +#| msgid "alias" +msgid "Add alias" +msgstr "alias" + +#: templates/member/profile_detail.html:15 msgid "first name" msgstr "" -#: templates/member/profile_detail.html:14 +#: templates/member/profile_detail.html:18 msgid "username" msgstr "" -#: templates/member/profile_detail.html:17 -#, fuzzy -#| msgid "Change password" +#: templates/member/profile_detail.html:21 msgid "password" msgstr "" -#: templates/member/profile_detail.html:20 +#: templates/member/profile_detail.html:24 msgid "Change password" msgstr "Changer le mot de passe" -#: templates/member/profile_detail.html:38 +#: templates/member/profile_detail.html:42 msgid "Manage auth token" msgstr "Gérer les jetons d'authentification" -#: templates/member/profile_detail.html:51 -msgid "Transaction history" -msgstr "Historique des transactions" +#: templates/member/profile_detail.html:49 +#, fuzzy +#| msgid "Update Profile" +msgid "View Profile" +msgstr "Modifier le profil" -#: templates/member/profile_detail.html:54 +#: templates/member/profile_detail.html:62 msgid "View my memberships" msgstr "Voir mes adhésions" diff --git a/note_kfet/settings/base.py b/note_kfet/settings/base.py index 1810989d..7ab59272 100644 --- a/note_kfet/settings/base.py +++ b/note_kfet/settings/base.py @@ -206,4 +206,22 @@ PIC_RATIO = 1 CAS_AUTO_CREATE_USER = False CAS_LOGO_URL = "/static/img/Saperlistpopette.png" CAS_FAVICON_URL = "/static/favicon/favicon-32x32.png" +CAS_SHOW_SERVICE_MESSAGES = True +CAS_SHOW_POWERED = False +CAS_REDIRECT_TO_LOGIN_AFTER_LOGOUT = False +CAS_INFO_MESSAGES = { + "cas_explained": { + "message":_( + u"The Central Authentication Service grants you access to most of our websites by " + u"authenticating only once, so you don't need to type your credentials again unless " + u"your session expires or you logout." + ), + "discardable": True, + "type": "info", # one of info, success, info, warning, danger + }, +} + +CAS_INFO_MESSAGES_ORDER = [ + 'cas_explained', +] diff --git a/note_kfet/settings/development.py b/note_kfet/settings/development.py index ad2cd2f1..e16b6cf2 100644 --- a/note_kfet/settings/development.py +++ b/note_kfet/settings/development.py @@ -52,3 +52,8 @@ SESSION_COOKIE_AGE = 60 * 60 * 3 # CAS Client settings # Can be modified in secrets.py CAS_SERVER_URL = "https://note.comby.xyz/cas/" + + +STATIC_ROOT = '' # not needed in development settings +STATICFILES_DIRS = [ + os.path.join(BASE_DIR, 'static')] diff --git a/templates/cas_server/base.html b/templates/cas_server/base.html new file mode 100644 index 00000000..4e93cee0 --- /dev/null +++ b/templates/cas_server/base.html @@ -0,0 +1,99 @@ +{% load i18n %}{% load static %}{% get_current_language as LANGUAGE_CODE %} + + + + + + {% block title %}{% trans "Central Authentication Service" %}{% endblock %} + + + + + {% if settings.CAS_FAVICON_URL %}{% endif %} + + + +
+
+ {% if auto_submit %}{% endif %} +
+
+
+ {% if auto_submit %}{% endif %} + {% block content %}{% endblock %} +
+
+
+
+
+
+ {% if settings.CAS_SHOW_POWERED %} + + {% endif %} + + + + + {% block javascript %}{% endblock %} + + + diff --git a/templates/cas_server/form.html b/templates/cas_server/form.html new file mode 100644 index 00000000..405dedd1 --- /dev/null +++ b/templates/cas_server/form.html @@ -0,0 +1,26 @@ +{% load cas_server %} +{% for error in form.non_field_errors %} +
+ + {{error}} +
+{% endfor %} +{% for field in form %}{% if not field|is_hidden %} +
{% spaceless %} + {% if field|is_checkbox %} +
+ {% else %} + + {{field}} + {% endif %} + {% for error in field.errors %} + {{error}} + {% endfor %} +{% endspaceless %}
+{% else %}{{field}}{% endif %}{% endfor %} diff --git a/templates/cas_server/logged.html b/templates/cas_server/logged.html new file mode 100644 index 00000000..46e1c9a8 --- /dev/null +++ b/templates/cas_server/logged.html @@ -0,0 +1,21 @@ +{% extends "cas_server/base.html" %} +{% load i18n %} +{% block content %} + + +{% endblock %} + diff --git a/templates/cas_server/login.html b/templates/cas_server/login.html new file mode 100644 index 00000000..ddc2eb32 --- /dev/null +++ b/templates/cas_server/login.html @@ -0,0 +1,33 @@ +{% extends "cas_server/base.html" %} +{% load i18n %} + +{% block ante_messages %} +{% if auto_submit %}{% endif %} +{% endblock %} +{% block content %} +
+ {% trans "If you don't have any Note Kfet account, please follow this link to sign up." %} +
+ +{% endblock %} +{% block javascript_inline %} +jQuery(function( $ ){ + $("#id_warn").click(function(e){ + if($("#id_warn").is(':checked')){ + createCookie("warn", "on", 10 * 365); + } else { + eraseCookie("warn"); + } + }); +});{% if auto_submit %} +document.getElementById('login_form').submit(); // SUBMIT FORM{% endif %} +{% endblock %} + diff --git a/templates/cas_server/logout.html b/templates/cas_server/logout.html new file mode 100644 index 00000000..80693376 --- /dev/null +++ b/templates/cas_server/logout.html @@ -0,0 +1,7 @@ +{% extends "cas_server/base.html" %} +{% load static %} +{% load i18n %} +{% block content %} + +{% endblock %} + diff --git a/templates/cas_server/proxy.xml b/templates/cas_server/proxy.xml new file mode 100644 index 00000000..ab51d89a --- /dev/null +++ b/templates/cas_server/proxy.xml @@ -0,0 +1,5 @@ + + + {{ticket}} + + diff --git a/templates/cas_server/samlValidate.xml b/templates/cas_server/samlValidate.xml new file mode 100644 index 00000000..d61bed11 --- /dev/null +++ b/templates/cas_server/samlValidate.xml @@ -0,0 +1,59 @@ + + + + + + + + + + + + + {{Recipient}} + + + + + + {{username}} + + + urn:oasis:names:tc:SAML:1.0:cm:artifact + + + + + {{auth_date}} + + + false{# we do not support long-term (Remember-Me) auth #} + + + {{is_new_login}} + +{% for name, value in attributes %} + {{value}} + +{% endfor %} + + + {{username}} + + + urn:oasis:names:tc:SAML:1.0:cm:artifact + + + + + + + + diff --git a/templates/cas_server/samlValidateError.xml b/templates/cas_server/samlValidateError.xml new file mode 100644 index 00000000..b1b4226f --- /dev/null +++ b/templates/cas_server/samlValidateError.xml @@ -0,0 +1,14 @@ + + + + + + {{msg}} + + + + diff --git a/templates/cas_server/serviceValidate.xml b/templates/cas_server/serviceValidate.xml new file mode 100644 index 00000000..f583dbea --- /dev/null +++ b/templates/cas_server/serviceValidate.xml @@ -0,0 +1,19 @@ + + + {{username}} + + {{auth_date}} + false{# we do not support long-term (Remember-Me) auth #} + {{is_new_login}} +{% for key, value in attributes %} {{value}} +{% endfor %} + + + +{% for key, value in attributes %} +{% endfor %}{% if proxyGrantingTicket %} {{proxyGrantingTicket}} +{% endif %}{% if proxies %} +{% for proxy in proxies %} {{proxy}} +{% endfor %} +{% endif %} + diff --git a/templates/cas_server/serviceValidateError.xml b/templates/cas_server/serviceValidateError.xml new file mode 100644 index 00000000..cab8d9bd --- /dev/null +++ b/templates/cas_server/serviceValidateError.xml @@ -0,0 +1,3 @@ + + {{msg}} + diff --git a/templates/cas_server/warn.html b/templates/cas_server/warn.html new file mode 100644 index 00000000..4f80b15a --- /dev/null +++ b/templates/cas_server/warn.html @@ -0,0 +1,11 @@ +{% extends "cas_server/base.html" %} +{% load static %} +{% load i18n %} + +{% block content %} + +{% endblock %}