Skip to content

Commit 3a46ac4

Browse files
author
Dave MacFarlane
committed
Translate Entity Type
1 parent 0f41bd2 commit 3a46ac4

3 files changed

Lines changed: 11 additions & 4 deletions

File tree

modules/candidate_list/jsx/candidateListIndex.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -265,10 +265,7 @@ class CandidateListIndex extends Component {
265265
filter: {
266266
name: 'entityType',
267267
type: 'select',
268-
options: {
269-
'Human': 'Human',
270-
'Scanner': 'Scanner',
271-
},
268+
options: options.entitytype,
272269
},
273270
},
274271
{

modules/candidate_list/php/candidatelistrowprovisioner.class.inc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,9 @@ class CandidateListRowProvisioner extends \LORIS\Data\Provisioners\DBRowProvisio
123123
}
124124
}
125125
$row['Sex'] = isset($row['Sex']) ? dgettext("sex", $row['Sex']) : '';
126+
127+
$row['EntityType'] = dgettext("candidate", $row['EntityType']);
128+
126129
unset($row['RegistrationCenterID']);
127130
unset($row['RegistrationProjectID']);
128131
return new CandidateListRow($row, $cid, $pid);

modules/candidate_list/php/options.class.inc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,12 @@ class Options extends \LORIS\Http\Endpoint
9191
// work.
9292
$sexes = \Utility::getSexList();
9393
$sexes = array_combine($sexes, $sexes);
94+
95+
$entityTypes = [
96+
dgettext("candidate", 'Human') => dgettext("candidate", 'Human'),
97+
dgettext("candidate", 'Scanner') => dgettext("candidate", 'Scanner'),
98+
];
99+
94100
return [
95101
'visitlabel' => $visit_label_options,
96102
'site' => $site_options,
@@ -99,6 +105,7 @@ class Options extends \LORIS\Http\Endpoint
99105
'participantstatus' => $participant_status_options,
100106
'useedc' => $config->getSetting("useEDC"),
101107
'Sex' => $sexes,
108+
'entitytype' => $entityTypes,
102109
];
103110
}
104111

0 commit comments

Comments
 (0)