// Fix Categories image problem

This commit is contained in:
Jerome Nadaud committed 2013-11-28 15:35:17 +01:00
1 parent 336e784ca5
commit 7261490381
2 files changed
+3 -4

No files matched your search

@@ -49,7 +49,7 @@
</div> </div>
{else} {else}
<div class="form-group"> <div class="form-group">
<div class="col-lg-12"> <div class="col-lg-6">
<input id="{$id}" type="file" name="{$name}"{if isset($multiple) && $multiple} multiple="multiple"{/if} class="hide" /> <input id="{$id}" type="file" name="{$name}"{if isset($multiple) && $multiple} multiple="multiple"{/if} class="hide" />
<div class="dummyfile input-group"> <div class="dummyfile input-group">
<span class="input-group-addon"><i class="icon-file"></i></span> <span class="input-group-addon"><i class="icon-file"></i></span>
@@ -477,9 +477,8 @@ class AdminCategoriesControllerCore extends AdminController
'display_image' => true, 'display_image' => true,
'image' => $image_url ? $image_url : false, 'image' => $image_url ? $image_url : false,
'size' => $image_size, 'size' => $image_size,
'delete_url' => self::$currentIndex.'&'.$this->identifier.'='.$this->id.'&token='.$this->token.'&deleteImage=1', 'delete_url' => self::$currentIndex.'&'.$this->identifier.'='.$this->_category->id.'&token='.$this->token.'&deleteImage=1',
'hint' => $this->l('Upload a category logo from your computer.'), 'hint' => $this->l('Upload a category logo from your computer.'),
'col' => 4
), ),
array( array(
'type' => 'text', 'type' => 'text',
@@ -602,7 +601,7 @@ class AdminCategoriesControllerCore extends AdminController
{ {
if (!in_array($this->display, array('edit', 'add'))) if (!in_array($this->display, array('edit', 'add')))
$this->multishop_context_group = false; $this->multishop_context_group = false;
if (Tools::isSubmit('forcedeleteImage') || (isset($_FILES['image']) && $_FILES['image']['size'] > 0)) if (Tools::isSubmit('forcedeleteImage') || (isset($_FILES['image']) && $_FILES['image']['size'] > 0) || Tools::getValue('deleteImage'))
{ {
$this->processForceDeleteImage(); $this->processForceDeleteImage();
if (Tools::isSubmit('forcedeleteImage')) if (Tools::isSubmit('forcedeleteImage'))