From 32b3f2e608cc99e1a9770ce626b2a96a5e2ed59b Mon Sep 17 00:00:00 2001 From: Leny BERNARD Date: Wed, 30 Mar 2016 14:46:12 +0200 Subject: [PATCH] :bug: fix form class --- Bundle/MediaBundle/Helper/File/FileHandler.php | 2 +- .../Resources/views/Media/addfile-modal.html.twig | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Bundle/MediaBundle/Helper/File/FileHandler.php b/Bundle/MediaBundle/Helper/File/FileHandler.php index be17f1da8..dfd729359 100644 --- a/Bundle/MediaBundle/Helper/File/FileHandler.php +++ b/Bundle/MediaBundle/Helper/File/FileHandler.php @@ -64,7 +64,7 @@ public function getType() */ public function getFormType() { - return new FileType(); + return FileType::class; } /** diff --git a/Bundle/MediaBundle/Resources/views/Media/addfile-modal.html.twig b/Bundle/MediaBundle/Resources/views/Media/addfile-modal.html.twig index 48d1edf27..4d3cc17cb 100644 --- a/Bundle/MediaBundle/Resources/views/Media/addfile-modal.html.twig +++ b/Bundle/MediaBundle/Resources/views/Media/addfile-modal.html.twig @@ -2,17 +2,19 @@ {% form_theme fileform 'VictoireMediaBundle:Form:fields.html.twig' %} -
+ {{ form_start(fileform, {'method': 'POST', 'action': path('VictoireMediaBundle_media_modal_create', { 'folderId' : folder.id, 'type': 'file' }) }) }} - + -
+ {{ form_end(fileform) }}