diff --git a/admin-dev/themes/default/template/controllers/products/customization.tpl b/admin-dev/themes/default/template/controllers/products/customization.tpl index 5fce735e6..e0a3d393c 100644 --- a/admin-dev/themes/default/template/controllers/products/customization.tpl +++ b/admin-dev/themes/default/template/controllers/products/customization.tpl @@ -42,7 +42,6 @@ -
{include file="controllers/products/multishop/checkbox.tpl" field="text_fields" type="default"}
- {if $has_file_labels} - {l s='Define the label of the file fields:'} - {$display_file_labels} +
+
+ +
+ {$display_file_labels} +
+
{/if} - {if $has_text_labels} - {l s='Define the label of the text fields:'} - {$display_text_labels} +
+
+ +
+ {$display_text_labels} +
+
{/if} {/if} \ No newline at end of file diff --git a/controllers/admin/AdminProductsController.php b/controllers/admin/AdminProductsController.php index e7ab5d9ba..e782d2330 100644 --- a/controllers/admin/AdminProductsController.php +++ b/controllers/admin/AdminProductsController.php @@ -3350,25 +3350,23 @@ class AdminProductsControllerCore extends AdminController protected function _displayLabelField(&$label, $languages, $default_language, $type, $fieldIds, $id_customization_field) { - $content = ''; - $fieldsName = 'label_'.$type.'_'.(int)($id_customization_field); - $fieldsContainerName = 'labelContainer_'.$type.'_'.(int)($id_customization_field); - $content .= '
'; foreach ($languages as $language) - { - $fieldName = 'label_'.$type.'_'.(int)($id_customization_field).'_'.(int)($language['id_lang']); - $text = (isset($label[(int)($language['id_lang'])])) ? $label[(int)($language['id_lang'])]['name'] : ''; - $content .= '
- -
'; - } + $input_value[$language['id_lang']] = (isset($label[(int)($language['id_lang'])])) ? $label[(int)($language['id_lang'])]['name'] : ''; $required = (isset($label[(int)($language['id_lang'])])) ? $label[(int)($language['id_lang'])]['required'] : false; - $content .= '
-
- -
'; - return $content; + + $template = $this->context->smarty->createTemplate('controllers/products/input_text_lang.tpl', + $this->context->smarty); + return '
' + .$template->assign(array( + 'languages' => $languages, + 'input_name' => 'label_'.$type.'_'.(int)($id_customization_field), + 'input_value' => $input_value + ))->fetch() + .'
' + .'
' + .'' + .'
'; } protected function _displayLabelFields(&$obj, &$labels, $languages, $default_language, $type)