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.
This commit is contained in:
Belle Aerni authored and GitHub committed 2023-01-30 08:10:55 +01:00
1 parent f170503e98
commit 82bb879097
7 files changed
+22 -5

No files matched your search

+2 -2
View File
@@ -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
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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
@@ -72,6 +72,19 @@
</div>
</div>
<div class="control-group">
<label class="control-label" for="input">{{ 'Gender'|trans }}</label>
<div class="controls">
<select name="gender" id="gender">
<option value="male" {{ profile.gender == 'male' ? 'selected' : '' }}>Male</option>
<option value="female" {{ profile.gender == 'female' ? 'selected' : '' }}>Female</option>
<option value="nonbinary" {{ profile.gender == 'nonbinary' ? 'selected' : '' }}>Non-binary</option>
<option value="other" {% if profile.gender not in ['male', 'female', 'nonbinary'] %} selected {% endif %}>Other</option>
</select>
<p class="help-block"></p>
</div>
</div>
<div class="control-group">
<label class="control-label" for="input">{{ 'Company Name'|trans }}</label>
<div class="controls">
@@ -98,6 +98,8 @@
<select name="gender" class="span6" id="gender">
<option value="male">Male</option>
<option value="female">Female</option>
<option value="nonbinary">Non-binary</option>
<option value="other">Other</option>
</select>
<p class="help-block"></p>
</div>
@@ -82,6 +82,8 @@
<select name="gender" id="gender">
<option value="male">Male</option>
<option value="female">Female</option>
<option value="nonbinary">Non-binary</option>
<option value="other">Other</option>
</select>
<p class="help-block"></p>
</div>
+1 -1
View File
@@ -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