support custom fields in timesheet batch update (#2043)

This commit is contained in:
Kevin Papst
2020-10-21 17:10:11 +02:00
committed by GitHub
parent 167a826f50
commit 6ed7ee76e7
25 changed files with 392 additions and 105 deletions

View File

@@ -146,12 +146,23 @@ abstract class AbstractToolbarForm extends AbstractType
]);
}
protected function addDateRangeChoice(FormBuilderInterface $builder, $allowEmpty = true, $required = false)
protected function addDateRange(FormBuilderInterface $builder, array $options, $allowEmpty = true, $required = false)
{
$builder->add('daterange', DateRangeType::class, [
$params = [
'required' => $required,
'allow_empty' => $allowEmpty,
]);
];
if (\array_key_exists('timezone', $options)) {
$params['timezone'] = $options['timezone'];
}
$builder->add('daterange', DateRangeType::class, $params);
}
protected function addDateRangeChoice(FormBuilderInterface $builder, $allowEmpty = true, $required = false)
{
$this->addDateRange($builder, [], $allowEmpty, $required);
}
protected function addProjectChoice(FormBuilderInterface $builder, array $options = [], bool $multiCustomer = false, bool $multiActivity = false)