From dbdc5c3443ad4c40ee57cd6cf3a9e3f8bfbea045 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Thu, 17 Apr 2014 13:46:54 -0400 Subject: [PATCH] HR-316 - Add generic form regions --- templates/CRM/Form/default.tpl | 8 ++++++-- templates/CRM/common/formButtons.tpl | 7 ++++--- 2 files changed, 10 insertions(+), 5 deletions(-) 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} -- 2.25.1