From 386ddf6443ea7352a22ae78f3d4282c5a3698f85 Mon Sep 17 00:00:00 2001 From: tDidierjean Date: Thu, 8 Mar 2012 16:45:23 +0000 Subject: [PATCH] // More helper forms refactoring --- .../statuses/helpers/form/form.tpl | 71 +++++++++---------- .../controllers/stores/helpers/form/form.tpl | 7 +- .../default/template/helpers/form/form.tpl | 10 +-- 3 files changed, 43 insertions(+), 45 deletions(-) diff --git a/admin-dev/themes/default/template/controllers/statuses/helpers/form/form.tpl b/admin-dev/themes/default/template/controllers/statuses/helpers/form/form.tpl index e91982c17..40105c96e 100644 --- a/admin-dev/themes/default/template/controllers/statuses/helpers/form/form.tpl +++ b/admin-dev/themes/default/template/controllers/statuses/helpers/form/form.tpl @@ -29,45 +29,44 @@ {if $input.type == "select_template"}
{/if} - {if isset($input.label)} - + {$smarty.block.parent} +{/block} + +{block name="input_block"} + {if $input.type == "select_template"} +
+ {foreach $languages as $language} +
+ + {if isset($input.hint)}{$input.hint} {/if} + {l s='Preview'} +
+ {/foreach} +
+ {else} + {$smarty.block.parent} {/if} {/block} -{block name="start_field_block"} -
- {if $input.type == "select_template"} -
- {foreach $languages as $language} -
- - {if isset($input.hint)}{$input.hint} {/if} - {l s='Preview'} -
- {/foreach} -
- {/if} -{/block} - -{block name="end_field_block"} -
+{block name="field_block"} + {$smarty.block.parent} {if $input.type == "select_template"}
{/if} diff --git a/admin-dev/themes/default/template/controllers/stores/helpers/form/form.tpl b/admin-dev/themes/default/template/controllers/stores/helpers/form/form.tpl index 3ec141b8b..f9ebd27fa 100644 --- a/admin-dev/themes/default/template/controllers/stores/helpers/form/form.tpl +++ b/admin-dev/themes/default/template/controllers/stores/helpers/form/form.tpl @@ -26,17 +26,14 @@ {extends file="helpers/form/form.tpl"} {block name=script} - $(document).ready(function() { $('#latitude, #longitude').keyup(function() { $(this).val($(this).val().replace(/,/g, '.')); }); }); - {/block} -{block name="start_field_block"} -
+{block name="input_block"} {if $input.type == 'latitude'} + {else} + {$smarty.block.parent} {/if} {/block} diff --git a/admin-dev/themes/default/template/helpers/form/form.tpl b/admin-dev/themes/default/template/helpers/form/form.tpl index 08f14cde5..033fc8556 100644 --- a/admin-dev/themes/default/template/helpers/form/form.tpl +++ b/admin-dev/themes/default/template/helpers/form/form.tpl @@ -324,8 +324,8 @@ {elseif $input.type == 'free'} {$fields_value[$input.name]} {/if} - {/block} {if isset($input.required) && $input.required && $input.type != 'radio'} *{/if} + {/block} {block name="description_block"} {if isset($input.desc)}

@@ -344,14 +344,14 @@ {/if} {/block} {if isset($input.lang) && isset($languages)}

{/if} - {block name="end_field_block"} -
-
+ {block name="end_field_block"} + +
+ {/block} {/block} {if $input.name == 'id_state'} {/if} - {/block} {/if} {/foreach} {hook h='displayAdminForm'}