diff --git a/core/lib/Thelia/Config/Resources/routing/admin.xml b/core/lib/Thelia/Config/Resources/routing/admin.xml
index d61e2ce72..52495fd05 100755
--- a/core/lib/Thelia/Config/Resources/routing/admin.xml
+++ b/core/lib/Thelia/Config/Resources/routing/admin.xml
@@ -945,6 +945,10 @@
Thelia\Controller\Admin\LangController::addAction
+
+ Thelia\Controller\Admin\LangController::deleteAction
+
+
diff --git a/core/lib/Thelia/Controller/Admin/LangController.php b/core/lib/Thelia/Controller/Admin/LangController.php
index 71e95988f..66b2a87d3 100644
--- a/core/lib/Thelia/Controller/Admin/LangController.php
+++ b/core/lib/Thelia/Controller/Admin/LangController.php
@@ -189,4 +189,11 @@ class LangController extends BaseAdminController
return $this->render('languages');
}
+
+ public function deleteAction()
+ {
+ if (null !== $response = $this->checkAuth(AdminResources::LANGUAGE, AccessManager::DELETE)) return $response;
+
+
+ }
}
\ No newline at end of file
diff --git a/core/lib/Thelia/Core/Event/Lang/LangDeleteEvent.php b/core/lib/Thelia/Core/Event/Lang/LangDeleteEvent.php
new file mode 100644
index 000000000..e05775955
--- /dev/null
+++ b/core/lib/Thelia/Core/Event/Lang/LangDeleteEvent.php
@@ -0,0 +1,70 @@
+. */
+/* */
+/*************************************************************************************/
+
+namespace Thelia\Core\Event\Lang;
+
+
+/**
+ * Class LangDeleteEvent
+ * @package Thelia\Core\Event\Lang
+ * @author Manuel Raynaud
+ */
+class LangDeleteEvent extends LangEvent
+{
+ /**
+ * @var int
+ */
+ protected $lang_id;
+
+ /**
+ * @param int $lang_id
+ */
+ function __construct($lang_id)
+ {
+ $this->lang_id = $lang_id;
+ }
+
+ /**
+ * @param int $lang_id
+ *
+ * @return $this
+ */
+ public function setLangId($lang_id)
+ {
+ $this->lang_id = $lang_id;
+
+ return $this;
+ }
+
+ /**
+ * @return int
+ */
+ public function getLangId()
+ {
+ return $this->lang_id;
+ }
+
+
+
+
+}
\ No newline at end of file
diff --git a/templates/admin/default/languages.html b/templates/admin/default/languages.html
index 2ef326f02..4df1ed8dd 100644
--- a/templates/admin/default/languages.html
+++ b/templates/admin/default/languages.html
@@ -66,7 +66,7 @@
{/loop}
{loop type="auth" name="can_change" role="ADMIN" resource="admin.configuration.language" access="DELETE"}
-
+
{/loop}
@@ -222,7 +222,7 @@
{* Delete confirmation dialog *}
{capture "delete_dialog"}
-
+
{module_include location='languages_delete_form'}
@@ -262,13 +262,6 @@
{block name="javascript-initialization"}
{javascripts file='assets/js/bootstrap-switch/bootstrap-switch.js'}
-
-
{/javascripts}
{javascripts file='assets/js/main.js'}
@@ -307,6 +300,10 @@
});
}
});
+
+ $(".lang-delete").click(function(){
+ $("#language_delete_id").val($(this).data("id"));
+ });
});
{/block}
\ No newline at end of file