// Refactoring helper forms with new blocks

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@13937 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
tDidierjean
2012-03-07 16:34:25 +00:00
parent dde5fbb33e
commit 93a7ded19e
9 changed files with 339 additions and 342 deletions
@@ -27,12 +27,28 @@
{extends file="helpers/form/form.tpl"}
{block name="label"}
{if $input.name == 'vat_number'}
{if $vat == 'is_applicable'}
<div id="vat_area" style="display: visible">
{else if $vat == 'management'}
<div id="vat_area" style="display: hidden">
{else}
<div style="display: none;">
{/if}
{else if $input.name == 'id_state'}
<div id="contains_states" {if $contains_states}style="display:none;"{/if}>
{/if}
{if $input.type == 'text_customer' && !isset($customer)}
<label>{l s='Customer e-mail'}</label>
{else}
{$smarty.block.parent}
{/if}
{/block}
{block name="start_field_block"}
{block name="field_block"}
{if $input.type == 'text_customer'}
{if isset($customer)}
<label>{$input.label}</label>
<div class="margin-form"><a style="display: block; padding-top: 4px;" href="?tab=AdminCustomers&id_customer={$customer->id}&viewcustomer&token={$tokenCustomer}">{$customer->lastname} {$customer->firstname} ({$customer->email})</a></div>
<input type="hidden" name="id_customer" value="{$customer->id}" />
<input type="hidden" name="email" value="{$customer->email}" />
@@ -71,34 +87,13 @@
}
});
</script>
<label>{l s='Customer e-mail'}</label>
<div class="margin-form">
<input type="text" size="33" name="email" value="{$fields_value[$input.name]|escape:'htmlall':'UTF-8'|htmlentities}" style="text-transform: lowercase;" /> <sup>*</sup>
</div>
{/if}
{else}
{if $input.name == 'vat_number'}
{if $vat == 'is_applicable'}
<div id="vat_area" style="display: visible">
{else if $vat == 'management'}
<div id="vat_area" style="display: hidden">
{else}
<div style="display: none;">
{/if}
{else if $input.name == 'id_state'}
<div id="contains_states" {if $contains_states}style="display:none;"{/if}>
{/if}
<label>{$input.label} </label>
<div class="margin-form">
{else}
{$smarty.block.parent}
{/if}
{/block}
{block name="end_field_block"}
{* close div margin-form *}
{if $input.type != 'text_customer'}
</div>
{/if}
{* close hidden div *}
{if $input.name == 'vat_number' || $input.name == 'id_state'}
</div>
{/if}