Commit | Line | Data |
---|---|---|
6a488035 TO |
1 | {* |
2 | +--------------------------------------------------------------------+ | |
232624b1 | 3 | | CiviCRM version 4.4 | |
6a488035 TO |
4 | +--------------------------------------------------------------------+ |
5 | | Copyright CiviCRM LLC (c) 2004-2013 | | |
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} |
4bb6b4e3 CW |
40 | {if $cd_edit.is_multiple and ( ( $cd_edit.max_multiple eq '' ) or ( $cd_edit.max_multiple > 0 and $cd_edit.max_multiple >= $cgCount ) ) } |
41 | <div id="add-more-link-{$cgCount}" class="add-more-link-{$group_id}-{$cgCount}"><a href="#" 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;">{ts 1=$cd_edit.title}Add another %1 record{/ts}</a></div> | |
42 | {/if} | |
43 | {else} | |
44 | {foreach from=$groupTree item=cd_edit key=group_id name=custom_sets} | |
45 | <div id="{$cd_edit.name}" class="crm-accordion-wrapper {if $cd_edit.collapse_display and !$skipTitle}collapsed{/if}"> | |
46 | {if !$skipTitle} | |
47 | <div class="crm-accordion-header"> | |
48 | {$cd_edit.title} | |
49 | </div><!-- /.crm-accordion-header --> | |
50 | {/if} | |
51 | <div id="{$cd_edit.name}" class="crm-accordion-body"> | |
52 | {if $cd_edit.help_pre} | |
53 | <div class="messages help">{$cd_edit.help_pre}</div> | |
54 | {/if} | |
55 | <table class="form-layout-compressed"> | |
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> | |
6a488035 | 63 | {/if} |
4bb6b4e3 CW |
64 | </div> |
65 | </div> | |
66 | {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 |
67 | {if $skipTitle} |
68 | {* We don't yet support adding new records in inline-edit forms *} | |
69 | <div class="messages help"> | |
70 | <em>{ts 1=$cd_edit.title}Click "Edit Contact" to add more %1 records{/ts}</em> | |
71 | </div> | |
72 | {else} | |
73 | <div id="add-more-link-{$cgCount}"><a href="#" 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;">{ts 1=$cd_edit.title}Add another %1 record{/ts}</a></div> | |
74 | {/if} | |
4bb6b4e3 | 75 | {/if} |
6a488035 | 76 | <div id="custom_group_{$group_id}_{$cgCount}"></div> |
4bb6b4e3 CW |
77 | {/foreach} |
78 | <script type="text/javascript"> | |
6a488035 | 79 | {literal} |
4bb6b4e3 CW |
80 | cj(function() { |
81 | cj().crmAccordions(); | |
82 | }); | |
6a488035 | 83 | {/literal} |
4bb6b4e3 | 84 | </script> |
1ef465c2 | 85 | |
6a488035 | 86 | {/if} |
cbe8b99c DL |
87 | |
88 | {include file="CRM/Form/attachmentjs.tpl"} |