From f9bf460018d0256af937f83ef28ba788c9393592 Mon Sep 17 00:00:00 2001 From: Kazhnuz Date: Thu, 9 Jan 2025 19:20:44 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20(users):=20Add=20support=20for=20pr?= =?UTF-8?q?onouns?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bl-kernel/admin/views/edit-user.php | 9 +++++++++ bl-kernel/user.class.php | 6 ++++++ bl-kernel/users.class.php | 1 + bl-languages/en.json | 1 + bl-languages/fr_FR.json | 1 + 5 files changed, 18 insertions(+) diff --git a/bl-kernel/admin/views/edit-user.php b/bl-kernel/admin/views/edit-user.php index a3c32982..1d4763cf 100644 --- a/bl-kernel/admin/views/edit-user.php +++ b/bl-kernel/admin/views/edit-user.php @@ -96,6 +96,15 @@ echo Bootstrap::formInputHidden(array( 'tip' => '' )); + echo Bootstrap::formInputText(array( + 'name' => 'pronouns', + 'label' => $L->g(string: 'Pronouns'), + 'value' => $user->pronouns(), + 'class' => '', + 'placeholder' => '', + 'tip' => '' + )); + echo Bootstrap::formTextarea(array( 'name' => 'description', 'label' => $L->g('Description'), diff --git a/bl-kernel/user.class.php b/bl-kernel/user.class.php index 66d834c4..2a0934fe 100644 --- a/bl-kernel/user.class.php +++ b/bl-kernel/user.class.php @@ -50,6 +50,11 @@ class User return $this->getValue('username'); } + public function pronouns() + { + return $this->getValue('pronouns'); + } + public function description() { return $this->getValue('description'); @@ -189,6 +194,7 @@ class User $tmp['mastodon'] = $this->mastodon(); $tmp['vk'] = $this->vk(); $tmp['profilePicture'] = $this->profilePicture(); + $tmp['pronouns'] = $this->pronouns(); if ($returnsArray) { return $tmp; diff --git a/bl-kernel/users.class.php b/bl-kernel/users.class.php index 1d9bd111..95e6af05 100644 --- a/bl-kernel/users.class.php +++ b/bl-kernel/users.class.php @@ -6,6 +6,7 @@ class Users extends dbJSON { 'firstName'=>'', 'lastName'=>'', 'nickname'=>'', + 'pronouns'=>'', 'description'=>'', 'role'=>'author', // admin, editor, author 'password'=>'', diff --git a/bl-languages/en.json b/bl-languages/en.json index 23174efb..29857828 100644 --- a/bl-languages/en.json +++ b/bl-languages/en.json @@ -132,6 +132,7 @@ "username": "Username", "first-name": "First name", "last-name": "Last name", + "pronouns": "Pronouns", "to-schedule-the-content-select-the-date-and-time": "To schedule the content select the date and time, the status has to be set to \"Published\".", "email": "Email", "role": "Role", diff --git a/bl-languages/fr_FR.json b/bl-languages/fr_FR.json index 53fb62ac..33b4f4ea 100644 --- a/bl-languages/fr_FR.json +++ b/bl-languages/fr_FR.json @@ -132,6 +132,7 @@ "username": "Nom d’utilisateur", "first-name": "Prénom", "last-name": "Nom", + "pronouns": "Pronoms", "to-schedule-the-content-select-the-date-and-time": "Pour planifier votre contenu, sélectionnez la date et l’heure, le statut doit être défini sur \"Publié\".", "email": "E-mail", "role": "Rôle",