allow to close editor

This commit is contained in:
2021-08-20 17:56:52 +02:00
parent fec8fa50ed
commit 742445e7b3
8 changed files with 154 additions and 6 deletions

View File

@@ -9,6 +9,7 @@ use Chill\PersonBundle\Entity\AccompanyingPeriod\AccompanyingPeriodWorkEvaluatio
use Chill\PersonBundle\Entity\SocialWork\Evaluation;
use GuzzleHttp\Exception\TransferException;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\HeaderUtils;
@@ -60,8 +61,11 @@ class DocGeneratorTemplateController extends AbstractController
*/
public function generateDocFromTemplateAction(
\ChampsLibres\AsyncUploaderBundle\TempUrl\TempUrlGeneratorInterface $tempUrlGenerator,
DocGeneratorTemplate $template, string $entityClassName, int $entityId): Response
{
DocGeneratorTemplate $template,
string $entityClassName,
int $entityId,
Request $request
): Response {
$getUrlGen = $tempUrlGenerator->generate(
'GET',
$template->getFile());
@@ -134,7 +138,8 @@ class DocGeneratorTemplateController extends AbstractController
$em->flush();
return $this->redirectToRoute('chill_wopi_file_edit', [
'fileId' => $genDocName
'fileId' => $genDocName,
'returnPath' => $request->query->get('returnPath', "/")
]);
}
} catch (TransferException $e) {