2 +--------------------------------------------------------------------+
3 | CiviCRM version 4.6 |
4 +--------------------------------------------------------------------+
5 | Copyright CiviCRM LLC (c) 2004-2014 |
6 +--------------------------------------------------------------------+
7 | This file is a part of CiviCRM. |
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. |
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. |
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 +--------------------------------------------------------------------+
26 <div class="crm-profile-name-{$ufGroupName}">
27 {crmRegion name=profile-form-`$ufGroupName`}
29 {* Profile forms when embedded in CMS account create (mode=1) or
30 cms account edit (mode=8) or civicrm/profile (mode=4) pages *}
32 <div class="messages status no-popup">
33 <div class="icon inform-icon"></div>
34 {ts}Are you sure you want to delete this record?{/ts}
37 <div class="crm-submit-buttons">
38 <span class="crm-button">{$form._qf_Edit_upload_delete.html}</span>
39 <a class="button cancel" href="{$cancelURL}">{ts}Cancel{/ts}</a>
42 {if ! empty( $fields )}
43 {* Wrap in crm-container div so crm styles are used.*}
44 {* Replace div id "crm-container" only when profile is not loaded in civicrm container, i.e for profile shown in my account and in profile standalone mode otherwise id should be "crm-profile-block" *}
46 {if $action eq 1 or $action eq 2 or $action eq 4 }
47 <div id="crm-profile-block" class="crm-container crm-public">
49 <div id="crm-container" class="crm-container crm-public" lang="{$config->lcMessages|truncate:2:"":true}" xml:lang="{$config->lcMessages|truncate:2:"":true}">
52 {if $isDuplicate and ( ($action eq 1 and $mode eq 4 ) or ($action eq 2) or ($action eq 8192) ) }
53 <div class="crm-submit-buttons">
54 <span class="crm-button">{$form._qf_Edit_upload_duplicate.html}</span>
57 {if $mode eq 1 || $activeComponent neq "CiviCRM"}
58 {include file="CRM/Form/body.tpl"}
61 {if $help_pre && $action neq 4}
62 <div class="messages help">{$help_pre}</div>
65 {include file="CRM/common/CMSUser.tpl"}
67 {if $action eq 2 and $multiRecordFieldListing}
68 <h1>{ts}Edit Details{/ts}</h1>
69 <div class="crm-submit-buttons" style='float:right'>
70 {include file="CRM/common/formButtons.tpl"}{if $isDuplicate}<span class="crm-button">{$form._qf_Edit_upload_duplicate.html}</span>{/if}
74 {assign var=zeroField value="Initial Non Existent Fieldset"}
75 {assign var=fieldset value=$zeroField}
76 {foreach from=$fields item=field key=fieldName}
77 {if $field.skipDisplay}
80 {assign var="profileID" value=$field.group_id}
81 {assign var=n value=$field.name}
82 {if $field.groupTitle != $fieldset}
83 {if $mode neq 8 && $mode neq 4}
84 <div {if $context neq 'dialog'}id="profilewrap{$field.group_id}"{/if}>
85 <fieldset><legend>{$field.groupTitle}</legend>
87 {assign var=fieldset value=`$field.groupTitle`}
88 {assign var=groupHelpPost value=`$field.groupHelpPost`}
89 {if $field.groupHelpPre}
90 <div class="messages help">{$field.groupHelpPre}</div>
93 {if $field.field_type eq "Formatting"}
96 {if $field.groupTitle != $fieldset}
97 {if $fieldset != $zeroField}
99 <div class="messages help">{$groupHelpPost}</div>
101 {if $mode neq 8 && $mode neq 4}
102 </div><!-- end form-layout-compressed-div -->
107 <div class="form-layout-compressed">
109 {if $field.help_pre && $action neq 4 && $form.$n.html}
110 <div class="crm-section helprow-{$n}-section" id="helprow-{$n}">
111 <div class="content description">{$field.help_pre}</div>
114 {if $field.options_per_line}
115 <div class="crm-section editrow_{$n}-section form-item" id="editrow-{$n}">
116 <div class="label">{$form.$n.label}</div>
117 <div class="content edit-value">
118 {assign var="count" value="1"}
120 <table class="form-layout-compressed">
122 {* sort by fails for option per line. Added a variable to iterate through the element array*}
123 {assign var="index" value="1"}
124 {foreach name=outer key=key item=item from=$form.$n}
126 {assign var="index" value=`$index+1`}
128 <td class="labels font-light">{$form.$n.$key.html}</td>
129 {if $count == $field.options_per_line}
132 {assign var="count" value="1"}
134 {assign var="count" value=`$count+1`}
142 <div class="clear"></div>
143 </div>{* end of main edit section div*}
145 <div id="editrow-{$n}" class="crm-section editrow_{$n}-section form-item">
149 <div class="edit-value content">
150 {if $n|substr:0:3 eq 'im-'}
151 {assign var="provider" value=$n|cat:"-provider_id"}
152 {$form.$provider.html}
153 {elseif $n|substr:0:4 eq 'url-'}
154 {assign var="websiteType" value=$n|cat:"-website_type_id"}
155 {$form.$websiteType.html}
157 {if $n eq 'email_greeting' or $n eq 'postal_greeting' or $n eq 'addressee'}
158 {include file="CRM/Profile/Form/GreetingType.tpl"}
159 {elseif ( $n eq 'group' && $form.group ) || ( $n eq 'tag' && $form.tag )}
160 {include file="CRM/Contact/Form/Edit/TagsAndGroups.tpl" type=$n context="profile"}
161 {elseif ( $form.$n.name eq 'image_URL' )}
163 {if !empty($imageURL)}
164 <div class="crm-section contact_image-section">
165 <div class="content">
166 {include file="CRM/Contact/Page/ContactImage.tpl"}
170 {elseif $n|substr:0:5 eq 'phone'}
171 {assign var="phone_ext_field" value=$n|replace:'phone':'phone_ext'}
173 {if $form.$phone_ext_field.html}
174 {$form.$phone_ext_field.html}
177 {if ( $field.data_type eq 'Date' or
178 ( ( ( $n eq 'birth_date' ) or ( $n eq 'deceased_date' ) or ( $n eq 'activity_date_time' ) ) ) ) and $field.is_view neq 1 }
179 {include file="CRM/common/jcalendar.tpl" elementName=$n}
183 {if $field.html_type eq 'Autocomplete-Select'}
184 {if $field.data_type eq 'ContactReference'}
185 {include file="CRM/Custom/Form/ContactReference.tpl" element_name = $n}
190 <div class="clear"></div>
193 {if $form.$n.type eq 'file'}
194 <div class="crm-section file_displayURL-section file_displayURL{$n}-section"><div class="content">{$customFiles.$n.displayURL}</div></div>
195 <div class="crm-section file_deleteURL-section file_deleteURL{$n}-section"><div class="content">{$customFiles.$n.deleteURL}</div></div>
199 {* Show explanatory text for field if not in 'view' mode *}
200 {if $field.help_post && $action neq 4 && $form.$n.html}
201 <div class="crm-section helprow-{$n}-section" id="helprow-{$n}">
202 <div class="content description">{$field.help_post}</div>
205 {/if}{* end of main if field name if *}
208 {if $isCaptcha && ( $mode eq 8 || $mode eq 4 || $mode eq 1 ) }
209 {include file='CRM/common/ReCAPTCHA.tpl'}
210 <script type="text/javascript">cj('.recaptcha_label').attr('width', '140px');</script>
213 {if $field.groupHelpPost}
214 <div class="messages help">{$field.groupHelpPost}</div>
217 {if $mode neq 8 && $mode neq 4}
222 {if ($action eq 1 and $mode eq 4 ) or ($action eq 2) or ($action eq 8192)}
223 {if $action eq 2 and $multiRecordFieldListing}
224 {include file="CRM/Profile/Page/MultipleRecordFieldsListing.tpl" showListing=true}
225 {assign var=floatStyle value='float:right'}
227 <div class="crm-submit-buttons" style='{$floatStyle}'>
228 {include file="CRM/common/formButtons.tpl"}{if $isDuplicate}<span class="crm-button">{$form._qf_Edit_upload_duplicate.html}</span>{/if}
229 <a class="button cancel" href="{$cancelURL}">{ts}Cancel{/ts}</a>
232 {if $help_post && $action neq 4}<br /><div class="messages help">{$help_post}</div>{/if}
235 </div> {* end crm-container div *}
237 <script type="text/javascript">
240 if ( document.getElementsByName("cms_create_account")[0].checked ) {
241 cj('#details').show();
244 cj('#details').hide();
249 {/if} {* fields array is not empty *}
250 {if $multiRecordFieldListing and empty($fields)}
251 {include file="CRM/Profile/Page/MultipleRecordFieldsListing.tpl" showListing=true}
254 {include file="CRM/common/showHideByFieldValue.tpl"
255 trigger_field_id ="create_account"
257 target_element_id ="details"
258 target_element_type ="block"
262 {elseif $statusMessage}
263 <div class="messages status no-popup">
264 <div class="icon inform-icon"></div>
268 {/if} {*end of if for $deleteRecord*}
270 <script type="text/javascript">
273 cj('#selector tr:even').addClass('odd-row ');
274 cj('#selector tr:odd ').addClass('even-row');
280 </div> {* end crm-profile-NAME *}