Commit b7e1c08d authored by Robert Lyon's avatar Robert Lyon Committed by Gerrit Code Review

Merge "Allow resume gender field to be set back to "unspecified""

parents f705b13a 65515b31
......@@ -101,6 +101,7 @@ $personalinformationform = pieform(array(
'defaultvalue' => ((!empty($personalinformation))
? $personalinformation->get_composite('gender') : null),
'options' => array(
'' => get_string('gendernotspecified', 'artefact.resume'),
'female' => get_string('female', 'artefact.resume'),
'male' => get_string('male', 'artefact.resume'),
),
......
......@@ -51,6 +51,7 @@ $string['visastatus'] = 'Visa status';
$string['female'] = 'Female';
$string['male'] = 'Male';
$string['gender'] = 'Gender';
$string['gendernotspecified'] = '(Not specified)';
$string['maritalstatus'] = 'Marital status';
$string['resumesaved'] = 'Résumé saved';
$string['resumesavefailed'] = 'Failed to update your résumé';
......
......@@ -355,6 +355,9 @@ class ArtefactTypePersonalinformation extends ArtefactTypeResume {
if ($field == 'dateofbirth' && !empty($value)) {
$value = db_format_timestamp($value);
}
if ($field == 'gender' && $value=='') {
$value = null;
}
$data->{$field} = $value;
}
if (!$have_composites) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment