diff --git a/core/lib/Thelia/Controller/Admin/FileController.php b/core/lib/Thelia/Controller/Admin/FileController.php index d7b46c5be..d5af5b3c5 100644 --- a/core/lib/Thelia/Controller/Admin/FileController.php +++ b/core/lib/Thelia/Controller/Admin/FileController.php @@ -860,7 +860,7 @@ class FileController extends BaseAdminController protected function createDocumentEventInstance($parentType, $model, $data) { $documentCreateEvent = new DocumentCreateOrUpdateEvent($parentType, null); - + $model->setLocale($data['locale']); if (isset($data['title'])) { $model->setTitle($data['title']); } diff --git a/core/lib/Thelia/Form/Image/DocumentModification.php b/core/lib/Thelia/Form/Image/DocumentModification.php index 267f3068d..49f1a53fb 100644 --- a/core/lib/Thelia/Form/Image/DocumentModification.php +++ b/core/lib/Thelia/Form/Image/DocumentModification.php @@ -122,6 +122,13 @@ abstract class DocumentModification extends BaseForm ) ) ) + + ->add("locale", "text", array( + "constraints" => array( + new NotBlank() + ), + "label_attr" => array("for" => "locale_create") + )) ; } } diff --git a/templates/backOffice/default/document-edit.html b/templates/backOffice/default/document-edit.html index 5c3f44989..68d4bb85d 100644 --- a/templates/backOffice/default/document-edit.html +++ b/templates/backOffice/default/document-edit.html @@ -30,12 +30,13 @@ {form name="$formId"}
{/form}