From 82bb879097fe3a3d2b2986308fc069d68a4e07ae Mon Sep 17 00:00:00 2001 From: Belle Aerni Date: Sun, 29 Jan 2023 23:10:55 -0800 Subject: [PATCH] Add more inclusive gender options (#753) And allow it to be updated from within the client's profile. This doesn't appear to be used anywhere in our default modules, but it's at least nice to give more inclusive options and allow it to be update by the client, for if it is ever used by a module. --- src/modules/Client/Api/Admin.php | 4 ++-- src/modules/Client/Api/Client.php | 2 +- src/modules/Client/Api/Guest.php | 2 +- .../Client/html_client/mod_client_profile.html.twig | 13 +++++++++++++ .../html_client/mod_orderbutton_client.html.twig | 2 ++ .../Page/html_client/mod_page_signup.html.twig | 2 ++ src/modules/Profile/Api/Client.php | 2 +- 7 files changed, 22 insertions(+), 5 deletions(-) diff --git a/src/modules/Client/Api/Admin.php b/src/modules/Client/Api/Admin.php index e864eb65b..10404b770 100644 --- a/src/modules/Client/Api/Admin.php +++ b/src/modules/Client/Api/Admin.php @@ -121,7 +121,7 @@ class Admin extends \Api_Abstract * @optional string $created_at - ISO 8601 date for client creation date * @optional string $last_name - last name * @optional string $aid - Alternative id. Usually used by import tools. - * @optional string $gender - Gender - values: male|female + * @optional string $gender - Gender - values: male|female|nonbinary|other * @optional string $country - Country * @optional string $city - city * @optional string $birthday - Birthday @@ -215,7 +215,7 @@ class Admin extends \Api_Abstract * @optional string $status - client status * @optional string $last_name - last name * @optional string $aid - Alternative id. Usually used by import tools. - * @optional string $gender - Gender - values: male|female + * @optional string $gender - Gender - values: male|female|nonbinary|other * @optional string $country - Country * @optional string $city - city * @optional string $birthday - Birthday diff --git a/src/modules/Client/Api/Client.php b/src/modules/Client/Api/Client.php index a38c028d4..98aa11729 100644 --- a/src/modules/Client/Api/Client.php +++ b/src/modules/Client/Api/Client.php @@ -38,7 +38,7 @@ class Client extends \Api_Abstract * @optional string $email - new client email. Must not exist on system * @optional string $last_name - last name * @optional string $aid - Alternative id. Usually used by import tools. - * @optional string $gender - Gender - values: male|female + * @optional string $gender - Gender - values: male|female|nonbinary|other * @optional string $country - Country * @optional string $city - city * @optional string $birthday - Birthday diff --git a/src/modules/Client/Api/Guest.php b/src/modules/Client/Api/Guest.php index 620e89c28..d1339e911 100644 --- a/src/modules/Client/Api/Guest.php +++ b/src/modules/Client/Api/Guest.php @@ -33,7 +33,7 @@ class Guest extends \Api_Abstract * @optional bool $auto_login - Auto login client after signup * @optional string $last_name - last name * @optional string $aid - Alternative id. Usually used by import tools. - * @optional string $gender - Gender - values: male|female + * @optional string $gender - Gender - values: male|female|nonbinary|other * @optional string $country - Country * @optional string $city - city * @optional string $birthday - Birthday diff --git a/src/modules/Client/html_client/mod_client_profile.html.twig b/src/modules/Client/html_client/mod_client_profile.html.twig index 7ad80df90..b1f3cb06a 100644 --- a/src/modules/Client/html_client/mod_client_profile.html.twig +++ b/src/modules/Client/html_client/mod_client_profile.html.twig @@ -72,6 +72,19 @@ +
+ +
+ +

+
+
+
diff --git a/src/modules/Orderbutton/html_client/mod_orderbutton_client.html.twig b/src/modules/Orderbutton/html_client/mod_orderbutton_client.html.twig index 126421755..107f1174b 100644 --- a/src/modules/Orderbutton/html_client/mod_orderbutton_client.html.twig +++ b/src/modules/Orderbutton/html_client/mod_orderbutton_client.html.twig @@ -98,6 +98,8 @@

diff --git a/src/modules/Page/html_client/mod_page_signup.html.twig b/src/modules/Page/html_client/mod_page_signup.html.twig index c832d7c9e..5f46f1cf2 100644 --- a/src/modules/Page/html_client/mod_page_signup.html.twig +++ b/src/modules/Page/html_client/mod_page_signup.html.twig @@ -82,6 +82,8 @@

diff --git a/src/modules/Profile/Api/Client.php b/src/modules/Profile/Api/Client.php index bd1ace356..87e2851e8 100644 --- a/src/modules/Profile/Api/Client.php +++ b/src/modules/Profile/Api/Client.php @@ -38,7 +38,7 @@ class Client extends \Api_Abstract * @optional string $email - new client email. Must not exist on system * @optional string $last_name - last name * @optional string $aid - Alternative id. Usually used by import tools. - * @optional string $gender - Gender - values: male|female + * @optional string $gender - Gender - values: male|female|nonbinary|other * @optional string $country - Country * @optional string $city - city * @optional string $birthday - Birthday