Лучший Ответ Cheren-dow , 20 March 2015 - 00:38
nikolia, попробуйте сделать следующее
Содержимое шаблона элемента:
сайт\media\zoo\elements\itemremove\tmpl\itemremove.php
Замените полностью на:
<?php /************************* * @package ZOO Component * @file itemremove.php * @version 3.3.0 March 2015 * @author Attavus M.D. http://www.raslab.org * @copyright Copyright (C) 2013 R.A.S.Lab[.org] * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only *******************************************************************/ // no direct access defined('_JEXEC') or die('Restricted access'); $removeLink = array( 'controller' => 'submission', 'submission_id' => $submission_id, 'task' => 'remove', 'item_id' => $item_id, 'Itemid' => $this->app->menu->getActive()->id, 'currentUri' => JUri::current(), ); ?> <?php if ($this->canAccess()) : ?> <a href="javascript: if(confirm('Are you sure you want to remove this item?')) { window.location='<?php echo $this->app->link($removeLink); ?>';}" title="<?php echo JText::_('Remove Item'); ?>" class="item-icon remove-item"> <img src="<?php echo JRoute::_($this->app->path->url('assets:images/delete.png')); ?>" width="16" height="16" alt="<?php echo JText::_('Remove Item'); ?>"/> </a> <?php endif; ?>
Далее откройте файл событий подач:
сайт\media\zoo\applications\jbuniversal\framework\events\jbevent.submission.php
Найдите метод:
/** * On submission deleted * @param AppEvent $event */ public static function deleted($event) { }
И замените его на:
/** * On submission deleted * @param AppEvent $event */ public static function deleted($event) { $app = self::app(); $currentUri = $app->jbrequest->get('currentUri'); if (isset($currentUri) && !empty($currentUri)) { // set redirect message $msg = JText::_('Submission Deleted'); $jApp = JFactory::getApplication(); $jApp->redirect(JRoute::_($currentUri, false), $msg); } }
Должно работать как часы.
Перейти к сообщению