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 | {* This file provides the HTML for the on-behalf-of form. Can also be used for related contact edit form. *} | |
27 | <fieldset id="for_organization" class="for_organization-group"> | |
28 | <legend>{$fieldSetTitle}</legend> | |
29 | {if $contact_type eq 'Individual'} | |
30 | ||
31 | {if $contactEditMode}<fieldset><legend></legend>{/if} | |
32 | <table class="form-layout-compressed"> | |
33 | <tr> | |
34 | <td>{$form.prefix_id.label}</td> | |
35 | <td>{$form.first_name.label}</td> | |
36 | <td>{$form.middle_name.label}</td> | |
37 | <td>{$form.last_name.label}</td> | |
38 | <td>{$form.suffix_id.label}</td> | |
39 | </tr> | |
40 | <tr> | |
41 | <td>{$form.prefix_id.html}</td> | |
42 | <td>{$form.first_name.html}</td> | |
43 | <td>{$form.middle_name.html|crmAddClass:eight}</td> | |
44 | <td>{$form.last_name.html}</td> | |
45 | <td>{$form.suffix_id.html}</td> | |
46 | </tr> | |
47 | ||
48 | </table> | |
49 | {if $contactEditMode}</fieldset>{/if} | |
50 | ||
51 | ||
52 | {elseif $contact_type eq 'Household'} | |
53 | ||
54 | {if $contactEditMode}<fieldset><legend></legend>{/if} | |
55 | <table class="form-layout-compressed"> | |
56 | <tr> | |
57 | <td>{$form.household_name.label}</td> | |
58 | </tr> | |
59 | <tr> | |
60 | <td>{$form.household_name.html|crmAddClass:big}</td> | |
61 | </tr> | |
62 | </table> | |
63 | {if $contactEditMode}</fieldset>{/if} | |
64 | ||
65 | ||
66 | {elseif $contact_type eq 'Organization'} | |
67 | ||
68 | {if $contactEditMode} | |
69 | <fieldset><legend></legend> | |
70 | {/if} | |
71 | <div class="crm-section organizationName-section"> | |
6a488035 TO |
72 | <div id="create_org" class="crm-section create_org-section"> |
73 | <div class="label">{$form.organization_name.label}</div> | |
74 | <div class="content">{$form.organization_name.html|crmAddClass:big}</div> | |
75 | <div class="clear"></div> | |
76 | </div> | |
77 | </div> | |
78 | {if $contactEditMode} | |
79 | </fieldset> | |
80 | {/if} | |
81 | ||
82 | {/if} | |
83 | ||
84 | {* Display the address block *} | |
85 | {assign var=index value=1} | |
86 | ||
87 | {if $contactEditMode} | |
88 | <fieldset><legend>{ts}Phone and Email{/ts}</legend> | |
89 | <table class="form-layout-compressed"> | |
90 | <tr> | |
91 | <td class='label' width="25%">{$form.phone.$index.phone.label}</td> | |
92 | <td class='value'>{$form.phone.$index.phone.html}</td> | |
93 | </tr> | |
94 | <tr> | |
95 | <td class='label'>{$form.email.$index.email.label}</td> | |
96 | <td class='value'>{$form.email.$index.email.html}</td> | |
97 | </tr> | |
98 | </table> | |
99 | </fieldset> | |
100 | {/if} | |
101 | ||
102 | {if $contactEditMode}<fieldset><legend>{ts}Address{/ts}</legend>{/if} | |
103 | <div class="crm-section address-section"> | |
104 | {if !$contactEditMode} | |
105 | <div class="crm-section {$form.phone.$index.phone.id}-section"> | |
106 | <div class="label">{$form.phone.$index.phone.label}</div> | |
107 | <div class="content">{$form.phone.$index.phone.html}</div> | |
108 | <div class="clear"></div> | |
109 | </div> | |
110 | <div class="crm-section {$form.email.$index.email.id}-section"> | |
111 | <div class="label">{$form.email.$index.email.label}</div> | |
112 | <div class="content">{$form.email.$index.email.html}</div> | |
113 | <div class="clear"></div> | |
114 | </div> | |
115 | {/if} | |
116 | {if $addressSequence.street_address} | |
117 | <div class="crm-section {$form.address.$index.street_address.id}-section"> | |
118 | <div class="label">{$form.address.$index.street_address.label}</div> | |
119 | <div class="content">{$form.address.$index.street_address.html} | |
120 | <br class="spacer"/> | |
121 | <span class="description">{ts}Street number, street name, apartment/unit/suite - OR P.O. box{/ts}</span> | |
122 | </div> | |
123 | <div class="clear"></div> | |
124 | </div> | |
125 | {/if} | |
126 | {if $addressSequence.supplemental_address_1} | |
127 | <div class="crm-section {$form.address.$index.supplemental_address_1.id}-section"> | |
128 | <div class="label">{$form.address.$index.supplemental_address_1.label}</div> | |
129 | <div class="content">{$form.address.$index.supplemental_address_1.html} | |
130 | <br class="spacer"/> | |
131 | <span class="description">{ts}Supplemental address info, e.g. c/o, department name, building name, etc.{/ts}</span> | |
132 | </div> | |
133 | <div class="clear"></div> | |
134 | </div> | |
135 | {/if} | |
136 | {if $addressSequence.supplemental_address_2} | |
137 | <div class="crm-section {$form.address.$index.supplemental_address_2.id}-section"> | |
138 | <div class="label">{$form.address.$index.supplemental_address_2.label}</div> | |
139 | <div class="content">{$form.address.$index.supplemental_address_2.html}</div> | |
140 | <div class="clear"></div> | |
141 | </div> | |
142 | {/if} | |
143 | {if $addressSequence.city} | |
144 | <div class="crm-section {$form.address.$index.city.id}<-section"> | |
145 | <div class="label">{$form.address.$index.city.label}</div> | |
146 | <div class="content">{$form.address.$index.city.html}</div> | |
147 | <div class="clear"></div> | |
148 | </div> | |
149 | {/if} | |
150 | {if $addressSequence.postal_code} | |
151 | <div class="crm-section {$form.address.$index.postal_code.id}-section"> | |
152 | <div class="label">{$form.address.$index.postal_code.label}</div> | |
153 | <div class="content">{$form.address.$index.postal_code.html} | |
154 | {if $form.address.$index.postal_code_suffix.html} | |
155 | - {$form.address.$index.postal_code_suffix.html} | |
156 | <br class="spacer"/> | |
157 | <span class="description">{ts}Enter optional 'add-on' code after the dash ('plus 4' code for U.S. addresses).{/ts}</span> | |
158 | {/if} | |
159 | </div> | |
160 | <div class="clear"></div> | |
161 | </div> | |
162 | {/if} | |
163 | {if $addressSequence.country} | |
164 | <div class="crm-section {$form.address.$index.country_id.id}-section"> | |
165 | <div class="label">{$form.address.$index.country_id.label}</div> | |
166 | <div class="content">{$form.address.$index.country_id.html}</div> | |
167 | <div class="clear"></div> | |
168 | </div> | |
169 | {/if} | |
170 | {if $addressSequence.state_province} | |
171 | <div class="crm-section {$form.address.$index.state_province_id.id}-section"> | |
172 | <div class="label">{$form.address.$index.state_province_id.label}</div> | |
173 | <div class="content">{$form.address.$index.state_province_id.html}</div> | |
174 | <div class="clear"></div> | |
175 | </div> | |
176 | {/if} | |
177 | {if $contactEditMode and $form.location.$index.address.geo_code_1.label} | |
178 | <div class="crm-section {$form.address.$index.geo_code_1.id}-{$form.address.$index.geo_code_2.id}-section"> | |
179 | <div class="label">{$form.address.$index.geo_code_1.label}, {$form.address.$index.geo_code_2.label}</div> | |
180 | <div class="content">{$form.address.$index.geo_code_1.html}, {$form.address.$index.geo_code_2.html} | |
181 | <br class="spacer"/> | |
182 | <span class="description"> | |
183 | {ts}Latitude and longitude may be automatically populated by enabling a Mapping Provider.{/ts} {docURL page="user/initial-set-up/installation-and-basic-setup" text="(Refer to the Mapping and Geocoding section in the Installation and Basic Setup Chapter)"}</span> | |
184 | </div> | |
185 | <div class="clear"></div> | |
186 | </div> | |
187 | {/if} | |
188 | </div> | |
189 | ||
190 | {if $contactEditMode}</fieldset>{/if} | |
191 | ||
192 | </fieldset> | |
193 | ||
194 | {if $form.is_for_organization} | |
195 | {include file="CRM/common/showHideByFieldValue.tpl" | |
196 | trigger_field_id ="is_for_organization" | |
197 | trigger_value ="true" | |
198 | target_element_id ="for_organization" | |
199 | target_element_type ="block" | |
200 | field_type ="radio" | |
201 | invert = "false" | |
202 | } | |
203 | {/if} | |
204 | ||
205 | {if $relatedOrganizationFound} | |
206 | {include file="CRM/common/showHideByFieldValue.tpl" | |
207 | trigger_field_id ="org_option" | |
208 | trigger_value ="true" | |
209 | target_element_id ="select_org" | |
210 | target_element_type ="table-row" | |
211 | field_type ="radio" | |
212 | invert = "true" | |
213 | } | |
214 | {include file="CRM/common/showHideByFieldValue.tpl" | |
215 | trigger_field_id ="org_option" | |
216 | trigger_value ="true" | |
217 | target_element_id ="create_org" | |
218 | target_element_type ="table-row" | |
219 | field_type ="radio" | |
220 | invert = "false" | |
221 | } | |
222 | {/if} |