Merge branch 'development' of https://github.com/PrestaShop/PrestaShop into bootstrap
Conflicts: admin-dev/themes/default/template/controllers/groups/helpers/view/view.tpl admin-dev/themes/default/template/controllers/import/helpers/form/form.tpl admin-dev/themes/default/template/controllers/modules/list.tpl admin-dev/themes/default/template/controllers/orders/helpers/view/view.tpl admin-dev/themes/default/template/controllers/products/informations.tpl admin-dev/themes/default/template/controllers/products/prices.tpl admin-dev/themes/default/template/controllers/products/suppliers.tpl admin-dev/themes/default/template/helpers/form/form.tpl admin-dev/themes/default/template/toolbar.tpl classes/helper/HelperList.php controllers/admin/AdminGroupsController.php controllers/admin/AdminManufacturersController.php
This commit is contained in:
@@ -78,7 +78,7 @@ class AdminAddressesControllerCore extends AdminController
|
||||
parent::initToolbar();
|
||||
if (!$this->display)
|
||||
$this->toolbar_btn['import'] = array(
|
||||
'href' => $this->context->link->getAdminLink('AdminImport', true).'&import_type='.$this->table,
|
||||
'href' => $this->context->link->getAdminLink('AdminImport', true).'&import_type=addresses',
|
||||
'desc' => $this->l('Import')
|
||||
);
|
||||
}
|
||||
|
||||
@@ -261,7 +261,7 @@ class AdminCategoriesControllerCore extends AdminController
|
||||
'desc' => $this->l('Add New')
|
||||
);
|
||||
$this->toolbar_btn['import'] = array(
|
||||
'href' => $this->context->link->getAdminLink('AdminImport', true).'&import_type='.$this->table,
|
||||
'href' => $this->context->link->getAdminLink('AdminImport', true).'&import_type=categories',
|
||||
'desc' => $this->l('Import')
|
||||
);
|
||||
}
|
||||
|
||||
@@ -633,11 +633,12 @@ class AdminCustomerThreadsControllerCore extends AdminController
|
||||
}
|
||||
$message['date_add'] = Tools::displayDate($message['date_add'], null, true);
|
||||
$message['user_agent'] = strip_tags($message['user_agent']);
|
||||
|
||||
$message['message'] = preg_replace(
|
||||
'/(https?:\/\/[a-z0-9#%&_=\(\)\.\? \+\-@\/]{6,1000})([\s\n<])/Uui',
|
||||
'<a href="\1">\1</a>\2',
|
||||
html_entity_decode($message['message'],
|
||||
ENT_NOQUOTES, 'UTF-8')
|
||||
ENT_QUOTES, 'UTF-8')
|
||||
);
|
||||
|
||||
$tpl->assign(array(
|
||||
|
||||
@@ -181,7 +181,7 @@ class AdminCustomersControllerCore extends AdminController
|
||||
else if (!$this->display) //display import button only on listing
|
||||
{
|
||||
$this->toolbar_btn['import'] = array(
|
||||
'href' => $this->context->link->getAdminLink('AdminImport', true).'&import_type='.$this->table,
|
||||
'href' => $this->context->link->getAdminLink('AdminImport', true).'&import_type=customers',
|
||||
'desc' => $this->l('Import')
|
||||
);
|
||||
}
|
||||
|
||||
@@ -326,9 +326,7 @@ class AdminEmployeesControllerCore extends AdminController
|
||||
if (!($obj = $this->loadObject(true)))
|
||||
return false;
|
||||
$email = $this->getFieldValue($obj, 'email');
|
||||
if (!Validate::isEmail($email))
|
||||
$this->errors[] = Tools::displayError('Invalid email address.');
|
||||
elseif (Employee::employeeExists($email) && (!Tools::getValue('id_employee') || ($employee = new Employee((int)Tools::getValue('id_employee'))) && $employee->email != $email))
|
||||
if (Validate::isEmail($email) && Employee::employeeExists($email) && (!Tools::getValue('id_employee') || ($employee = new Employee((int)Tools::getValue('id_employee'))) && $employee->email != $email))
|
||||
$this->errors[] = Tools::displayError('An account already exists for this email address:').' '.$email;
|
||||
}
|
||||
|
||||
|
||||
@@ -31,6 +31,7 @@ class AdminGroupsControllerCore extends AdminController
|
||||
$this->bootstrap = true ;
|
||||
$this->table = 'group';
|
||||
$this->className = 'Group';
|
||||
$this->list_id = 'group';
|
||||
$this->lang = true;
|
||||
$this->addRowAction('edit');
|
||||
$this->addRowAction('view');
|
||||
@@ -162,6 +163,16 @@ class AdminGroupsControllerCore extends AdminController
|
||||
if (Tools::isSubmit('changeShowPricesVal') && $this->id_object)
|
||||
$this->action = 'change_show_prices_val';
|
||||
|
||||
if (Tools::getIsset('viewgroup'))
|
||||
{
|
||||
$this->list_id = 'customer_group';
|
||||
|
||||
if (isset($_POST['submitReset'.$this->list_id]))
|
||||
$this->processResetFilters();
|
||||
}
|
||||
else
|
||||
$this->list_id = 'group';
|
||||
|
||||
parent::initProcess();
|
||||
}
|
||||
|
||||
@@ -190,30 +201,28 @@ class AdminGroupsControllerCore extends AdminController
|
||||
$genders_icon[$gender->id] = '../genders/'.(int)$gender->id.'.jpg';
|
||||
$genders[$gender->id] = $gender->name;
|
||||
}
|
||||
$customer_fields_display = (array(
|
||||
'id_customer' => array('title' => $this->l('ID'), 'align' => 'center', 'class' => 'fixed-width-xs'),
|
||||
'id_gender' => array('title' => $this->l('Titles'), 'align' => 'center','icon' => $genders_icon, 'list' => $genders, 'class' => 'fixed-width-sm'),
|
||||
'firstname' => array('title' => $this->l('First name'), 'align' => 'center'),
|
||||
'lastname' => array('title' => $this->l('Last name'), 'align' => 'center'),
|
||||
'email' => array('title' => $this->l('Email address'), 'align' => 'center'),
|
||||
'birthday' => array('title' => $this->l('Birth date'), 'align' => 'right', 'type' => 'date'),
|
||||
'date_add' => array('title' => $this->l('Register date'), 'align' => 'right', 'type' => 'date'),
|
||||
'orders' => array('title' => $this->l('Orders'), 'align' => 'center', 'class' => 'fixed-width-xs'),
|
||||
'active' => array('title' => $this->l('Enabled'),'align' => 'center', 'active' => 'status','type' => 'bool', 'class' => 'fixed-width-xs')
|
||||
));
|
||||
|
||||
$customer_list = $group->getCustomers(false, 0, 100, true);
|
||||
|
||||
$helper = new HelperList();
|
||||
$helper->currentIndex = Context::getContext()->link->getAdminLink('AdminCustomers', false);
|
||||
$helper->token = Tools::getAdminTokenLite('AdminCustomers');
|
||||
$helper->shopLinkType = '';
|
||||
$helper->table = 'customer';
|
||||
$helper->identifier = 'id_customer';
|
||||
$helper->actions = array('edit', 'view');
|
||||
$helper->show_toolbar = false;
|
||||
$helper->title = $this->l('Members of this customer group (Limited to the 100th first customers. Please use filters to narrow your search.)');
|
||||
return $helper->generateList($customer_list, $customer_fields_display);
|
||||
$this->table = 'customer_group';
|
||||
$this->lang = false;
|
||||
$this->list_id = 'customer_group';
|
||||
$this->actions = array();
|
||||
$this->bulk_actions = false;
|
||||
$this->no_link = true;
|
||||
$this->fields_list = (array(
|
||||
'id_customer' => array('title' => $this->l('ID'), 'width' => 15, 'align' => 'center', 'filter_key' => 'c!id_customer'),
|
||||
'id_gender' => array('title' => $this->l('Titles'), 'align' => 'center', 'width' => 50,'icon' => $genders_icon, 'list' => $genders),
|
||||
'firstname' => array('title' => $this->l('First name'), 'align' => 'center'),
|
||||
'lastname' => array('title' => $this->l('Last name'), 'align' => 'center'),
|
||||
'email' => array('title' => $this->l('Email address'), 'width' => 150, 'align' => 'center', 'filter_key' => 'c!email', 'orderby' => true),
|
||||
'birthday' => array('title' => $this->l('Birth date'), 'width' => 150, 'align' => 'right', 'type' => 'date'),
|
||||
'date_add' => array('title' => $this->l('Register date'), 'width' => 150, 'align' => 'right', 'type' => 'date'),
|
||||
'active' => array('title' => $this->l('Enabled'),'align' => 'center','width' => 20, 'active' => 'status','type' => 'bool')
|
||||
));
|
||||
$this->_select = 'c.*';
|
||||
$this->_join = 'LEFT JOIN `'._DB_PREFIX_.'customer` c ON (a.`id_customer` = c.`id_customer`)';
|
||||
$this->_where = 'AND a.`id_group` = '.(int)$group->id.' AND c.`deleted` != 1';
|
||||
self::$currentIndex = self::$currentIndex.'&viewgroup';
|
||||
$this->processFilter();
|
||||
return parent::renderList();
|
||||
}
|
||||
|
||||
public function renderForm()
|
||||
|
||||
@@ -364,10 +364,13 @@ class AdminImportControllerCore extends AdminController
|
||||
'shop' => Shop::getGroupFromShop(Configuration::get('PS_SHOP_DEFAULT')),
|
||||
);
|
||||
break;
|
||||
// @since 1.5.0
|
||||
case $this->entities[$this->l('Supply Orders')]:
|
||||
if (Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT'))
|
||||
{
|
||||
}
|
||||
|
||||
// @since 1.5.0
|
||||
if (Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT'))
|
||||
switch ((int)Tools::getValue('entity'))
|
||||
{
|
||||
case $this->entities[$this->l('Supply Orders')]:
|
||||
// required fields
|
||||
$this->required_fields = array(
|
||||
'id_supplier',
|
||||
@@ -395,12 +398,8 @@ class AdminImportControllerCore extends AdminController
|
||||
'discount_rate' => '0',
|
||||
'is_template' => '0',
|
||||
);
|
||||
}
|
||||
break;
|
||||
// @since 1.5.0
|
||||
case $this->entities[$this->l('Supply Order Details')]:
|
||||
if (Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT'))
|
||||
{
|
||||
break;
|
||||
case $this->entities[$this->l('Supply Order Details')]:
|
||||
// required fields
|
||||
$this->required_fields = array(
|
||||
'supply_order_reference',
|
||||
@@ -424,8 +423,9 @@ class AdminImportControllerCore extends AdminController
|
||||
'discount_rate' => '0',
|
||||
'tax_rate' => '0',
|
||||
);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
$this->separator = strval(trim(Tools::getValue('separator', ';')));
|
||||
|
||||
@@ -466,11 +466,25 @@ class AdminImportControllerCore extends AdminController
|
||||
$this->addCSS(_PS_CSS_DIR_.'jquery.fancybox-1.3.4.css', 'screen');
|
||||
$this->addJqueryPlugin(array('fancybox'));
|
||||
|
||||
$entity_selected = 0;
|
||||
if (isset($this->entities[$this->l(Tools::ucfirst(Tools::getValue('import_type')))]))
|
||||
{
|
||||
$entity_selected = $this->entities[$this->l(Tools::ucfirst(Tools::getValue('import_type')))];
|
||||
$this->context->cookie->entity_selected = $entity_selected;
|
||||
}
|
||||
elseif (isset($this->context->cookie->entity_selected))
|
||||
$entity_selected = (int)$this->context->cookie->entity_selected;
|
||||
|
||||
$csv_selected = '';
|
||||
if (isset($this->context->cookie->csv_selected))
|
||||
$csv_selected = pSQL($this->context->cookie->csv_selected);
|
||||
|
||||
$this->tpl_form_vars = array(
|
||||
'module_confirmation' => (Tools::getValue('import')) && (isset($this->warnings) && !count($this->warnings)),
|
||||
'path_import' => _PS_ADMIN_DIR_.'/import/',
|
||||
'entities' => $this->entities,
|
||||
'entity' => Tools::getValue('entity'),
|
||||
'entity_selected' => $entity_selected,
|
||||
'csv_selected' => $csv_selected,
|
||||
'files_to_import' => $files_to_import,
|
||||
'languages' => Language::getLanguages(false),
|
||||
'id_language' => $this->context->language->id,
|
||||
@@ -498,6 +512,11 @@ class AdminImportControllerCore extends AdminController
|
||||
for ($i = 0; $i < $nb_table; $i++)
|
||||
$data[$i] = $this->generateContentTable($i, $nb_column, $handle, $this->separator);
|
||||
|
||||
if ($entity_selected = (int)Tools::getValue('entity'))
|
||||
$this->context->cookie->entity_selected = $entity_selected;
|
||||
if ($csv_selected = Tools::getValue('csv'))
|
||||
$this->context->cookie->csv_selected = $csv_selected;
|
||||
|
||||
$this->tpl_view_vars = array(
|
||||
'import_matchs' => Db::getInstance()->executeS('SELECT * FROM '._DB_PREFIX_.'import_match'),
|
||||
'fields_value' => array(
|
||||
@@ -507,6 +526,7 @@ class AdminImportControllerCore extends AdminController
|
||||
'iso_lang' => Tools::getValue('iso_lang'),
|
||||
'truncate' => Tools::getValue('truncate'),
|
||||
'forceIDs' => Tools::getValue('forceIDs'),
|
||||
'regenerate' => Tools::getValue('regenerate'),
|
||||
'match_ref' => Tools::getValue('match_ref'),
|
||||
'separator' => $this->separator,
|
||||
'multiple_value_separator' => $this->multiple_value_separator
|
||||
@@ -796,7 +816,7 @@ class AdminImportControllerCore extends AdminController
|
||||
* @param string entity 'products' or 'categories'
|
||||
* @return void
|
||||
*/
|
||||
protected static function copyImg($id_entity, $id_image = null, $url, $entity = 'products')
|
||||
protected static function copyImg($id_entity, $id_image = null, $url, $entity = 'products', $regenerate = true)
|
||||
{
|
||||
$tmpfile = tempnam(_PS_TMP_IMG_DIR_, 'ps_import');
|
||||
$watermark_types = explode(',', Configuration::get('WATERMARK_TYPES'));
|
||||
@@ -824,11 +844,14 @@ class AdminImportControllerCore extends AdminController
|
||||
{
|
||||
ImageManager::resize($tmpfile, $path.'.jpg');
|
||||
$images_types = ImageType::getImagesTypes($entity);
|
||||
foreach ($images_types as $image_type)
|
||||
ImageManager::resize($tmpfile, $path.'-'.stripslashes($image_type['name']).'.jpg', $image_type['width'], $image_type['height']);
|
||||
|
||||
if (in_array($image_type['id_image_type'], $watermark_types))
|
||||
Hook::exec('actionWatermark', array('id_image' => $id_image, 'id_product' => $id_entity));
|
||||
if ($regenerate)
|
||||
foreach ($images_types as $image_type)
|
||||
{
|
||||
ImageManager::resize($tmpfile, $path.'-'.stripslashes($image_type['name']).'.jpg', $image_type['width'], $image_type['height']);
|
||||
if (in_array($image_type['id_image_type'], $watermark_types))
|
||||
Hook::exec('actionWatermark', array('id_image' => $id_image, 'id_product' => $id_entity));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -977,7 +1000,7 @@ class AdminImportControllerCore extends AdminController
|
||||
}
|
||||
//copying images of categories
|
||||
if (isset($category->image) && !empty($category->image))
|
||||
if (!(AdminImportController::copyImg($category->id, null, $category->image, 'categories')))
|
||||
if (!(AdminImportController::copyImg($category->id, null, $category->image, 'categories', !Tools::getValue('regenerate'))))
|
||||
$this->warnings[] = $category->image.' '.Tools::displayError('cannot be copied.');
|
||||
// If both failed, mysql error
|
||||
if (!$res)
|
||||
@@ -1439,7 +1462,7 @@ class AdminImportControllerCore extends AdminController
|
||||
{
|
||||
// associate image to selected shops
|
||||
$image->associateTo($shops);
|
||||
if (!AdminImportController::copyImg($product->id, $image->id, $url))
|
||||
if (!AdminImportController::copyImg($product->id, $image->id, $url, 'products', !Tools::getValue('regenerate')))
|
||||
{
|
||||
$image->delete();
|
||||
$this->warnings[] = sprintf(Tools::displayError('Error copying image: %s'), $url);
|
||||
@@ -1565,7 +1588,7 @@ class AdminImportControllerCore extends AdminController
|
||||
if ($field_error === true && $lang_field_error === true && $image->add())
|
||||
{
|
||||
$image->associateTo($id_shop_list);
|
||||
if (!AdminImportController::copyImg($product->id, $image->id, $url))
|
||||
if (!AdminImportController::copyImg($product->id, $image->id, $url, 'products', !Tools::getValue('regenerate')))
|
||||
{
|
||||
$this->warnings[] = sprintf(Tools::displayError('Error copying image: %s'), $url);
|
||||
$image->delete();
|
||||
@@ -2721,7 +2744,6 @@ class AdminImportControllerCore extends AdminController
|
||||
$this->clearSmartyCache();
|
||||
break;
|
||||
case $this->entities[$import_type = $this->l('Products')]:
|
||||
$import_type = $this->l('Categories');
|
||||
$this->productImport();
|
||||
$this->clearSmartyCache();
|
||||
break;
|
||||
@@ -2743,19 +2765,22 @@ class AdminImportControllerCore extends AdminController
|
||||
$this->supplierImport();
|
||||
$this->clearSmartyCache();
|
||||
break;
|
||||
// @since 1.5.0
|
||||
case $this->entities[$import_type = $this->l('Supply Orders')]:
|
||||
if (Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT'))
|
||||
$this->supplyOrdersImport();
|
||||
break;
|
||||
// @since 1.5.0
|
||||
case $this->entities[$import_type = $this->l('Supply Order Details')]:
|
||||
if (Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT'))
|
||||
$this->supplyOrdersDetailsImport();
|
||||
break;
|
||||
default:
|
||||
$this->errors[] = $this->l('Please select what you would like to import');
|
||||
}
|
||||
|
||||
// @since 1.5.0
|
||||
if (Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT'))
|
||||
switch ((int)Tools::getValue('entity'))
|
||||
{
|
||||
case $this->entities[$import_type = $this->l('Supply Orders')]:
|
||||
if (Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT'))
|
||||
$this->supplyOrdersImport();
|
||||
break;
|
||||
case $this->entities[$import_type = $this->l('Supply Order Details')]:
|
||||
if (Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT'))
|
||||
$this->supplyOrdersDetailsImport();
|
||||
break;
|
||||
}
|
||||
|
||||
if ($import_type !== false)
|
||||
{
|
||||
$log_message = sprintf($this->l('%s import'), $import_type);
|
||||
@@ -2822,4 +2847,4 @@ class AdminImportControllerCore extends AdminController
|
||||
die;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,10 +59,8 @@ class AdminInvoicesControllerCore extends AdminController
|
||||
'PS_INVOICE_FREE_TEXT' => array(
|
||||
'title' => $this->l('Footer text:'),
|
||||
'desc' => $this->l('This text will appear at the bottom of the invoice'),
|
||||
'size' => 6,
|
||||
'type' => 'textareaLang',
|
||||
'cols' => 40,
|
||||
'rows' => 8
|
||||
'size' => 50,
|
||||
'type' => 'textLang',
|
||||
),
|
||||
'PS_INVOICE_MODEL' => array(
|
||||
'title' => $this->l('Invoice model:'),
|
||||
|
||||
@@ -581,7 +581,7 @@ class AdminManufacturersControllerCore extends AdminController
|
||||
default:
|
||||
parent::initToolbar();
|
||||
$this->toolbar_btn['import'] = array(
|
||||
'href' => $this->context->link->getAdminLink('AdminImport', true).'&import_type='.$this->table,
|
||||
'href' => $this->context->link->getAdminLink('AdminImport', true).'&import_type=manufacturers',
|
||||
'desc' => $this->l('Import')
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1108,8 +1108,8 @@ class AdminModulesControllerCore extends AdminController
|
||||
$modules[$km]->preferences = $modules_preferences[$modules[$km]->name];
|
||||
}
|
||||
unset($object);
|
||||
if (isset($module->version_addons))
|
||||
$upgrade_available[] = array('anchor' => ucfirst($module->name), 'name' => $module->displayName);;
|
||||
if ($module->installed && isset($module->version_addons) && $module->version_addons)
|
||||
$upgrade_available[] = array('anchor' => ucfirst($module->name), 'name' => $module->displayName);
|
||||
}
|
||||
|
||||
// Don't display categories without modules
|
||||
|
||||
@@ -804,7 +804,7 @@ class AdminOrdersControllerCore extends AdminController
|
||||
|
||||
if (!Validate::isLoadedObject($order))
|
||||
$this->errors[] = Tools::displayError('The order cannot be found');
|
||||
elseif (!Validate::isNegativePrice($amount))
|
||||
elseif (!Validate::isNegativePrice($amount) || !(float)$amount)
|
||||
$this->errors[] = Tools::displayError('The amount is invalid.');
|
||||
elseif (!Validate::isString(Tools::getValue('payment_method')))
|
||||
$this->errors[] = Tools::displayError('The selected payment method is invalid.');
|
||||
@@ -1403,11 +1403,14 @@ class AdminOrdersControllerCore extends AdminController
|
||||
$product['warehouse_name'] = '--';
|
||||
}
|
||||
|
||||
$gender = new Gender((int)$customer->id_gender, $this->context->language->id);
|
||||
|
||||
// Smarty assign
|
||||
$this->tpl_view_vars = array(
|
||||
'order' => $order,
|
||||
'cart' => new Cart($order->id_cart),
|
||||
'customer' => $customer,
|
||||
'gender' => $gender,
|
||||
'customer_addresses' => $customer->getAddresses($this->context->language->id),
|
||||
'addresses' => array(
|
||||
'delivery' => $addressDelivery,
|
||||
|
||||
@@ -87,6 +87,19 @@ class AdminPreferencesControllerCore extends AdminController
|
||||
'type' => 'bool',
|
||||
'default' => '0'
|
||||
),
|
||||
);
|
||||
|
||||
if (Configuration::get('PS_SSL_ENABLED'))
|
||||
$fields['PS_SSL_ENABLED_EVERYWHERE'] = array(
|
||||
'title' => $this->l('Force the SSL on all the pages'),
|
||||
'desc' => $this->l('Force all your store to use SSL'),
|
||||
'validation' => 'isBool',
|
||||
'cast' => 'intval',
|
||||
'type' => 'bool',
|
||||
'default' => '0'
|
||||
);
|
||||
|
||||
$fields = array_merge($fields, array(
|
||||
'PS_TOKEN_ENABLE' => array(
|
||||
'title' => $this->l('Increase Front Office security'),
|
||||
'desc' => $this->l('Enable or disable token in the Front Office to improve PrestaShop\'s security.'),
|
||||
@@ -136,7 +149,7 @@ class AdminPreferencesControllerCore extends AdminController
|
||||
'list' => $activities2,
|
||||
'identifier' => 'value'
|
||||
),
|
||||
);
|
||||
));
|
||||
|
||||
// No HTTPS activation if you haven't already.
|
||||
if (!Tools::usingSecureMode() && !Configuration::get('PS_SSL_ENABLED'))
|
||||
|
||||
@@ -2023,7 +2023,7 @@ class AdminProductsControllerCore extends AdminController
|
||||
// Check multilingual fields validity
|
||||
foreach ($rules['validateLang'] as $fieldLang => $function)
|
||||
foreach ($languages as $language)
|
||||
if ($this->isProductFieldUpdated('description_short', $language['id_lang']) && ($value = Tools::getValue($fieldLang.'_'.$language['id_lang'])))
|
||||
if ($this->isProductFieldUpdated($fieldLang, $language['id_lang']) && ($value = Tools::getValue($fieldLang.'_'.$language['id_lang'])))
|
||||
if (!Validate::$function($value, (int)Configuration::get('PS_ALLOW_HTML_IFRAME')))
|
||||
$this->errors[] = sprintf(
|
||||
Tools::displayError('The %1$s field (%2$s) is invalid.'),
|
||||
@@ -2512,7 +2512,7 @@ class AdminProductsControllerCore extends AdminController
|
||||
}
|
||||
else
|
||||
$this->toolbar_btn['import'] = array(
|
||||
'href' => $this->context->link->getAdminLink('AdminImport', true).'&import_type='.$this->table,
|
||||
'href' => $this->context->link->getAdminLink('AdminImport', true).'&import_type=products',
|
||||
'desc' => $this->l('Import')
|
||||
);
|
||||
|
||||
|
||||
@@ -136,6 +136,7 @@ class AdminStatusesControllerCore extends AdminController
|
||||
{
|
||||
$this->table = 'order_return_state';
|
||||
$this->_defaultOrderBy = $this->identifier = 'id_order_return_state';
|
||||
$this->list_id = 'order_return_state';
|
||||
$this->deleted = false;
|
||||
$this->_orderBy = null;
|
||||
|
||||
|
||||
@@ -278,6 +278,24 @@ class AdminSuppliersControllerCore extends AdminController
|
||||
return parent::renderForm();
|
||||
}
|
||||
|
||||
/**
|
||||
* AdminController::initToolbar() override
|
||||
* @see AdminController::initToolbar()
|
||||
*
|
||||
*/
|
||||
public function initToolbar()
|
||||
{
|
||||
switch ($this->display)
|
||||
{
|
||||
default:
|
||||
parent::initToolbar();
|
||||
$this->toolbar_btn['import'] = array(
|
||||
'href' => $this->context->link->getAdminLink('AdminImport', true).'&import_type=suppliers',
|
||||
'desc' => $this->l('Import')
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
public function renderView()
|
||||
{
|
||||
$this->toolbar_title = $this->object->name;
|
||||
|
||||
@@ -91,6 +91,7 @@ class AdminTaxRulesGroupControllerCore extends AdminController
|
||||
public function initRulesList($id_group)
|
||||
{
|
||||
$this->table = 'tax_rule';
|
||||
$this->list_id = 'tax_rule';
|
||||
$this->identifier = 'id_tax_rule';
|
||||
$this->className = 'TaxRule';
|
||||
$this->lang = false;
|
||||
|
||||
Reference in New Issue
Block a user