Commit | Line | Data |
---|---|---|
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 | {* Custom Data form*} | |
27 | {if $formEdit} | |
4bb6b4e3 CW |
28 | {if $cd_edit.help_pre} |
29 | <div class="messages help">{$cd_edit.help_pre}</div> | |
30 | {/if} | |
31 | <table class="form-layout-compressed"> | |
32 | {foreach from=$cd_edit.fields item=element key=field_id} | |
33 | {include file="CRM/Custom/Form/CustomField.tpl"} | |
34 | {/foreach} | |
35 | </table> | |
36 | <div class="spacer"></div> | |
37 | {if $cd_edit.help_post} | |
38 | <div class="messages help">{$cd_edit.help_post}</div> | |
6a488035 | 39 | {/if} |
f3a853c5 | 40 | {if $cd_edit.is_multiple and ( ( $cd_edit.max_multiple eq '' ) or ( $cd_edit.max_multiple > 0 and $cd_edit.max_multiple > $cgCount ) ) } |
eaf756c0 CW |
41 | <div id="add-more-link-{$cgCount}" class="add-more-link-{$group_id} add-more-link-{$group_id}-{$cgCount}"> |
42 | <a href="#" class="crm-hover-button" onclick="CRM.buildCustomData('{$cd_edit.extends}',{if $cd_edit.subtype}'{$cd_edit.subtype}'{else}'{$cd_edit.extends_entity_column_id}'{/if}, '', {$cgCount}, {$group_id}, true ); return false;"> | |
43 | <span class="icon ui-icon-circle-plus"></span> | |
44 | {ts 1=$cd_edit.title}Another %1 record{/ts} | |
45 | </a> | |
46 | </div> | |
4bb6b4e3 CW |
47 | {/if} |
48 | {else} | |
49 | {foreach from=$groupTree item=cd_edit key=group_id name=custom_sets} | |
e41f4660 | 50 | {if $cd_edit.is_multiple and $multiRecordDisplay eq 'single'} |
8afcc7ed | 51 | <div class="custom-group custom-group-{$cd_edit.name}"> |
e41f4660 PJ |
52 | {if $cd_edit.help_pre} |
53 | <div class="messages help">{$cd_edit.help_pre}</div> | |
54 | {/if} | |
55 | <table> | |
56 | {foreach from=$cd_edit.fields item=element key=field_id} | |
57 | {include file="CRM/Custom/Form/CustomField.tpl"} | |
58 | {/foreach} | |
59 | </table> | |
60 | <div class="spacer"></div> | |
61 | {if $cd_edit.help_post} | |
62 | <div class="messages help">{$cd_edit.help_post}</div> | |
63 | {/if} | |
64 | </div> | |
65 | {else} | |
f98411db | 66 | <div class="custom-group custom-group-{$cd_edit.name} crm-accordion-wrapper {if $cd_edit.collapse_display and !$skipTitle}collapsed{/if}"> |
4bb6b4e3 CW |
67 | {if !$skipTitle} |
68 | <div class="crm-accordion-header"> | |
eaf756c0 | 69 | {$cd_edit.title} {$cgCount} |
4bb6b4e3 CW |
70 | </div><!-- /.crm-accordion-header --> |
71 | {/if} | |
8afcc7ed | 72 | <div class="crm-accordion-body"> |
4bb6b4e3 CW |
73 | {if $cd_edit.help_pre} |
74 | <div class="messages help">{$cd_edit.help_pre}</div> | |
75 | {/if} | |
76 | <table class="form-layout-compressed"> | |
77 | {foreach from=$cd_edit.fields item=element key=field_id} | |
78 | {include file="CRM/Custom/Form/CustomField.tpl"} | |
79 | {/foreach} | |
80 | </table> | |
81 | <div class="spacer"></div> | |
82 | {if $cd_edit.help_post} | |
83 | <div class="messages help">{$cd_edit.help_post}</div> | |
6a488035 | 84 | {/if} |
4bb6b4e3 | 85 | </div> |
e41f4660 | 86 | </div> |
f3a853c5 | 87 | {if $cd_edit.is_multiple and ( ( $cd_edit.max_multiple eq '' ) or ( $cd_edit.max_multiple > 0 and $cd_edit.max_multiple > $cgCount ) ) } |
eca160d5 CW |
88 | {if $skipTitle} |
89 | {* We don't yet support adding new records in inline-edit forms *} | |
90 | <div class="messages help"> | |
91 | <em>{ts 1=$cd_edit.title}Click "Edit Contact" to add more %1 records{/ts}</em> | |
92 | </div> | |
93 | {else} | |
eaf756c0 CW |
94 | <div id="add-more-link-{$cgCount}"> |
95 | <a href="#" class="crm-hover-button" onclick="CRM.buildCustomData('{$cd_edit.extends}',{if $cd_edit.subtype}'{$cd_edit.subtype}'{else}'{$cd_edit.extends_entity_column_id}'{/if}, '', {$cgCount}, {$group_id}, true ); return false;"> | |
96 | <span class="icon ui-icon-circle-plus"></span> | |
97 | {ts 1=$cd_edit.title}Another %1 record{/ts} | |
98 | </a> | |
99 | </div> | |
eca160d5 | 100 | {/if} |
4bb6b4e3 | 101 | {/if} |
e41f4660 | 102 | {/if} |
6a488035 | 103 | <div id="custom_group_{$group_id}_{$cgCount}"></div> |
4bb6b4e3 | 104 | {/foreach} |
1ef465c2 | 105 | |
6a488035 | 106 | {/if} |
cbe8b99c DL |
107 | |
108 | {include file="CRM/Form/attachmentjs.tpl"} |