Commit | Line | Data |
---|---|---|
6a488035 TO |
1 | {* |
2 | +--------------------------------------------------------------------+ | |
1188c7a8 | 3 | | Copyright CiviCRM LLC. All rights reserved. | |
6a488035 | 4 | | | |
1188c7a8 TO |
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 | | |
6a488035 TO |
8 | +--------------------------------------------------------------------+ |
9 | *} | |
633ce286 | 10 | {if !empty($form.javascript)} |
6a488035 TO |
11 | {$form.javascript} |
12 | {/if} | |
13 | ||
633ce286 | 14 | {if !empty($form.hidden)} |
6a488035 TO |
15 | <div>{$form.hidden}</div> |
16 | {/if} | |
17 | ||
f714e90d | 18 | {if ($snippet !== 'json') and !$suppressForm and count($form.errors) gt 0} |
6a488035 | 19 | <div class="messages crm-error"> |
13a3d214 | 20 | <i class="crm-i fa-exclamation-triangle crm-i-red" aria-hidden="true"></i> |
6a488035 TO |
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 | ||
ab51511b | 34 | {* Add all the form elements sent in by the hook - used by civiDiscount and a few other extensions *} |
db773960 | 35 | {if $beginHookFormElements} |
6a488035 TO |
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} |