Commit 65515b31 authored by Aaron Wells's avatar Aaron Wells

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

Bug1171365

Change-Id: I865dc0d69d6f5a29b4d8d8d4763d393011d2f7da
parent beff568b
......@@ -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