// Product customization
This commit is contained in:
@@ -42,7 +42,6 @@
|
||||
<input type="text" name="uploadable_files" id="uploadable_files" value="{$uploadable_files|htmlentities}" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
{include file="controllers/products/multishop/checkbox.tpl" field="text_fields" type="default"}
|
||||
<label class="control-label col-lg-3" for="text_fields">
|
||||
@@ -55,15 +54,27 @@
|
||||
<input type="text" name="text_fields" id="text_fields" value="{$text_fields|htmlentities}" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{if $has_file_labels}
|
||||
{l s='Define the label of the file fields:'}
|
||||
{$display_file_labels}
|
||||
<hr/>
|
||||
<div class="row">
|
||||
<label class="control-label col-lg-3">
|
||||
{l s='Define the label of the file fields:'}
|
||||
</label>
|
||||
<div class="col-lg-9">
|
||||
{$display_file_labels}
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if $has_text_labels}
|
||||
{l s='Define the label of the text fields:'}
|
||||
{$display_text_labels}
|
||||
<hr/>
|
||||
<div class="row">
|
||||
<label class="control-label col-lg-3">
|
||||
{l s='Define the label of the text fields:'}
|
||||
</label>
|
||||
<div class="col-lg-9">
|
||||
{$display_text_labels}
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
</fieldset>
|
||||
{/if}
|
||||
@@ -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 .= '<div id="'.$fieldsContainerName.'" class="translatable clear" style="line-height: 18px">';
|
||||
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 .= '<div class="lang_'.$language['id_lang'].'" id="'.$fieldName.'" style="display: '.((int)($language['id_lang']) == (int)($default_language) ? 'block' : 'none').'; clear: left; float: left; padding-bottom: 4px;">
|
||||
<input type="text" name="'.$fieldName.'" value="'.htmlentities($text, ENT_COMPAT, 'UTF-8').'" style="float: left" />
|
||||
</div>';
|
||||
}
|
||||
$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 .= '</div>
|
||||
<div style="margin: 3px 0 0 3px; font-size: 11px">
|
||||
<input type="checkbox" name="require_'.$type.'_'.(int)($id_customization_field).'" id="require_'.$type.'_'.(int)($id_customization_field).'" value="1" '.($required ? 'checked="checked"' : '').' style="float: left; margin: 0 4px"/><label for="require_'.$type.'_'.(int)($id_customization_field).'" style="float: none; font-weight: normal;"> '.$this->l('required').'</label>
|
||||
</div>';
|
||||
return $content;
|
||||
|
||||
$template = $this->context->smarty->createTemplate('controllers/products/input_text_lang.tpl',
|
||||
$this->context->smarty);
|
||||
return '<div class="form-group">'
|
||||
.$template->assign(array(
|
||||
'languages' => $languages,
|
||||
'input_name' => 'label_'.$type.'_'.(int)($id_customization_field),
|
||||
'input_value' => $input_value
|
||||
))->fetch()
|
||||
.'</div>'
|
||||
.'<div class="form-group">'
|
||||
.'<input type="checkbox" name="require_'.$type.'_'.(int)($id_customization_field).'" id="require_'.$type.'_'.(int)($id_customization_field).'" value="1" '.($required ? 'checked="checked"' : '').' style="float: left; margin: 0 4px"/><label for="require_'.$type.'_'.(int)($id_customization_field).'" style="float: none; font-weight: normal;"> '.$this->l('required').'</label>'
|
||||
.'</div>';
|
||||
}
|
||||
|
||||
protected function _displayLabelFields(&$obj, &$labels, $languages, $default_language, $type)
|
||||
|
||||
Reference in New Issue
Block a user