Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added: Validation for the social name in the admin genders controller and changed the neutral gender to the other. #1068

Merged
merged 7 commits into from
Jul 2, 2024
2 changes: 1 addition & 1 deletion classes/Gender.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class GenderCore extends ObjectModel
'type' => array('type' => self::TYPE_INT, 'required' => true),

/* Lang fields */
'name' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isString', 'required' => true, 'size' => 20),
'name' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isCatalogName', 'required' => true, 'size' => 20),
),
);

Expand Down
4 changes: 2 additions & 2 deletions controllers/admin/AdminGendersController.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public function __construct()
'list' => array(
0 => $this->l('Male'),
1 => $this->l('Female'),
2 => $this->l('Neutral')
2 => $this->l('Other')
),
'filter_key' => 'a!type',
'callback' => 'displayGenderType',
Expand Down Expand Up @@ -145,7 +145,7 @@ public function renderForm()
array(
'id' => 'type_neutral',
'value' => 2,
'label' => $this->l('Neutral')
'label' => $this->l('Other')
)
)
),
Expand Down