// You can now display confirmation messages by adding them to array $confirmations in AdminController

This commit is contained in:
tDidierjean
2011-11-15 16:10:34 +00:00
parent 1f71403d47
commit f92d5d78ff
2 changed files with 11 additions and 2 deletions
+8
View File
@@ -67,6 +67,14 @@
</div><br /> </div><br />
{/if} {/if}
{if isset($confirmations) && count($confirmations) && $confirmations}
<div class="conf" style="display:block;">
{foreach $confirmations as $conf}
{$conf}<br />
{/foreach}
</div><br />
{/if}
{if count($warnings)} {if count($warnings)}
<script type="text/javascript"> <script type="text/javascript">
$(document).ready(function() { $(document).ready(function() {
+3 -2
View File
@@ -33,7 +33,7 @@ class AdminControllerCore extends Controller
public $content; public $content;
public $warnings = array(); public $warnings = array();
public $informations = array(); public $informations = array();
public $confirmations = array();
public $shopShareDatas = false; public $shopShareDatas = false;
public $_languages = array(); public $_languages = array();
@@ -515,10 +515,10 @@ class AdminControllerCore extends Controller
{ {
/* Checking fields validity */ /* Checking fields validity */
$this->validateRules(); $this->validateRules();
if (!count($this->_errors)) if (!count($this->_errors))
{ {
$id = (int)Tools::getValue($this->identifier); $id = (int)Tools::getValue($this->identifier);
/* Object update */ /* Object update */
if (isset($id) && !empty($id)) if (isset($id) && !empty($id))
{ {
@@ -994,6 +994,7 @@ class AdminControllerCore extends Controller
$this->context->smarty->assign('errors', $this->_errors); $this->context->smarty->assign('errors', $this->_errors);
$this->context->smarty->assign('warnings', $this->warnings); $this->context->smarty->assign('warnings', $this->warnings);
$this->context->smarty->assign('informations', $this->informations); $this->context->smarty->assign('informations', $this->informations);
$this->context->smarty->assign('confirmations', $this->confirmations);
// page & layout if content_only = 1 // page & layout if content_only = 1
$this->context->smarty->assign('page', $page); $this->context->smarty->assign('page', $page);
$this->context->smarty->display($this->layout); $this->context->smarty->display($this->layout);