From 981ee1c1227e28a08a27139b3b9779bce9fadae2 Mon Sep 17 00:00:00 2001 From: gloas <gloas@afi-sa.fr> Date: Mon, 10 Apr 2017 12:02:23 +0200 Subject: [PATCH] dev #57952 fix admin validation URL --- library/ZendAfi/Controller/Plugin/Manager/Manager.php | 5 +++-- public/opac/js/subModal.js | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/library/ZendAfi/Controller/Plugin/Manager/Manager.php b/library/ZendAfi/Controller/Plugin/Manager/Manager.php index 47c2100b794..0dc6c802871 100644 --- a/library/ZendAfi/Controller/Plugin/Manager/Manager.php +++ b/library/ZendAfi/Controller/Plugin/Manager/Manager.php @@ -165,13 +165,14 @@ class ZendAfi_Controller_Plugin_Manager_Manager extends ZendAfi_Controller_Plugi protected function _getEditUrl($model) { - return ['action' => 'edit', + return ['module' => 'admin', + 'action' => 'edit', 'id' => $model->getId()]; } protected function _redirectToEdit($model) { - $url = $this->_view->url($this->_getEditUrl($model)); + $url = $this->_view->absoluteUrl($this->_getEditUrl($model)); return ('1' === $this->_getParam('styles_reload')) ? $this->_redirect($url) : $this->_redirectClose($url); diff --git a/public/opac/js/subModal.js b/public/opac/js/subModal.js index 22aa192e091..b595bcf2f79 100644 --- a/public/opac/js/subModal.js +++ b/public/opac/js/subModal.js @@ -193,7 +193,7 @@ var action = dialog_form[0].getAttribute('action'); $('body').find('a[class*="edit_"], .configuration_module a').each(function() { var href = $(this)[0].getAttribute('href'); - if(action.indexOf(href) > -1) { + if(action.indexOf(href) > -1 || href.indexOf(action) > -1) { return current_anchor = $(this); } }); -- GitLab