From eabce91540dacb467db5851b6fd206030561942e Mon Sep 17 00:00:00 2001
From: Marien Fressinaud
Date: Sun, 10 Mar 2024 18:03:15 +0100
Subject: [PATCH] new: Allow user to accept to be contacted
---
locales/fr_FR/LC_MESSAGES/main.mo | Bin 57032 -> 57628 bytes
locales/fr_FR/LC_MESSAGES/main.po | 153 ++++++++++--------
src/Application.php | 2 +
src/cli/Help.php | 1 +
src/cli/Users.php | 11 +-
src/controllers/Registrations.php | 12 +-
src/controllers/Showcases.php | 2 +
src/controllers/my/Preferences.php | 14 +-
...ion202403100001AddAcceptContactToUsers.php | 30 ++++
...00002SetAutoloadModalToShowcaseContact.php | 28 ++++
src/models/User.php | 3 +
src/schema.sql | 1 +
src/views/my/preferences/edit.phtml | 13 ++
src/views/registrations/new.phtml | 12 ++
src/views/showcases/show_contact.phtml | 31 ++++
15 files changed, 238 insertions(+), 75 deletions(-)
create mode 100644 src/migrations/Migration202403100001AddAcceptContactToUsers.php
create mode 100644 src/migrations/Migration202403100002SetAutoloadModalToShowcaseContact.php
create mode 100644 src/views/showcases/show_contact.phtml
diff --git a/locales/fr_FR/LC_MESSAGES/main.mo b/locales/fr_FR/LC_MESSAGES/main.mo
index d803680b67084702478859945eae90fb906fddf8..65b73bbe2c708097c4156bd00f23d17bbe66bf3c 100644
GIT binary patch
delta 12524
zcmaLd33yG{-pBDBLXcU4kl=)b#Fz*%i+P@^#u_6ILMBP5sXc0_rg7DH4K-^KjYSR4~D7~5kI4#ZNJ
zj%s)^R>dV)2KS)`a2CC2-};6`O$r`jCk%_TtQT-3(x$Z=JL5fUiVYZMdmM*Pbsy*8
z&IXqCDz;*ndhZa1!FsU18PS5qv{=ofjAPiR1;Cp
z<+@0y;uWYK?nG^tL#VaCgsSK#^u?#B4wr0YW~ww+Bp;3%aRRDieNYW1qn@9F8qiGC
z4CNxLVY%j!P=hB?4ctIg@DNp@XKT}u3aF06+qOVe)E-rF7u1M)q25nI&B)8B8JvSv
zaED!f0juf!-y_kN8-Z=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;{I&j8CM13bBg1i*@pOoLG
zyc&<=5`27Au;r(y_>kyKyh7d6=$@dklh{I{W28&SmY9nnM!TfTzZh);?CY@M!oUO#xg=eW+#zle9a
z;5>FDbhIbmPJBl+AuoeH2pyA%1Y$bTlDb!ke9CX(T%3k)6PqYMK5CH9v`Gibp6CBd
z;TrKACkok<#mS3Mu0}jdY$g6A8c=^2XA#|r_sO3;iZWttsHjJr)H(9@_JV&gin=4j
zA|kfn|KHzSF^9@vid|6u|Juov3*&R--l*e!!~cJtv!!tSk?Z`qZWQ(;S`laL`8Jf}
zIJbg)FHws8JJ0^H7ko~|RziQU1r+3$W0+f>zW-3D?U{jDljq&x$C
zi4CgYsBLh(tYR+LJ;JH>-rbZViQfnvuV`{|D11u{QVmB3BGTS)$5TURZ2kszCRS7b
z5Ah}C(st17rB3$a0;X_&BH_z5T~Wttn1W%{t<&b1NK%B#0``KY)QGb?5
zqpaf`<)YXZM-$D7?};Z5FPjg<0i1{-M%oJ!sLLht$Y0dr+)bk66sBVs;Zp8y>wnQn
zj?=^?Vi-}vo*RSjlItjF>lRxlV<9^_H8>wi`KISevngKZy!$LamQr~aKOkPW7yOQw
z$!`)m8sat_O88Lz85dD9CyVA!8FsK(P>m|db*m)TiK&)SFF7SK
tx%$FZ?t=m~@|)*|`sW|Y>lu{aaAi&3{3#n>h|ceJVuxRTt@Gan{SShjSY7}C
diff --git a/locales/fr_FR/LC_MESSAGES/main.po b/locales/fr_FR/LC_MESSAGES/main.po
index 71876f37..afcc8b6c 100644
--- a/locales/fr_FR/LC_MESSAGES/main.po
+++ b/locales/fr_FR/LC_MESSAGES/main.po
@@ -1,8 +1,8 @@
msgid ""
msgstr ""
"Project-Id-Version: flusio\n"
-"POT-Creation-Date: 2023-09-08 16:05+0200\n"
-"PO-Revision-Date: 2023-09-08 16:06+0200\n"
+"POT-Creation-Date: 2024-03-10 18:30+0100\n"
+"PO-Revision-Date: 2024-03-10 18:31+0100\n"
"Last-Translator: Marien Fressinaud \n"
"Language-Team: \n"
"Language: fr_FR\n"
@@ -10,15 +10,15 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
-"X-Generator: Poedit 3.3.2\n"
+"X-Generator: Poedit 3.4.2\n"
"X-Poedit-Basepath: ../../../src\n"
"X-Poedit-KeywordsList: _f;_n:1,2;_nf:1,2;Translatable\n"
"X-Poedit-SearchPath-0: .\n"
#: assets/javascripts/controllers/back_button_controller.js:47
-#: views/_layouts/connected.phtml:221
-#: views/_layouts/connected_blocked.phtml:180
-#: views/_layouts/not_connected.phtml:147
+#: views/_layouts/connected.phtml:225
+#: views/_layouts/connected_blocked.phtml:184
+#: views/_layouts/not_connected.phtml:151
msgid "Back"
msgstr "Retour"
@@ -51,7 +51,7 @@ msgstr "Afficher"
#: controllers/Links.php:270 controllers/Links.php:442
#: controllers/Mastodon.php:211 controllers/Mastodon.php:297
#: controllers/News.php:75 controllers/Passwords.php:89
-#: controllers/Passwords.php:192 controllers/Registrations.php:105
+#: controllers/Passwords.php:192 controllers/Registrations.php:103
#: controllers/Sessions.php:85 controllers/Support.php:70
#: controllers/collections/Filters.php:105
#: controllers/collections/Followers.php:49
@@ -61,7 +61,7 @@ msgstr "Afficher"
#: controllers/collections/Shares.php:98 controllers/collections/Shares.php:211
#: controllers/links/Messages.php:84 controllers/links/Repairing.php:99
#: controllers/links/Searches.php:106 controllers/my/Account.php:111
-#: controllers/my/Preferences.php:78 controllers/my/Profile.php:73
+#: controllers/my/Preferences.php:82 controllers/my/Profile.php:73
#: controllers/my/Security.php:93 controllers/my/Security.php:209
#: controllers/my/Subscription.php:74 controllers/my/Validation.php:138
msgid "A security verification failed: you should retry to submit the form."
@@ -77,7 +77,7 @@ msgstr "L’une des thématiques associées n’existe pas."
#: controllers/Groups.php:161 controllers/Importations.php:48
#: controllers/Links.php:499 controllers/Mastodon.php:87
#: controllers/Messages.php:93 controllers/Messages.php:141
-#: controllers/Sessions.php:208 controllers/collections/Read.php:73
+#: controllers/Sessions.php:206 controllers/collections/Read.php:73
#: controllers/collections/Read.php:139 controllers/collections/Read.php:200
#: controllers/importations/Opml.php:79 controllers/importations/Pocket.php:110
#: controllers/importations/Pocket.php:157
@@ -136,7 +136,7 @@ msgid "The token has expired, you should reset your password again."
msgstr ""
"Le token a expiré, vous devez de nouveau réinitialiser votre mot de passe."
-#: controllers/Registrations.php:118
+#: controllers/Registrations.php:116
msgid "You must accept the terms of service."
msgstr "Vous devez accepter les conditions générales d’utilisation."
@@ -307,7 +307,7 @@ msgid "Links never to read"
msgstr "Liens à ne jamais lire"
#: models/Collection.php:153 models/Collection.php:186
-#: views/_layouts/connected.phtml:82 views/news/index.phtml:3
+#: views/_layouts/connected.phtml:86 views/news/index.phtml:3
#: views/news/index.phtml:16
msgid "News"
msgstr "Journal"
@@ -530,128 +530,128 @@ msgstr "Commentaires sur %s"
msgid "Error: "
msgstr "Erreur : "
-#: views/_layouts/connected.phtml:43 views/_layouts/connected_blocked.phtml:39
-#: views/_layouts/not_connected.phtml:57 views/_layouts/onboarding.phtml:39
+#: views/_layouts/connected.phtml:47 views/_layouts/connected_blocked.phtml:43
+#: views/_layouts/not_connected.phtml:61 views/_layouts/onboarding.phtml:43
msgid "Skip to main content"
msgstr "Accéder au contenu principal"
-#: views/_layouts/connected.phtml:50 views/_layouts/connected_blocked.phtml:46
-#: views/_layouts/not_connected.phtml:64 views/_layouts/onboarding.phtml:46
+#: views/_layouts/connected.phtml:54 views/_layouts/connected_blocked.phtml:50
+#: views/_layouts/not_connected.phtml:68 views/_layouts/onboarding.phtml:50
#, php-format
msgid "You need to activate JavaScript in order to use %s."
msgstr "Vous devez activer JavaScript pour utiliser %s."
-#: views/_layouts/connected.phtml:58 views/_layouts/connected_blocked.phtml:54
-#: views/_layouts/not_connected.phtml:72
+#: views/_layouts/connected.phtml:62 views/_layouts/connected_blocked.phtml:58
+#: views/_layouts/not_connected.phtml:76
#, php-format
msgid "You’re using a demo version of %s, the data are reset every night."
msgstr ""
"Vous utilisez une version de démo de %s, les données sont réinitialisées "
"chaque nuit."
-#: views/_layouts/connected.phtml:66 views/_layouts/connected_blocked.phtml:62
+#: views/_layouts/connected.phtml:70 views/_layouts/connected_blocked.phtml:66
msgid "You must validate your account →"
msgstr "Vous devez valider votre compte →"
-#: views/_layouts/connected.phtml:93 views/links/index.phtml:3
+#: views/_layouts/connected.phtml:97 views/links/index.phtml:3
#: views/links/index.phtml:19
msgid "My links"
msgstr "Mes liens"
-#: views/_layouts/connected.phtml:104 views/feeds/index.phtml:3
+#: views/_layouts/connected.phtml:108 views/feeds/index.phtml:3
#: views/feeds/index.phtml:15
msgid "Feeds"
msgstr "Flux"
-#: views/_layouts/connected.phtml:117 views/collections/_selector.phtml:83
+#: views/_layouts/connected.phtml:121 views/collections/_selector.phtml:83
#: views/collections/groups/edit.phtml:88 views/links/searches/show.phtml:9
#: views/links/searches/show.phtml:21
msgid "New"
msgstr "Nouveau"
-#: views/_layouts/connected.phtml:126 views/_layouts/connected.phtml:129
-#: views/_layouts/connected_blocked.phtml:85
-#: views/_layouts/connected_blocked.phtml:88
+#: views/_layouts/connected.phtml:130 views/_layouts/connected.phtml:133
+#: views/_layouts/connected_blocked.phtml:89
+#: views/_layouts/connected_blocked.phtml:92
#, php-format
msgid "Menu of %s"
msgstr "Menu de %s"
-#: views/_layouts/connected.phtml:147
-#: views/_layouts/connected_blocked.phtml:106 views/my/profile/edit.phtml:3
+#: views/_layouts/connected.phtml:151
+#: views/_layouts/connected_blocked.phtml:110 views/my/profile/edit.phtml:3
#: views/my/profile/edit.phtml:14
msgid "Profile"
msgstr "Profil"
-#: views/_layouts/connected.phtml:157
-#: views/_layouts/connected_blocked.phtml:116 views/my/preferences/edit.phtml:3
+#: views/_layouts/connected.phtml:161
+#: views/_layouts/connected_blocked.phtml:120 views/my/preferences/edit.phtml:3
#: views/my/preferences/edit.phtml:12
msgid "Preferences"
msgstr "Préférences"
-#: views/_layouts/connected.phtml:167
-#: views/_layouts/connected_blocked.phtml:126 views/my/account/show.phtml:3
+#: views/_layouts/connected.phtml:171
+#: views/_layouts/connected_blocked.phtml:130 views/my/account/show.phtml:3
#: views/my/account/show.phtml:11
msgid "Account & data"
msgstr "Compte & données"
-#: views/_layouts/connected.phtml:179
-#: views/_layouts/connected_blocked.phtml:138 views/pages/addons.phtml:3
+#: views/_layouts/connected.phtml:183
+#: views/_layouts/connected_blocked.phtml:142 views/pages/addons.phtml:3
#: views/pages/addons.phtml:11
msgid "Add-ons"
msgstr "Extensions"
-#: views/_layouts/connected.phtml:189
-#: views/_layouts/connected_blocked.phtml:148 views/support/show.phtml:3
+#: views/_layouts/connected.phtml:193
+#: views/_layouts/connected_blocked.phtml:152 views/support/show.phtml:3
#: views/support/show.phtml:12
msgid "Help & support"
msgstr "Aide & support"
-#: views/_layouts/connected.phtml:198
-#: views/_layouts/connected_blocked.phtml:157
+#: views/_layouts/connected.phtml:202
+#: views/_layouts/connected_blocked.phtml:161
msgid "Log out"
msgstr "Se déconnecter"
-#: views/_layouts/connected.phtml:232 views/_layouts/connected.phtml:233
+#: views/_layouts/connected.phtml:236 views/_layouts/connected.phtml:237
msgid "Search links by words or URL"
msgstr "Rechercher des liens par mots ou URL"
-#: views/_layouts/connected.phtml:241 views/links/searches/show.phtml:47
+#: views/_layouts/connected.phtml:245 views/links/searches/show.phtml:47
#: views/links/searches/show.phtml:63
msgid "Search"
msgstr "Rechercher"
-#: views/_layouts/error.phtml:18
+#: views/_layouts/error.phtml:22
msgid "Oh no 😟"
msgstr "Oh non 😟"
-#: views/_layouts/not_connected.phtml:92 views/registrations/new.phtml:160
+#: views/_layouts/not_connected.phtml:96 views/registrations/new.phtml:172
msgid "Sign up"
msgstr "S’inscrire"
-#: views/_layouts/not_connected.phtml:96 views/sessions/new.phtml:97
+#: views/_layouts/not_connected.phtml:100 views/sessions/new.phtml:97
msgid "Login"
msgstr "Se connecter"
-#: views/_layouts/not_connected.phtml:110 views/onboarding/step1.phtml:26
+#: views/_layouts/not_connected.phtml:114 views/onboarding/step1.phtml:26
msgid "Choose your language"
msgstr "Choisissez votre langue"
-#: views/_layouts/not_connected.phtml:160 views/pages/about.phtml:3
+#: views/_layouts/not_connected.phtml:164 views/pages/about.phtml:3
#: views/pages/about.phtml:11 views/support/show.phtml:115
#, php-format
msgid "About %s"
msgstr "À propos de %s"
-#: views/_layouts/onboarding.phtml:65
+#: views/_layouts/onboarding.phtml:69
#, php-format
msgid "Step %d on %d"
msgstr "Étape %d sur %d"
-#: views/_layouts/onboarding.phtml:67
+#: views/_layouts/onboarding.phtml:71
msgid "skip"
msgstr "passer"
-#: views/_layouts/onboarding.phtml:69
+#: views/_layouts/onboarding.phtml:73
msgid "finished"
msgstr "terminé"
@@ -691,7 +691,7 @@ msgstr "Page suivante"
#: views/my/security/show.phtml:41 views/my/security/show.phtml:81
#: views/passwords/edit.phtml:58 views/passwords/forgot.phtml:48
#: views/registrations/new.phtml:51 views/registrations/new.phtml:76
-#: views/registrations/new.phtml:122 views/registrations/new.phtml:134
+#: views/registrations/new.phtml:122 views/registrations/new.phtml:146
#: views/sessions/new.phtml:49 views/sessions/new.phtml:88
#: views/support/show.phtml:51 views/support/show.phtml:75
msgid "Error"
@@ -844,7 +844,7 @@ msgstr "Afficher la collection publiquement"
#: views/collections/edit.phtml:132 views/collections/filters/edit.phtml:90
#: views/collections/groups/edit.phtml:105 views/groups/edit.phtml:53
#: views/links/edit.phtml:82 views/mastodon/show.phtml:86
-#: views/messages/edit.phtml:53 views/my/preferences/edit.phtml:86
+#: views/messages/edit.phtml:53 views/my/preferences/edit.phtml:99
#: views/my/profile/edit.phtml:101 views/my/security/show.phtml:94
msgid "Save changes"
msgstr "Enregistrer les modifications"
@@ -1966,11 +1966,17 @@ msgstr ""
"En mode compact, vous voyez plus de liens en un coup d’œil, mais vous "
"pourriez vous sentir submergé par la quantité d’informations."
-#: views/my/preferences/edit.phtml:76
+#: views/my/preferences/edit.phtml:75 views/registrations/new.phtml:137
+msgid "Accept to be contacted by email to help improve the service (optional)."
+msgstr ""
+"Accepter d’être contacté‧e par courriel pour aider à améliorer le service "
+"(facultatif)."
+
+#: views/my/preferences/edit.phtml:89
msgid "Enable beta features"
msgstr "Activer les fonctionnalités bêta"
-#: views/my/preferences/edit.phtml:80
+#: views/my/preferences/edit.phtml:93
msgid ""
"With beta features you test some features before everyone else, but you "
"enter a turbulent zone."
@@ -2624,7 +2630,7 @@ msgstr ""
msgid "And a password"
msgstr "Et un mot de passe"
-#: views/registrations/new.phtml:140
+#: views/registrations/new.phtml:152
#, php-format
msgid ""
"Before going any further, please read the "
@@ -2634,11 +2640,11 @@ msgstr ""
"target=\"_blank\">les conditions générales d’utilisation pour vous "
"assurer que celles-ci vous conviennent."
-#: views/registrations/new.phtml:153
+#: views/registrations/new.phtml:165
msgid "Accept the terms of service"
msgstr "Accepter les conditions générales d’utilisation"
-#: views/registrations/new.phtml:167
+#: views/registrations/new.phtml:179
msgid "Already an account?"
msgstr "Déjà un compte ?"
@@ -2662,15 +2668,34 @@ msgstr "Mot de passe oublié ?"
msgid "No account yet?"
msgstr "Pas encore de compte ?"
-#: views/showcases/show_link.phtml:3 views/showcases/show_link.phtml:10
+#: views/showcases/show_contact.phtml:3 views/showcases/show_contact.phtml:11
+msgid "You can help to improve the service"
+msgstr "Vous pouvez aider à améliorer le service"
+
+#: views/showcases/show_contact.phtml:15
+#, php-format
+msgid "To help us improve %s, you can now accept to be contacted by email."
+msgstr ""
+"Afin de nous aider à améliorer %s, vous pouvez désormais accepter d’être "
+"contacté par courriel."
+
+#: views/showcases/show_contact.phtml:20
+msgid "Go to your preferences"
+msgstr "Rendez-vous dans vos préférences"
+
+#: views/showcases/show_contact.phtml:27
+msgid "No thanks!"
+msgstr "Non merci !"
+
+#: views/showcases/show_link.phtml:3 views/showcases/show_link.phtml:11
msgid "Links have been improved"
msgstr "Les liens ont été améliorés"
-#: views/showcases/show_link.phtml:14 views/showcases/show_navigation.phtml:14
+#: views/showcases/show_link.phtml:15 views/showcases/show_navigation.phtml:15
msgid "Something has changed!"
msgstr "Quelque chose a changé !"
-#: views/showcases/show_link.phtml:18
+#: views/showcases/show_link.phtml:19
msgid ""
"The link interface is now more consistent and practical. "
"You can mark a link as read, or add it to your bookmarks in one click. The "
@@ -2682,7 +2707,7 @@ msgstr ""
"un clic. Le lien « lire » a été enlevé, mais ne vous inquiétez pas : vous "
"pouvez toujours cliquer sur les titres pour lire vos liens !"
-#: views/showcases/show_link.phtml:23
+#: views/showcases/show_link.phtml:24
msgid ""
"The screenshot of a link card. The actions at its bottom allow to mark as "
"read, add to bookmarks and store the link."
@@ -2690,12 +2715,12 @@ msgstr ""
"La capture d’écran d’un lien. Les actions en-dessous du lien permettent de "
"le marquer comme lu, de l’ajouter aux signets et de le ranger."
-#: views/showcases/show_link.phtml:28
+#: views/showcases/show_link.phtml:29
msgid "The look of the links on mobile has also been improved to save space."
msgstr ""
"Les liens ont également été améliorés sur mobile pour gagner de la place."
-#: views/showcases/show_link.phtml:32 views/showcases/show_navigation.phtml:32
+#: views/showcases/show_link.phtml:33 views/showcases/show_navigation.phtml:33
msgid ""
"Don’t hesitate to give feedback from the “Help & support” "
"menu!"
@@ -2703,16 +2728,16 @@ msgstr ""
"N’hésitez pas à faire des retours depuis le menu « Aide & "
"support » !"
-#: views/showcases/show_link.phtml:38 views/showcases/show_navigation.phtml:38
+#: views/showcases/show_link.phtml:39 views/showcases/show_navigation.phtml:39
msgid "Got it!"
msgstr "C’est noté !"
#: views/showcases/show_navigation.phtml:3
-#: views/showcases/show_navigation.phtml:10
+#: views/showcases/show_navigation.phtml:11
msgid "A new navigation is available"
msgstr "Une nouvelle navigation est disponible"
-#: views/showcases/show_navigation.phtml:18
+#: views/showcases/show_navigation.phtml:19
msgid ""
"The navigation has been revised to make it more intuitive. "
"The things you own are now separated from the things you follow."
@@ -2721,12 +2746,12 @@ msgstr ""
"Les choses que vous possédez sont désormais séparées des choses que vous "
"suivez."
-#: views/showcases/show_navigation.phtml:23
+#: views/showcases/show_navigation.phtml:24
msgid "The navigation bar showing three tabs: News, My links and Feeds"
msgstr ""
"La barre de navigation qui montre trois onglets : Journal, Mes liens et Flux"
-#: views/showcases/show_navigation.phtml:28
+#: views/showcases/show_navigation.phtml:29
msgid ""
"Your bookmarks, read links and your own collections are now under the “My "
"links” tab. Followed collections and feeds are only one concept and can be "
diff --git a/src/Application.php b/src/Application.php
index 852ccb07..1718194c 100644
--- a/src/Application.php
+++ b/src/Application.php
@@ -132,6 +132,8 @@ public function run(\Minz\Request $request): mixed
$autoload_modal_url = \Minz\Url::for('showcase', ['id' => 'navigation']);
} elseif ($current_user->autoload_modal === 'showcase link') {
$autoload_modal_url = \Minz\Url::for('showcase', ['id' => 'link']);
+ } elseif ($current_user->autoload_modal === 'showcase contact') {
+ $autoload_modal_url = \Minz\Url::for('showcase', ['id' => 'contact']);
}
// Force CSRF token to avoid weird issues when user did nothing for a while
diff --git a/src/cli/Help.php b/src/cli/Help.php
index 81a1ff2f..f1da9aa5 100644
--- a/src/cli/Help.php
+++ b/src/cli/Help.php
@@ -92,6 +92,7 @@ public function show(): Response
$usage .= " --url=TEXT where TEXT is an external URL\n";
$usage .= "\n";
$usage .= " users List all the users\n";
+ $usage .= " [--to-contact=BOOL] list only the users who accepted to be contacted (default: false)\n";
$usage .= " users create Create a user\n";
$usage .= " --email=EMAIL\n";
$usage .= " --password=PASSWORD\n";
diff --git a/src/cli/Users.php b/src/cli/Users.php
index 0ef7b706..5ee96f80 100644
--- a/src/cli/Users.php
+++ b/src/cli/Users.php
@@ -19,11 +19,20 @@ class Users
/**
* List all the users ordered by created_at.
*
+ * @request_param bool to-contact
+ *
* @response 200
*/
public function index(Request $request): Response
{
- $users = models\User::listAll();
+ $to_contact = $request->paramBoolean('to-contact');
+
+ if ($to_contact) {
+ $users = models\User::listBy(['accept_contact' => true]);
+ } else {
+ $users = models\User::listAll();
+ }
+
usort($users, function ($user1, $user2) {
if ($user1->created_at == $user2->created_at) {
return 0;
diff --git a/src/controllers/Registrations.php b/src/controllers/Registrations.php
index 365ecd6f..4af0cf70 100644
--- a/src/controllers/Registrations.php
+++ b/src/controllers/Registrations.php
@@ -59,7 +59,8 @@ public function new(): Response
* @request_param string email
* @request_param string username
* @request_param string password
- * @request_param string accept_terms
+ * @request_param bool accept_terms
+ * @request_param bool accept_contact
*
* @response 302 / if already connected
* @response 302 /login if registrations are closed
@@ -68,10 +69,6 @@ public function new(): Response
* @response 400 if the service has terms of service and accept_terms is false
* @response 400 if email already exists
* @response 302 /onboarding
- *
- * @param \Minz\Request $request
- *
- * @return \Minz\Response
*/
public function create(Request $request): Response
{
@@ -91,7 +88,8 @@ public function create(Request $request): Response
$username = $request->param('username', '');
$email = $request->param('email', '');
$password = $request->param('password', '');
- $accept_terms = $request->param('accept_terms', false);
+ $accept_terms = $request->paramBoolean('accept_terms');
+ $accept_contact = $request->paramBoolean('accept_contact');
$csrf = $request->param('csrf', '');
if (!\Minz\Csrf::validate($csrf)) {
@@ -134,6 +132,8 @@ public function create(Request $request): Response
]);
}
+ $user->accept_contact = $accept_contact;
+
// Initialize the validation token
$validation_token = new models\Token(1, 'day', 16);
$validation_token->save();
diff --git a/src/controllers/Showcases.php b/src/controllers/Showcases.php
index 4000973a..afabebfb 100644
--- a/src/controllers/Showcases.php
+++ b/src/controllers/Showcases.php
@@ -29,6 +29,8 @@ public function show(Request $request): Response
return Response::ok('showcases/show_navigation.phtml');
} elseif ($id === 'link') {
return Response::ok('showcases/show_link.phtml');
+ } elseif ($id === 'contact') {
+ return Response::ok('showcases/show_contact.phtml');
} else {
return Response::notFound('not_found.phtml');
}
diff --git a/src/controllers/my/Preferences.php b/src/controllers/my/Preferences.php
index 634deffb..cd2e8e55 100644
--- a/src/controllers/my/Preferences.php
+++ b/src/controllers/my/Preferences.php
@@ -34,6 +34,7 @@ public function edit(Request $request): Response
return Response::ok('my/preferences/edit.phtml', [
'locale' => $user->locale,
'option_compact_mode' => $user->option_compact_mode,
+ 'accept_contact' => $user->accept_contact,
// Don't name it "beta_enabled" because there's already a global
// view variable named like this.
'is_beta_enabled' => models\FeatureFlag::isEnabled('beta', $user->id),
@@ -45,8 +46,9 @@ public function edit(Request $request): Response
*
* @request_param string csrf
* @request_param string locale
- * @request_param boolean option_compact_mode
- * @request_param boolean beta_enabled
+ * @request_param bool option_compact_mode
+ * @request_param bool accept_contact
+ * @request_param bool beta_enabled
* @request_param string from
*
* @response 302 /login?redirect_to=:from
@@ -59,8 +61,9 @@ public function edit(Request $request): Response
public function update(Request $request): Response
{
$locale = $request->param('locale', '');
- $option_compact_mode = $request->paramBoolean('option_compact_mode', false);
- $beta_enabled = $request->paramBoolean('beta_enabled', false);
+ $option_compact_mode = $request->paramBoolean('option_compact_mode');
+ $accept_contact = $request->paramBoolean('accept_contact');
+ $beta_enabled = $request->paramBoolean('beta_enabled');
$csrf = $request->param('csrf', '');
$from = $request->param('from', '');
@@ -73,6 +76,7 @@ public function update(Request $request): Response
return Response::badRequest('my/preferences/edit.phtml', [
'locale' => $locale,
'option_compact_mode' => $option_compact_mode,
+ 'accept_contact' => $accept_contact,
'is_beta_enabled' => $beta_enabled,
'from' => $from,
'error' => _('A security verification failed: you should retry to submit the form.'),
@@ -82,6 +86,7 @@ public function update(Request $request): Response
$old_locale = $user->locale;
$user->locale = trim($locale);
$user->option_compact_mode = $option_compact_mode;
+ $user->accept_contact = $accept_contact;
$errors = $user->validate();
if ($errors) {
@@ -89,6 +94,7 @@ public function update(Request $request): Response
return Response::badRequest('my/preferences/edit.phtml', [
'locale' => $locale,
'option_compact_mode' => $option_compact_mode,
+ 'accept_contact' => $accept_contact,
'is_beta_enabled' => $beta_enabled,
'from' => $from,
'errors' => $errors,
diff --git a/src/migrations/Migration202403100001AddAcceptContactToUsers.php b/src/migrations/Migration202403100001AddAcceptContactToUsers.php
new file mode 100644
index 00000000..3a00f097
--- /dev/null
+++ b/src/migrations/Migration202403100001AddAcceptContactToUsers.php
@@ -0,0 +1,30 @@
+exec(<<<'SQL'
+ ALTER TABLE users
+ ADD COLUMN accept_contact BOOLEAN NOT NULL DEFAULT false;
+ SQL);
+
+ return true;
+ }
+
+ public function rollback(): bool
+ {
+ $database = \Minz\Database::get();
+
+ $database->exec(<<<'SQL'
+ ALTER TABLE users
+ DROP COLUMN accept_contact;
+ SQL);
+
+ return true;
+ }
+}
diff --git a/src/migrations/Migration202403100002SetAutoloadModalToShowcaseContact.php b/src/migrations/Migration202403100002SetAutoloadModalToShowcaseContact.php
new file mode 100644
index 00000000..8b35a061
--- /dev/null
+++ b/src/migrations/Migration202403100002SetAutoloadModalToShowcaseContact.php
@@ -0,0 +1,28 @@
+exec(<<<'SQL'
+ UPDATE users SET autoload_modal = 'showcase contact';
+ SQL);
+
+ return true;
+ }
+
+ public function rollback(): bool
+ {
+ $database = \Minz\Database::get();
+
+ $database->exec(<<<'SQL'
+ UPDATE users SET autoload_modal = '';
+ SQL);
+
+ return true;
+ }
+}
diff --git a/src/models/User.php b/src/models/User.php
index 30d52305..475c18f4 100644
--- a/src/models/User.php
+++ b/src/models/User.php
@@ -91,6 +91,9 @@ class User
#[Database\Column]
public bool $option_compact_mode;
+ #[Database\Column]
+ public bool $accept_contact;
+
public function __construct(string $username, string $email, string $password)
{
$this->id = \Minz\Random::timebased();
diff --git a/src/schema.sql b/src/schema.sql
index 3294a957..6eb9879f 100644
--- a/src/schema.sql
+++ b/src/schema.sql
@@ -38,6 +38,7 @@ CREATE TABLE users (
csrf TEXT NOT NULL DEFAULT '',
autoload_modal TEXT NOT NULL DEFAULT '',
option_compact_mode BOOLEAN NOT NULL DEFAULT false,
+ accept_contact BOOLEAN NOT NULL DEFAULT false,
validated_at TIMESTAMPTZ,
validation_token TEXT REFERENCES tokens ON DELETE SET NULL ON UPDATE CASCADE,
diff --git a/src/views/my/preferences/edit.phtml b/src/views/my/preferences/edit.phtml
index 98a8652f..f827fe9e 100644
--- a/src/views/my/preferences/edit.phtml
+++ b/src/views/my/preferences/edit.phtml
@@ -63,6 +63,19 @@
+
+
+ />
+
+
+
+
+
+
+
+
+
+