Skip to content

Commit

Permalink
Fix People fields.inc (CFM-373)
Browse files Browse the repository at this point in the history
  • Loading branch information
Benn Oshrin committed Jan 11, 2024
1 parent ea0d739 commit d117f5a
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions app/templates/People/fields.inc
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,19 @@ if($vv_action == 'add') {

foreach(['honorific', 'given', 'middle', 'family', 'suffix'] as $f) {
if(in_array($f, $vv_permitted_name_fields)) {
print $this->Field->control('names.0.'.$f, ['required' => in_array($f, $vv_required_name_fields)]);
print $this->Field->control(
fieldName: 'names.0.'.$f,
options: ['required' => in_array($f, $vv_required_name_fields)],
controlType: 'string'
);
}
}

print $this->Field->control('names.0.type_id', ['empty' => false, 'default' => $vv_default_name_type]);
print $this->Field->control(
fieldName: 'names.0.type_id',
options: ['empty' => false, 'default' => $vv_default_name_type],
controlType: 'string'
);

// AR-Name-1 Since this is the first name for this Person, it must be
// designated primary
Expand Down

0 comments on commit d117f5a

Please sign in to comment.