From: Coleman Watts Date: Thu, 17 Apr 2014 17:46:54 +0000 (-0400) Subject: HR-316 - Add generic form regions X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=dbdc5c3443ad4c40ee57cd6cf3a9e3f8bfbea045;p=civicrm-core.git HR-316 - Add generic form regions --- diff --git a/templates/CRM/Form/default.tpl b/templates/CRM/Form/default.tpl index d9325d7f27..11acdab5d5 100644 --- a/templates/CRM/Form/default.tpl +++ b/templates/CRM/Form/default.tpl @@ -25,12 +25,16 @@ *} {if ! $suppressForm}
+ {crmRegion name='form-top'}{/crmRegion} {/if} -{include file="CRM/Form/body.tpl"} + {crmRegion name='form-body'} + {include file="CRM/Form/body.tpl"} -{include file=$tplFile} + {include file=$tplFile} + {/crmRegion} {if ! $suppressForm} + {crmRegion name='form-bottom'}{/crmRegion}
{/if} diff --git a/templates/CRM/common/formButtons.tpl b/templates/CRM/common/formButtons.tpl index d0de0cf2cb..bba2c80bed 100644 --- a/templates/CRM/common/formButtons.tpl +++ b/templates/CRM/common/formButtons.tpl @@ -27,8 +27,8 @@ {* Loops through $form.buttons.html array and assigns separate spans with classes to allow theming by button and name. crmBtnType grabs type keyword from button name (e.g. 'upload', 'next', 'back', 'cancel') so types of buttons can be styled differently via css. *} - -{foreach from=$form.buttons item=button key=key name=btns} +{crmRegion name='form-buttons'} + {foreach from=$form.buttons item=button key=key name=btns} {if $key|substring:0:4 EQ '_qf_'} {if $location} {assign var='html' value=$form.buttons.$key.html|crmReplace:id:"$key-$location"} @@ -38,4 +38,5 @@ {capture assign=validate}{$key|crmBtnValidate}{/capture} {$html|crmAddClass:$validate} {/if} -{/foreach} + {/foreach} +{/crmRegion}