// More helper forms refactoring
This commit is contained in:
1 parent
d51fbc23ee
commit
39b83a9318
4 files changed
+34
-36
No files matched your search
@@ -26,28 +26,25 @@
|
|||||||
{extends file="helpers/form/form.tpl"}
|
{extends file="helpers/form/form.tpl"}
|
||||||
|
|
||||||
{block name="label"}
|
{block name="label"}
|
||||||
|
|
||||||
{if $input.type == 'text' && $input.name == 'ps_cache_fs_directory_depth'}
|
{if $input.type == 'text' && $input.name == 'ps_cache_fs_directory_depth'}
|
||||||
<div id="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>
|
<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}
|
||||||
|
|
||||||
{if isset($input.label)}
|
|
||||||
<label>{$input.label} </label>
|
|
||||||
{/if}
|
|
||||||
|
|
||||||
{/block}
|
{/block}
|
||||||
|
|
||||||
{block name="start_field_block"}
|
{block name="input_block"}
|
||||||
<div class="margin-form">
|
|
||||||
{if $input.type == 'radio' && $input.name == 'combination' && $input.disabled}
|
{if $input.type == 'radio' && $input.name == 'combination' && $input.disabled}
|
||||||
<div class="warn">
|
<div class="warn">
|
||||||
{l s='This feature can\'t be disabled because this is currently in use.'}
|
{l s='This feature can\'t be disabled because this is currently in use.'}
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
|
{$smarty.block.parent}
|
||||||
{/block}
|
{/block}
|
||||||
|
|
||||||
{block name="end_field_block"}
|
{block name="description_block"}
|
||||||
|
{$smarty.block.parent}
|
||||||
{if $input.type == 'radio' && $input.name == 'combination'}
|
{if $input.type == 'radio' && $input.name == 'combination'}
|
||||||
<ul style="list-style-type:disc;margin:0 0 0 30px;">
|
<ul style="list-style-type:disc;margin:0 0 0 30px;">
|
||||||
<li>{l s='Combinations tab on product page'}</li>
|
<li>{l s='Combinations tab on product page'}</li>
|
||||||
@@ -60,10 +57,14 @@
|
|||||||
<li>{l s='Feature'}</li>
|
<li>{l s='Feature'}</li>
|
||||||
<li>{l s='Feature value'}</li>
|
<li>{l s='Feature value'}</li>
|
||||||
</ul>
|
</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>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
|
||||||
{/block}
|
{/block}
|
||||||
|
|
||||||
{block name="other_input"}
|
{block name="other_input"}
|
||||||
|
|||||||
@@ -26,8 +26,7 @@
|
|||||||
|
|
||||||
{extends file='helpers/form/form.tpl'}
|
{extends file='helpers/form/form.tpl'}
|
||||||
|
|
||||||
{block name="start_field_block"}
|
{block name="input_block"}
|
||||||
<div class="margin-form">
|
|
||||||
{if $input.type == 'text_customer'}
|
{if $input.type == 'text_customer'}
|
||||||
{$customer->firstname} {$customer->lastname}
|
{$customer->firstname} {$customer->lastname}
|
||||||
<p style="clear: both">
|
<p style="clear: both">
|
||||||
@@ -104,5 +103,7 @@
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
{else}
|
||||||
|
{$smarty.block.parent}
|
||||||
{/if}
|
{/if}
|
||||||
{/block}
|
{/block}
|
||||||
@@ -24,21 +24,27 @@
|
|||||||
* International Registered Trademark & Property of PrestaShop SA
|
* International Registered Trademark & Property of PrestaShop SA
|
||||||
*}
|
*}
|
||||||
{extends file="helpers/form/form.tpl"}
|
{extends file="helpers/form/form.tpl"}
|
||||||
{debug}
|
|
||||||
{block name="label"}
|
|
||||||
|
|
||||||
|
{block name="label"}
|
||||||
{if $input.type == 'text' && $input.name == 'name'}
|
{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 />
|
<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}
|
||||||
|
{$smarty.block.parent}
|
||||||
{if isset($input.label)}
|
|
||||||
<label>{$input.label} </label>
|
|
||||||
{/if}
|
|
||||||
|
|
||||||
{/block}
|
{/block}
|
||||||
|
|
||||||
{block name="start_field_block"}
|
{block name="input_block"}
|
||||||
<div class="margin-form">
|
{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 />
|
||||||
|
<img src="../themes/{$theme->directory}/preview.jpg" alt="{$theme->directory}" /><br />
|
||||||
|
<input type="radio" name="id_theme" value="{$theme->id}" {if $theme->id == $fields_value.id_theme_checked}checked="checked"{/if} />
|
||||||
|
</div>
|
||||||
|
{/foreach}
|
||||||
|
<div class="clear"> </div>
|
||||||
|
{elseif $input.type == 'textGroupShop'}
|
||||||
|
{$input.value}
|
||||||
|
{else}
|
||||||
{if $input.type == 'select' && $input.name == 'id_category'}
|
{if $input.type == 'select' && $input.name == 'id_category'}
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
@@ -60,18 +66,8 @@
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
{else 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 />
|
|
||||||
<img src="../themes/{$theme->directory}/preview.jpg" alt="{$theme->directory}" /><br />
|
|
||||||
<input type="radio" name="id_theme" value="{$theme->id}" {if $theme->id == $fields_value.id_theme_checked}checked="checked"{/if} />
|
|
||||||
</div>
|
|
||||||
{/foreach}
|
|
||||||
<div class="clear"> </div>
|
|
||||||
{/if}
|
{/if}
|
||||||
{if $input.type == 'textGroupShop'}
|
{$smarty.block.parent}
|
||||||
{$input.value}
|
|
||||||
{/if}
|
{/if}
|
||||||
{/block}
|
{/block}
|
||||||
|
|
||||||
@@ -124,8 +120,7 @@
|
|||||||
{/if}
|
{/if}
|
||||||
{/block}
|
{/block}
|
||||||
|
|
||||||
{block name=script}
|
{block name="script"}
|
||||||
|
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
$('input[name=useImportData]').click(function() {
|
$('input[name=useImportData]').click(function() {
|
||||||
if ($(this).attr('id') == 'useImportData_on')
|
if ($(this).attr('id') == 'useImportData_on')
|
||||||
@@ -134,5 +129,4 @@
|
|||||||
$('#shop_list, #data_list').slideUp('slow');
|
$('#shop_list, #data_list').slideUp('slow');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
{/block}
|
{/block}
|
||||||
@@ -326,6 +326,7 @@
|
|||||||
{/if}
|
{/if}
|
||||||
{/block}
|
{/block}
|
||||||
{if isset($input.required) && $input.required && $input.type != 'radio'} <sup>*</sup>{/if}
|
{if isset($input.required) && $input.required && $input.type != 'radio'} <sup>*</sup>{/if}
|
||||||
|
{block name="description_block"}
|
||||||
{if isset($input.desc)}
|
{if isset($input.desc)}
|
||||||
<p class="preference_description">
|
<p class="preference_description">
|
||||||
{if is_array($input.desc)}
|
{if is_array($input.desc)}
|
||||||
@@ -341,6 +342,7 @@
|
|||||||
{/if}
|
{/if}
|
||||||
</p>
|
</p>
|
||||||
{/if}
|
{/if}
|
||||||
|
{/block}
|
||||||
{if isset($input.lang) && isset($languages)}<div class="clear"></div>{/if}
|
{if isset($input.lang) && isset($languages)}<div class="clear"></div>{/if}
|
||||||
{block name="end_field_block"}
|
{block name="end_field_block"}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in new issue
Block a user