// Removing first confirm message on deleting a category
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@12631 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -46,7 +46,14 @@
|
||||
{if isset($delete_category) && $delete_category}
|
||||
<form action="{$REQUEST_URI}" method="post">
|
||||
<div class="warn">
|
||||
<h2>{l s='Do you want to delete products too?'}</h2>
|
||||
<h2>
|
||||
{if $need_delete_mode}
|
||||
{l s='Do you want to delete products too?'}
|
||||
{else}
|
||||
{l s='Deleting this category will remove products linked with this category and without any others. Are you sure you want to continue?'}
|
||||
{/if}
|
||||
</h2>
|
||||
{if $need_delete_mode}
|
||||
<ul class="listForm">
|
||||
<li>
|
||||
<input type="radio" name="deleteMode" value="linkanddisable" id="deleteMode_linkanddisable" />
|
||||
@@ -61,6 +68,9 @@
|
||||
<label for="deleteMode_delete" style="float:none">{l s='Yes, I want to remove products linked with this category and without any others categories.'}</label>
|
||||
</li>
|
||||
</ul>
|
||||
{else}
|
||||
<input type="hidden" name="deleteMode" value="delete" id="deleteMode_delete" />
|
||||
{/if}
|
||||
{foreach $POST as $key => $value}
|
||||
{if $key != 'deleteMode'}
|
||||
{if is_array($value)}
|
||||
@@ -72,7 +82,9 @@
|
||||
{/if}
|
||||
{/if}
|
||||
{/foreach}
|
||||
<br /><input type="submit" class="button" value="{l s=' Validate '}" />
|
||||
<br />
|
||||
<input type="submit" name="cancel" class="button" value="{l s=' Cancel '}" />
|
||||
<input type="submit" class="button" value="{l s=' Validate '}" />
|
||||
</div>
|
||||
</form>
|
||||
<div class="clear"> </div>
|
||||
|
||||
@@ -224,7 +224,7 @@ class AdminControllerCore extends Controller
|
||||
*/
|
||||
protected $filter;
|
||||
protected $noLink;
|
||||
protected $specificConfirmDelete;
|
||||
protected $specificConfirmDelete = null;
|
||||
protected $colorOnBackground;
|
||||
/** @var bool If true, activates color on hover */
|
||||
protected $row_hover = true;
|
||||
@@ -1343,7 +1343,7 @@ class AdminControllerCore extends Controller
|
||||
'install_dir_exists' => file_exists(_PS_ADMIN_DIR_.'/../install'),
|
||||
'is_multishop' => $is_multishop,
|
||||
'pic_dir' => _THEME_PROD_PIC_DIR_,
|
||||
'controller_name' => Tools::getValue('controller'),
|
||||
'controller_name' => Tools::getValue('controller'),
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
@@ -94,7 +94,7 @@ class HelperListCore extends Helper
|
||||
public $list_skip_actions = array();
|
||||
|
||||
public $bulk_actions = false;
|
||||
public $specificConfirmDelete;
|
||||
public $specificConfirmDelete = null;
|
||||
public $colorOnBackground;
|
||||
|
||||
/** @var bool If true, activates color on hover */
|
||||
@@ -464,12 +464,16 @@ class HelperListCore extends Helper
|
||||
if (!is_null($name))
|
||||
$name = '\n\n'.self::$cache_lang['Name'].' '.$name;
|
||||
|
||||
$tpl->assign(array_merge($this->tpl_delete_link_vars, array(
|
||||
$data = array(
|
||||
'href' => $this->currentIndex.'&'.$this->identifier.'='.$id.'&delete'.$this->table.'&token='.($token != null ? $token : $this->token),
|
||||
'confirm' => (!is_null($this->specificConfirmDelete) ? '\r'.$this->specificConfirmDelete : self::$cache_lang['DeleteItem'].$name),
|
||||
'action' => self::$cache_lang['Delete'],
|
||||
'id' => $id,
|
||||
)));
|
||||
'id' => $id
|
||||
);
|
||||
|
||||
if ($this->specificConfirmDelete !== false)
|
||||
$data['confirm'] = !is_null($this->specificConfirmDelete) ? '\r'.$this->specificConfirmDelete : self::$cache_lang['DeleteItem'].$name;
|
||||
|
||||
$tpl->assign(array_merge($this->tpl_delete_link_vars, $data));
|
||||
|
||||
return $tpl->fetch();
|
||||
}
|
||||
|
||||
@@ -34,9 +34,9 @@ class AdminCategoriesControllerCore extends AdminController
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->table = 'category';
|
||||
$this->table = 'category';
|
||||
$this->className = 'Category';
|
||||
$this->lang = true;
|
||||
$this->lang = true;
|
||||
$this->deleted = false;
|
||||
|
||||
$this->context = Context::getContext();
|
||||
@@ -80,8 +80,9 @@ class AdminCategoriesControllerCore extends AdminController
|
||||
)
|
||||
);
|
||||
|
||||
$this->bulk_actions = array('delete' => array('text' => $this->l('Delete selected'), 'confirm' => $this->l('Delete selected items?')));
|
||||
|
||||
$this->bulk_actions = array('delete' => array('text' => $this->l('Delete selected')));
|
||||
$this->specificConfirmDelete = false;
|
||||
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user