diff --git a/admin-dev/themes/default/img/module-logout.png b/admin-dev/themes/default/img/module-logout.png new file mode 100755 index 000000000..7a9647dce Binary files /dev/null and b/admin-dev/themes/default/img/module-logout.png differ diff --git a/admin-dev/themes/default/img/module-profile.png b/admin-dev/themes/default/img/module-profile.png new file mode 100755 index 000000000..b15ad4b91 Binary files /dev/null and b/admin-dev/themes/default/img/module-profile.png differ diff --git a/admin-dev/themes/default/template/controllers/modules/filters.tpl b/admin-dev/themes/default/template/controllers/modules/filters.tpl index b1e907624..00ec77567 100644 --- a/admin-dev/themes/default/template/controllers/modules/filters.tpl +++ b/admin-dev/themes/default/template/controllers/modules/filters.tpl @@ -25,7 +25,23 @@ *} - {if !isset($logged_on_addons)} + {if isset($logged_on_addons)} + + +
{l s='You are logged on PrestaShop Addons'}
+ +
');
+ },
+ success : function(data)
+ {
+ // res.status = cache or refresh
+ if (data == 'OK')
+ {
+ $('#addons_loading').html('');
+ $('#addons_login_div').fadeOut();
+ window.location.href = window.location.href;
+ }
+ else
+ $('#addons_loading').html(errorLogin);
+ },
+ error: function(res,textStatus,jqXHR)
+ {
+ //jAlert("TECHNICAL ERROR"+res);
+ }
+ });
+ }
+ catch(e){}
+ return false;
+ });
+
// Method to set filter on modules
function setFilter()
diff --git a/controllers/admin/AdminModulesController.php b/controllers/admin/AdminModulesController.php
index 99b64a176..f8d5b14d4 100644
--- a/controllers/admin/AdminModulesController.php
+++ b/controllers/admin/AdminModulesController.php
@@ -289,6 +289,13 @@ class AdminModulesControllerCore extends AdminController
die($result);
}
+ public function ajaxProcessLogOutAddonsWebservices()
+ {
+ $this->context->cookie->username_addons = '';
+ $this->context->cookie->password_addons = '';
+ die('OK');
+ }
+
public function ajaxProcessReloadModulesList()
{
if (Tools::getValue('filterCategory'))
@@ -1084,7 +1091,10 @@ class AdminModulesControllerCore extends AdminController
$tpl_vars['check_openssl'] = (extension_loaded('openssl') ? 'ok' : 'ko');
if ($this->logged_on_addons)
+ {
$tpl_vars['logged_on_addons'] = 1;
+ $tpl_vars['username_addons'] = $this->context->cookie->username_addons;
+ }
$smarty->assign($tpl_vars);
}