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"}
-
-
- {intl l='Back'} - -
-
+ {include + file = "includes/inner-form-toolbar.html" + hide_submit_buttons = false + + page_url = "{url path="/admin/document/type/{$documentType}/{$ID}/update"}" + close_url = "{url path="{$redirectUrl}"}" + } {form_hidden_fields form=$form} @@ -43,6 +44,10 @@ {/form_field} + {form_field form=$form field='locale'} + + {/form_field} + {if $form_error}
{$form_error_message}
{/if}

{intl l="Document informations"}

@@ -97,12 +102,14 @@ -
-
- {intl l='Back'} - -
-
+ {include + file = "includes/inner-form-toolbar.html" + hide_submit_buttons = false + hide_flags = true + + page_url = "{url path="/admin/document/type/{$documentType}/{$ID}/update"}" + close_url = "{url path="{$redirectUrl}"}" + }
{/form}