Merge pull request #22972 from eileenmcnaughton/notice_send
[civicrm-core.git] / templates / CRM / Form / body.tpl
1 {*
2 +--------------------------------------------------------------------+
3 | Copyright CiviCRM LLC. All rights reserved. |
4 | |
5 | This work is published under the GNU AGPLv3 license with some |
6 | permitted exceptions and without any warranty. For full license |
7 | and copyright information, see https://civicrm.org/licensing |
8 +--------------------------------------------------------------------+
9 *}
10 {if !empty($form.javascript)}
11 {$form.javascript}
12 {/if}
13
14 {if !empty($form.hidden)}
15 <div>{$form.hidden}</div>
16 {/if}
17
18 {if ($snippet !== 'json') and !$suppressForm and count($form.errors) gt 0}
19 <div class="messages crm-error">
20 <i class="crm-i fa-exclamation-triangle crm-i-red" aria-hidden="true"></i>
21 {ts}Please correct the following errors in the form fields below:{/ts}
22 <ul id="errorList">
23 {foreach from=$form.errors key=errorName item=error}
24 {if is_array($error)}
25 <li>{$error.label} {$error.message}</li>
26 {else}
27 <li>{$error}</li>
28 {/if}
29 {/foreach}
30 </ul>
31 </div>
32 {/if}
33
34 {* Add all the form elements sent in by the hook - used by civiDiscount and a few other extensions *}
35 {if $beginHookFormElements}
36 <table class="form-layout-compressed">
37 {foreach from=$beginHookFormElements key=dontCare item=hookFormElement}
38 <tr><td class="label nowrap">{$form.$hookFormElement.label}</td><td>{$form.$hookFormElement.html}</td></tr>
39 {/foreach}
40 </table>
41 {/if}