Add private comment options to activity type (visibility + label)

This commit is contained in:
2022-04-25 15:46:55 +02:00
parent 1f2638626c
commit b36fd57e4f
7 changed files with 82 additions and 9 deletions

View File

@@ -252,10 +252,12 @@ class ActivityType extends AbstractType
]);
}
$builder->add('privateComment', PrivateCommentType::class, [
'label' => 'activity.private comment',
'required' => false
]);
if($activityType->isVisible('privateComment')) {
$builder->add('privateComment', PrivateCommentType::class, [
'label' => empty($activityType->getLabel('privateComment')) ? 'activity.private comment' : $activityType->getPrivateCommentLabel(),
'required' => false
]);
}
if ($activityType->isVisible('persons')) {
$builder->add('persons', HiddenType::class);

View File

@@ -57,7 +57,7 @@ class ActivityTypeType extends AbstractType
$fields = [
'persons', 'user', 'date', 'location', 'persons',
'thirdParties', 'durationTime', 'travelTime', 'attendee',
'reasons', 'comment', 'sentReceived', 'documents',
'reasons', 'comment', 'privateComment', 'sentReceived', 'documents',
'emergency', 'socialIssues', 'socialActions', 'users',
];