diff --git a/core/lib/Thelia/Controller/Admin/ModuleController.php b/core/lib/Thelia/Controller/Admin/ModuleController.php index ec7ff472f..4a22c868a 100644 --- a/core/lib/Thelia/Controller/Admin/ModuleController.php +++ b/core/lib/Thelia/Controller/Admin/ModuleController.php @@ -70,9 +70,13 @@ class ModuleController extends BaseAdminController if($this->getRequest()->isXmlHttpRequest()) { if($message) { - $response = $this->nullResponse($message, 500); + $response = $this->jsonResponse(json_encode(array( + "error" => $message + )), 500); + } else { + $response = $this->nullResponse(); } - $response = $this->nullResponse(); + } else { $this->redirectToRoute('admin.module'); } diff --git a/templates/admin/default/includes/module-block.html b/templates/admin/default/includes/module-block.html index 2b45f5bc3..dd499393f 100644 --- a/templates/admin/default/includes/module-block.html +++ b/templates/admin/default/includes/module-block.html @@ -22,14 +22,14 @@ {$TITLE} {$CHAPO} -
+
diff --git a/templates/admin/default/modules.html b/templates/admin/default/modules.html index 06d7420bd..57bb14bf1 100644 --- a/templates/admin/default/modules.html +++ b/templates/admin/default/modules.html @@ -55,6 +55,21 @@ form_content = {$smarty.capture.delete_module_dialog nofilter} } + + {/block} {block name="javascript-initialization"} @@ -62,4 +77,24 @@ {javascripts file='assets/js/bootstrap-switch/bootstrap-switch.js'} {/javascripts} + + {/block} \ No newline at end of file