// Remove start_field and end_field blocks from form helper.

This commit is contained in:
tDidierjean
2012-03-12 14:28:38 +00:00
parent 5177a2c817
commit a2ef8978c2
10 changed files with 69 additions and 79 deletions
@@ -26,9 +26,9 @@
{extends file="helpers/form/form.tpl"}
{block name="end_field_block"}
</div>
{if $input.name == 'public_name'}
{hook h="displayAttributeGroupForm" id_attribute_group=$form_id}
{/if}
{block name="field_block"}
{$smarty.block.parent}
{if $input.name == 'public_name'}
{hook h="displayAttributeGroupForm" id_attribute_group=$form_id}
{/if}
{/block}
@@ -38,14 +38,12 @@
{if $input.type == 'select' && $input.name == 'id_tax_rules_group'}
<div id="shipping_costs_div" style="display:{if isset($fields_value.is_free) && $fields_value.is_free}none{else}block{/if}">
{/if}
{if isset($input.label)}
<label>{$input.label} </label>
{/if}
{$smarty.block.parent}
{/block}
{block name="end_field_block"}
{block name="field_block"}
{$smarty.block.parent}
{if $input.type == 'select' && $input.name == 'range_behavior'}
</div>
{/if}
</div>
{/block}
@@ -25,7 +25,8 @@
*}
{extends file="helpers/form/form.tpl"}
{block name="end_field_block"}
{block name="description_block"}
{$smarty.block.parent}
{if ($input.name == 'groupBox')}
<p class="hint" style="display:block; position:relative; display:inline-block;">
<span>{$input.info_introduction}</span><br />
@@ -33,5 +34,5 @@
<span>{$input.guest}</span><br />
<span>{$input.customer}</span><br />
</p>
{/if}</div>
{/if}
{/block}
@@ -25,8 +25,8 @@
*}
{extends file="helpers/form/form.tpl"}
{block name="end_field_block"}
</div>
{block name="field_block"}
{$smarty.block.parent}
{if $input.name == 'id_feature'}
{hook h="displayFeatureValueForm" id_feature_value=$feature_value->id}
{/if}
@@ -25,8 +25,8 @@
*}
{extends file="helpers/form/form.tpl"}
{block name="end_field_block"}
</div>
{block name="field_block"}
{$smarty.block.parent}
{if $input.name == 'name'}
{hook h="displayFeatureForm" id_feature=$form_id}
{/if}
@@ -101,13 +101,11 @@
{/block}
{block name="end_field_block"}
</div>
{block name="field_block"}
{$smarty.block.parent}
{if $input.name == 'request_uri_regexp_not'}
</div>
{/if}
{/block}
{block name="script"}
@@ -26,11 +26,12 @@
{extends file="helpers/form/form.tpl"}
{block name="end_field_block"}
{block name="input_block"}
{if ($input.type == "description")}
<p>{$input.text}</p>
{else}
{$smarty.block.parent}
{/if}
</div>
{/block}
{block name="after"}
@@ -25,53 +25,54 @@
*}
{extends file="helpers/form/form.tpl"}
{block name="end_field_block"}
{block name="description_block"}
{$smarty.block.parent}
{if $input.type == 'text' && $input.name == 'key'}
<input type="button" value="{l s=' Generate! '}" class="button" onclick="gencode(32)" />
{/if}
</div>
{/block}
{block name="start_field_block"}
<div class="margin-form">
{if $input.type == 'resources'}
<p>{l s='Set the resource permissions for this key:'}</p>
<table border="0" cellspacing="0" cellpadding="0" class="table accesses">
<thead>
{block name="input_block"}
{if $input.type == 'resources'}
<p>{l s='Set the resource permissions for this key:'}</p>
<table border="0" cellspacing="0" cellpadding="0" class="table accesses">
<thead>
<tr>
<th class="center">{l s='Resource'}</th>
<th width="30" class="center"></th>
<th width="50" class="center">{l s='View (GET)'}</th>
<th width="50" class="center">{l s='Modify (PUT)'}</th>
<th width="50" class="center">{l s='Add (POST)'}</th>
<th width="50" class="center">{l s='Delete (DELETE)'}</th>
<th width="50" class="center">{l s='Fast view (HEAD)'}</th>
</tr>
</thead>
<tbody>
<tr class="all" style="vertical-align:middle">
<th></th>
<th></th>
<th class="center"><input type="checkbox" class="all_get get " /></th>
<th class="center"><input type="checkbox" class="all_put put " /></th>
<th class="center"><input type="checkbox" class="all_post post " /></th>
<th class="center"><input type="checkbox" class="all_delete delete" /></th>
<th class="center"><input type="checkbox" class="all_head head" /></th>
</tr>
{foreach $ressources as $resource_name => $resource}
<tr>
<th class="center">{l s='Resource'}</th>
<th width="30" class="center"></th>
<th width="50" class="center">{l s='View (GET)'}</th>
<th width="50" class="center">{l s='Modify (PUT)'}</th>
<th width="50" class="center">{l s='Add (POST)'}</th>
<th width="50" class="center">{l s='Delete (DELETE)'}</th>
<th width="50" class="center">{l s='Fast view (HEAD)'}</th>
<th class="center">{$resource_name}</th>
<th class="center"><input type="checkbox" class="all"/></th>
<td class="center"><input type="checkbox" {if isset($ressources[$resource_name]['forbidden_method']) && in_array('GET', $ressources[$resource_name]['forbidden_method'])}disabled="disabled"{/if} class="get" name="resources[{$resource_name}][GET]" {if isset($permissions[$resource_name]) && in_array('GET', $permissions[$resource_name])}checked="checked"{/if} /></td>
<td class="center"><input type="checkbox" {if isset($ressources[$resource_name]['forbidden_method']) && in_array('PUT', $ressources[$resource_name]['forbidden_method'])}disabled="disabled"{/if} class="put" name="resources[{$resource_name}][PUT]" {if isset($permissions[$resource_name]) && in_array('PUT', $permissions[$resource_name])}checked="checked"{/if}/></td>
<td class="center"><input type="checkbox" {if isset($ressources[$resource_name]['forbidden_method']) && in_array('POST', $ressources[$resource_name]['forbidden_method'])}disabled="disabled"{/if} class="post" name="resources[{$resource_name}][POST]" {if isset($permissions[$resource_name]) && in_array('POST', $permissions[$resource_name])}checked="checked"{/if}/></td>
<td class="center"><input type="checkbox" {if isset($ressources[$resource_name]['forbidden_method']) && in_array('DELETE', $ressources[$resource_name]['forbidden_method'])}disabled="disabled"{/if} class="delete" name="resources[{$resource_name}][DELETE]" {if isset($permissions[$resource_name]) && in_array('DELETE', $permissions[$resource_name])}checked="checked"{/if}/></td>
<td class="center"><input type="checkbox" {if isset($ressources[$resource_name]['forbidden_method']) && in_array('HEAD', $ressources[$resource_name]['forbidden_method'])}disabled="disabled"{/if} class="head" name="resources[{$resource_name}][HEAD]" {if isset($permissions[$resource_name]) && in_array('HEAD', $permissions[$resource_name])}checked="checked"{/if}/></td>
</tr>
</thead>
<tbody>
<tr class="all" style="vertical-align:middle">
<th></th>
<th></th>
<th class="center"><input type="checkbox" class="all_get get " /></th>
<th class="center"><input type="checkbox" class="all_put put " /></th>
<th class="center"><input type="checkbox" class="all_post post " /></th>
<th class="center"><input type="checkbox" class="all_delete delete" /></th>
<th class="center"><input type="checkbox" class="all_head head" /></th>
</tr>
{foreach $ressources as $resource_name => $resource}
<tr>
<th class="center">{$resource_name}</th>
<th class="center"><input type="checkbox" class="all"/></th>
<td class="center"><input type="checkbox" {if isset($ressources[$resource_name]['forbidden_method']) && in_array('GET', $ressources[$resource_name]['forbidden_method'])}disabled="disabled"{/if} class="get" name="resources[{$resource_name}][GET]" {if isset($permissions[$resource_name]) && in_array('GET', $permissions[$resource_name])}checked="checked"{/if} /></td>
<td class="center"><input type="checkbox" {if isset($ressources[$resource_name]['forbidden_method']) && in_array('PUT', $ressources[$resource_name]['forbidden_method'])}disabled="disabled"{/if} class="put" name="resources[{$resource_name}][PUT]" {if isset($permissions[$resource_name]) && in_array('PUT', $permissions[$resource_name])}checked="checked"{/if}/></td>
<td class="center"><input type="checkbox" {if isset($ressources[$resource_name]['forbidden_method']) && in_array('POST', $ressources[$resource_name]['forbidden_method'])}disabled="disabled"{/if} class="post" name="resources[{$resource_name}][POST]" {if isset($permissions[$resource_name]) && in_array('POST', $permissions[$resource_name])}checked="checked"{/if}/></td>
<td class="center"><input type="checkbox" {if isset($ressources[$resource_name]['forbidden_method']) && in_array('DELETE', $ressources[$resource_name]['forbidden_method'])}disabled="disabled"{/if} class="delete" name="resources[{$resource_name}][DELETE]" {if isset($permissions[$resource_name]) && in_array('DELETE', $permissions[$resource_name])}checked="checked"{/if}/></td>
<td class="center"><input type="checkbox" {if isset($ressources[$resource_name]['forbidden_method']) && in_array('HEAD', $ressources[$resource_name]['forbidden_method'])}disabled="disabled"{/if} class="head" name="resources[{$resource_name}][HEAD]" {if isset($permissions[$resource_name]) && in_array('HEAD', $permissions[$resource_name])}checked="checked"{/if}/></td>
</tr>
{/foreach}
</tbody>
</table>
{/if}
{/foreach}
</tbody>
</table>
{else}
{$smarty.block.parent}
{/if}
{/block}
{block name="script"}
@@ -68,9 +68,7 @@
{if isset($input.label)}<label>{$input.label} </label>{/if}
{/block}
{block name="field_block"}
{block name="start_field_block"}
<div class="margin-form">
{/block}
<div class="margin-form">
{block name="input_block"}
{if $input.type == 'text' || $input.type == 'tags'}
{if isset($input.lang)}
@@ -344,10 +342,8 @@
{/if}
{/block}
{if isset($input.lang) && isset($languages)}<div class="clear"></div>{/if}
{block name="end_field_block"}
</div>
<div class="clear"></div>
{/block}
</div>
<div class="clear"></div>
{/block}
{if $input.name == 'id_state'}
</div>
@@ -26,9 +26,7 @@
{extends file="helpers/form/form.tpl"}
{block name="start_field_block"}
<div class="margin-form">
{block name="input_block"}
{if $input.type == 'cms_blocks'}
@@ -97,9 +95,7 @@
</div>
{/foreach}
{/if}
{/if}
{if $input.type == 'select_category'}
{elseif $input.type == 'select_category'}
{function name=render_select level=0}
{foreach $items as $item}
@@ -126,10 +122,7 @@
{call render_select items=$categories}
</select>
{/if}
{/if}
{if $input.type == 'cms_pages'}
{elseif $input.type == 'cms_pages'}
{assign var=cms value=$input.values}
{if isset($cms) && count($cms) > 0}
@@ -174,6 +167,8 @@
{else}
<p>{l s='No pages created'}</p>
{/if}
{else}
{$smarty.block.parent}
{/if}
{/block}