Merge branch 'rcsheets-docstring-cleanup'
[civicrm-core.git] / templates / CRM / Form / body.tpl
CommitLineData
6a488035
TO
1{*
2 +--------------------------------------------------------------------+
819d0d41 3 | CiviCRM version 4.5 |
6a488035 4 +--------------------------------------------------------------------+
819d0d41 5 | Copyright CiviCRM LLC (c) 2004-2014 |
6a488035
TO
6 +--------------------------------------------------------------------+
7 | This file is a part of CiviCRM. |
8 | |
9 | CiviCRM is free software; you can copy, modify, and distribute it |
10 | under the terms of the GNU Affero General Public License |
11 | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
12 | |
13 | CiviCRM is distributed in the hope that it will be useful, but |
14 | WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
16 | See the GNU Affero General Public License for more details. |
17 | |
18 | You should have received a copy of the GNU Affero General Public |
19 | License and the CiviCRM Licensing Exception along |
20 | with this program; if not, contact CiviCRM LLC |
21 | at info[AT]civicrm[DOT]org. If you have questions about the |
22 | GNU Affero General Public License or the licensing of CiviCRM, |
23 | see the CiviCRM license FAQ at http://civicrm.org/licensing |
24 +--------------------------------------------------------------------+
25*}
26{include file="CRM/common/stateCountry.tpl"}
27
28{if $form.javascript}
29 {$form.javascript}
30{/if}
31
32{if $form.hidden}
33 <div>{$form.hidden}</div>
34{/if}
35
fc05b8da 36{if $snippet neq 'json' and !$suppressForm and count($form.errors) gt 0}
6a488035
TO
37 <div class="messages crm-error">
38 <div class="icon red-icon alert-icon"></div>
39 {ts}Please correct the following errors in the form fields below:{/ts}
40 <ul id="errorList">
41 {foreach from=$form.errors key=errorName item=error}
42 {if is_array($error)}
43 <li>{$error.label} {$error.message}</li>
44 {else}
45 <li>{$error}</li>
46 {/if}
47 {/foreach}
48 </ul>
49 </div>
50{/if}
51
52{* Add all the form elements sent in by the hook *}
53{if $beginHookFormElements}
54 <table class="form-layout-compressed">
55 {foreach from=$beginHookFormElements key=dontCare item=hookFormElement}
56 <tr><td class="label nowrap">{$form.$hookFormElement.label}</td><td>{$form.$hookFormElement.html}</td></tr>
57 {/foreach}
58 </table>
59{/if}
60