version 1.16.2 (#2942)

* bump version
* include calendar week in week chooser
* table names in SQL
* show save flash message
* prevent migration warning
* drop default value to prevent error when server version is not set
* csrf token for duplicate actions
* updated translations
This commit is contained in:
Kevin Papst
2021-11-18 12:33:13 +01:00
committed by GitHub
parent c858edf5c9
commit b28e9c120c
37 changed files with 289 additions and 152 deletions

View File

@@ -211,14 +211,14 @@ abstract class TimesheetAbstractController extends AbstractController
]);
}
protected function duplicate(Timesheet $timesheet, Request $request, string $renderTemplate): Response
protected function duplicate(Timesheet $timesheet, Request $request, string $renderTemplate, string $token): Response
{
$copyTimesheet = clone $timesheet;
$event = new TimesheetMetaDefinitionEvent($copyTimesheet);
$this->dispatcher->dispatch($event);
$form = $this->getDuplicateForm($copyTimesheet, $timesheet);
$form = $this->getDuplicateForm($copyTimesheet, $timesheet, $token);
$form->handleRequest($request);
if ($form->isSubmitted() && $form->isValid()) {
@@ -612,7 +612,7 @@ abstract class TimesheetAbstractController extends AbstractController
return $query;
}
abstract protected function getDuplicateForm(Timesheet $entry, Timesheet $original): FormInterface;
abstract protected function getDuplicateForm(Timesheet $entry, Timesheet $original, string $token): FormInterface;
abstract protected function getCreateForm(Timesheet $entry): FormInterface;
}