Skip to content

Commit

Permalink
Merge pull request #16 from systopia/add-field-type-job-title
Browse files Browse the repository at this point in the history
Add field type for `Contact:job_title`
  • Loading branch information
dontub authored Sep 18, 2024
2 parents 32b496f + e826213 commit d35f9f4
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -115,13 +115,15 @@ public function getFieldTypes(): iterable {
'target' => 'Contact:email',
'required' => TRUE,
'validation' => 'Email',
'maxLength' => 254,
]);

yield new EditorFieldType('phone', 'text', E::ts('Phone'), [
'label' => E::ts('Phone'),
'target' => 'Contact:phone',
'required' => TRUE,
'validation' => 'Text',
'maxLength' => 32,
]);

yield new OptionGroupType('prefix', E::ts('Prefix'),
Expand All @@ -146,6 +148,16 @@ public function getFieldTypes(): iterable {
'label' => E::ts('Title'),
'target' => 'Contact:formal_title',
'required' => FALSE,
'validation' => 'Text',
'maxLength' => 64,
]);

yield new EditorFieldType('job_title', 'text', E::ts('Job Title'), [
'label' => E::ts('Job Title'),
'target' => 'Contact:job_title',
'required' => FALSE,
'validation' => 'Text',
'maxLength' => 255,
]);
}

Expand Down

0 comments on commit d35f9f4

Please sign in to comment.