moved consent field to opencase_defaults and removed automatic "see all people" menu links
This commit is contained in:
@ -91,6 +91,20 @@ function opencase_defaults_block_access(\Drupal\block\Entity\Block $block, $oper
|
||||
|
||||
function opencase_defaults_entity_base_field_info($entity_type) {
|
||||
$fields = array();
|
||||
|
||||
// Add consent field to person
|
||||
if ($entity_type->id() === 'oc_actor') {
|
||||
$fields['consent'] = BaseFieldDefinition::create('boolean')
|
||||
->setLabel(t('Consent to data storage'))
|
||||
->setDescription(t('Has this person explicitly consented to having their personal data stored on this system?'))
|
||||
->setRevisionable(TRUE)
|
||||
->setDefaultValue(FALSE)
|
||||
->setRequired(TRUE)
|
||||
->setDisplayOptions('form', array(
|
||||
'type' => 'boolean_checkbox',
|
||||
'weight' => -6,
|
||||
));
|
||||
}
|
||||
|
||||
// Add a Client field to cases
|
||||
if ($entity_type->id() === 'oc_case') {
|
||||
@ -117,7 +131,7 @@ function opencase_defaults_entity_base_field_info($entity_type) {
|
||||
])
|
||||
->setDefaultValueCallback('opencase_defaults_actors_involved_callback')
|
||||
->setRequired(TRUE);
|
||||
|
||||
}
|
||||
return $fields;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user