From 2ff4ce919f79d63e08577b0d21e477ee3a091d75 Mon Sep 17 00:00:00 2001 From: bMancone Date: Tue, 29 Nov 2011 14:47:06 +0000 Subject: [PATCH] // AdminSupplyOrdersController: added confirm message before using a template to create an order git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10746 b9a71923-0436-4b27-9f14-aed3839534dd --- .../list/list_action_supply_order_create_from_template.tpl | 2 +- controllers/admin/AdminSupplyOrdersController.php | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/admin-dev/themes/template/helper/list/list_action_supply_order_create_from_template.tpl b/admin-dev/themes/template/helper/list/list_action_supply_order_create_from_template.tpl index ed1c0474d..3fd3bc783 100644 --- a/admin-dev/themes/template/helper/list/list_action_supply_order_create_from_template.tpl +++ b/admin-dev/themes/template/helper/list/list_action_supply_order_create_from_template.tpl @@ -23,5 +23,5 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA *} - + {$action} diff --git a/controllers/admin/AdminSupplyOrdersController.php b/controllers/admin/AdminSupplyOrdersController.php index 96d0bca5d..df6f1c5d1 100644 --- a/controllers/admin/AdminSupplyOrdersController.php +++ b/controllers/admin/AdminSupplyOrdersController.php @@ -1162,10 +1162,14 @@ class AdminSupplyOrdersControllerCore extends AdminController if (!array_key_exists('CreateSupplyOrder', self::$cache_lang)) self::$cache_lang['CreateSupplyOrder'] = $this->l('Use this template to create a supply order'); + if (!array_key_exists('CreateSupplyOrderConfirm', self::$cache_lang)) + self::$cache_lang['CreateSupplyOrderConfirm'] = $this->l('Are you sure you want to use this template?'); + $this->context->smarty->assign(array( 'href' => self::$currentIndex. '&'.$this->identifier.'='.$id. '&create_supply_order&token='.($token != null ? $token : $this->token), + 'confirm' => self::$cache_lang['CreateSupplyOrderConfirm'], 'action' => self::$cache_lang['CreateSupplyOrder'], ));