// More helper forms refactoring
This commit is contained in:
@@ -26,28 +26,25 @@
|
||||
{extends file="helpers/form/form.tpl"}
|
||||
|
||||
{block name="label"}
|
||||
|
||||
{if $input.type == 'text' && $input.name == 'ps_cache_fs_directory_depth'}
|
||||
<div id="directory_depth">
|
||||
<div class="warn">{l s='The system CacheFS should be used only when the infrastructure contain only one front-end server. Ask your hosting company if you don\'t know.'}</div>
|
||||
{else}
|
||||
{$smarty.block.parent}
|
||||
{/if}
|
||||
|
||||
{if isset($input.label)}
|
||||
<label>{$input.label} </label>
|
||||
{/if}
|
||||
|
||||
{/block}
|
||||
|
||||
{block name="start_field_block"}
|
||||
<div class="margin-form">
|
||||
{block name="input_block"}
|
||||
{if $input.type == 'radio' && $input.name == 'combination' && $input.disabled}
|
||||
<div class="warn">
|
||||
{l s='This feature can\'t be disabled because this is currently in use.'}
|
||||
</div>
|
||||
{/if}
|
||||
{$smarty.block.parent}
|
||||
{/block}
|
||||
|
||||
{block name="end_field_block"}
|
||||
{block name="description_block"}
|
||||
{$smarty.block.parent}
|
||||
{if $input.type == 'radio' && $input.name == 'combination'}
|
||||
<ul style="list-style-type:disc;margin:0 0 0 30px;">
|
||||
<li>{l s='Combinations tab on product page'}</li>
|
||||
@@ -60,10 +57,14 @@
|
||||
<li>{l s='Feature'}</li>
|
||||
<li>{l s='Feature value'}</li>
|
||||
</ul>
|
||||
{elseif $input.type == 'text' && $input.name == 'ps_cache_fs_directory_depth'}
|
||||
{/if}
|
||||
{/block}
|
||||
|
||||
{block name="field_block"}
|
||||
{$smarty.block.parent}
|
||||
{if $input.type == 'text' && $input.name == 'ps_cache_fs_directory_depth'}
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
{/block}
|
||||
|
||||
{block name="other_input"}
|
||||
|
||||
@@ -26,8 +26,7 @@
|
||||
|
||||
{extends file='helpers/form/form.tpl'}
|
||||
|
||||
{block name="start_field_block"}
|
||||
<div class="margin-form">
|
||||
{block name="input_block"}
|
||||
{if $input.type == 'text_customer'}
|
||||
{$customer->firstname} {$customer->lastname}
|
||||
<p style="clear: both">
|
||||
@@ -104,5 +103,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
{else}
|
||||
{$smarty.block.parent}
|
||||
{/if}
|
||||
{/block}
|
||||
@@ -24,43 +24,16 @@
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
{extends file="helpers/form/form.tpl"}
|
||||
{debug}
|
||||
{block name="label"}
|
||||
|
||||
{block name="label"}
|
||||
{if $input.type == 'text' && $input.name == 'name'}
|
||||
<div class="hint" name="help_box" style="display:block;">{l s='You can\'t change the GroupShop when you have more than one Shop'}</div><br />
|
||||
{/if}
|
||||
|
||||
{if isset($input.label)}
|
||||
<label>{$input.label} </label>
|
||||
{/if}
|
||||
|
||||
{$smarty.block.parent}
|
||||
{/block}
|
||||
|
||||
{block name="start_field_block"}
|
||||
<div class="margin-form">
|
||||
{if $input.type == 'select' && $input.name == 'id_category'}
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
$("#id_category").change(function(){
|
||||
doAdminAjax(
|
||||
{
|
||||
ajax:"1",
|
||||
id_category : $(this).val(),
|
||||
use_shop_context : 0,
|
||||
action : "getCategoriesFromRootCategory",
|
||||
controller: "AdminShop",
|
||||
token : "{$token}",
|
||||
},
|
||||
function(res)
|
||||
{
|
||||
$('#categories-treeview').parent().html(res);
|
||||
}
|
||||
);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{else if $input.type == 'theme'}
|
||||
{block name="input_block"}
|
||||
{if $input.type == 'theme'}
|
||||
{foreach $input.values as $theme}
|
||||
<div class="select_theme {if $theme->id == $fields_value.id_theme_checked}select_theme_choice{/if}" onclick="$(this).find('input').attr('checked', true); $('.select_theme').removeClass('select_theme_choice'); $(this).toggleClass('select_theme_choice');">
|
||||
{$theme->name}<br />
|
||||
@@ -69,9 +42,32 @@
|
||||
</div>
|
||||
{/foreach}
|
||||
<div class="clear"> </div>
|
||||
{/if}
|
||||
{if $input.type == 'textGroupShop'}
|
||||
{elseif $input.type == 'textGroupShop'}
|
||||
{$input.value}
|
||||
{else}
|
||||
{if $input.type == 'select' && $input.name == 'id_category'}
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
$("#id_category").change(function(){
|
||||
doAdminAjax(
|
||||
{
|
||||
ajax:"1",
|
||||
id_category : $(this).val(),
|
||||
use_shop_context : 0,
|
||||
action : "getCategoriesFromRootCategory",
|
||||
controller: "AdminShop",
|
||||
token : "{$token}",
|
||||
},
|
||||
function(res)
|
||||
{
|
||||
$('#categories-treeview').parent().html(res);
|
||||
}
|
||||
);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{/if}
|
||||
{$smarty.block.parent}
|
||||
{/if}
|
||||
{/block}
|
||||
|
||||
@@ -124,8 +120,7 @@
|
||||
{/if}
|
||||
{/block}
|
||||
|
||||
{block name=script}
|
||||
|
||||
{block name="script"}
|
||||
$(document).ready(function() {
|
||||
$('input[name=useImportData]').click(function() {
|
||||
if ($(this).attr('id') == 'useImportData_on')
|
||||
@@ -134,5 +129,4 @@
|
||||
$('#shop_list, #data_list').slideUp('slow');
|
||||
});
|
||||
});
|
||||
|
||||
{/block}
|
||||
|
||||
@@ -326,21 +326,23 @@
|
||||
{/if}
|
||||
{/block}
|
||||
{if isset($input.required) && $input.required && $input.type != 'radio'} <sup>*</sup>{/if}
|
||||
{if isset($input.desc)}
|
||||
<p class="preference_description">
|
||||
{if is_array($input.desc)}
|
||||
{foreach $input.desc as $p}
|
||||
{if is_array($p)}
|
||||
<span id="{$p.id}">{$p.text}</span><br />
|
||||
{else}
|
||||
{$p}<br />
|
||||
{/if}
|
||||
{/foreach}
|
||||
{else}
|
||||
{$input.desc}
|
||||
{/if}
|
||||
</p>
|
||||
{/if}
|
||||
{block name="description_block"}
|
||||
{if isset($input.desc)}
|
||||
<p class="preference_description">
|
||||
{if is_array($input.desc)}
|
||||
{foreach $input.desc as $p}
|
||||
{if is_array($p)}
|
||||
<span id="{$p.id}">{$p.text}</span><br />
|
||||
{else}
|
||||
{$p}<br />
|
||||
{/if}
|
||||
{/foreach}
|
||||
{else}
|
||||
{$input.desc}
|
||||
{/if}
|
||||
</p>
|
||||
{/if}
|
||||
{/block}
|
||||
{if isset($input.lang) && isset($languages)}<div class="clear"></div>{/if}
|
||||
{block name="end_field_block"}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user