diff --git a/core/module/theme/theme.php b/core/module/theme/theme.php index f34ad022..15182843 100755 --- a/core/module/theme/theme.php +++ b/core/module/theme/theme.php @@ -447,6 +447,33 @@ class theme extends common { * Import du thème */ public function manage() { + if($this->isPost() ) { + if ($this->getInput('themeManageImport') !== '') { + if ($this->import($this->getInput('themeManageImport'))) { + // import ok + $this->addOutput([ + 'notification' => 'Thème ' . $this->getInput('themeManageImport'). ' importé', + 'redirect' => helper::baseUrl() . 'theme', + 'state' => true + ]); + } else { + $this->addOutput([ + 'notification' => 'Archive incorrecte', + 'redirect' => helper::baseUrl() . 'theme', + 'state' => true + ]); + } + } else { + $this->addOutput([ + 'notification' => 'Error ', + 'redirect' => helper::baseUrl() . 'theme', + 'state' => true + ]); + + } + + + } // Valeurs en sortie $this->addOutput([ 'title' => 'Gestion des thèmes', @@ -561,6 +588,7 @@ class theme extends common { * Import du thème */ public function import() { + } diff --git a/core/module/theme/view/manage/manage.php b/core/module/theme/view/manage/manage.php index e0c843fe..ab40c254 100644 --- a/core/module/theme/view/manage/manage.php +++ b/core/module/theme/view/manage/manage.php @@ -1,17 +1,32 @@ - -
- 'buttonGrey', - 'href' => helper::baseUrl() . 'theme', - 'ico' => 'left', - 'value' => 'Retour' - ]); ?> + +
+
+ 'buttonGrey', + 'href' => helper::baseUrl() . 'theme', + 'ico' => 'left', + 'value' => 'Retour' + ]); ?> +
+
+ 'Importer' + ]); ?> +

Importer les données du thème

+ 'Archive à importer', + 'type' => 2 + ]); ?>
+ 'Importer' + ]); ?> +

helper::baseUrl() . 'theme/import', 'value' => 'Importer les données du thème' @@ -32,4 +47,4 @@

- +