2 +--------------------------------------------------------------------+
4 +--------------------------------------------------------------------+
5 | Copyright CiviCRM LLC (c) 2004-2019 |
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 {if $includeCancelButton}
40 <a class="button cancel" href="{$cancelURL}">{$cancelButtonText}</a>
44 {if ! empty( $fields )}
45 {* Wrap in crm-container div so crm styles are used.*}
46 {* 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" *}
48 {if $action eq 1 or $action eq 2 or $action eq 4 }
49 <div id="crm-profile-block" class="crm-container crm-public">
51 <div id="crm-container" class="crm-container crm-public" lang="{$config->lcMessages|truncate:2:"":true}" xml:lang="{$config->lcMessages|truncate:2:"":true}">
54 {if $isDuplicate and ( ($action eq 1 and $mode eq 4 ) or ($action eq 2) or ($action eq 8192) ) }
55 <div class="crm-submit-buttons">
56 <span class="crm-button">{$form._qf_Edit_upload_duplicate.html}</span>
59 {if $mode eq 1 || $activeComponent neq "CiviCRM"}
60 {include file="CRM/Form/body.tpl"}
63 {if $help_pre && $action neq 4}
64 <div class="messages help">{$help_pre}</div>
67 {include file="CRM/common/CMSUser.tpl"}
69 {if $action eq 2 and $multiRecordFieldListing}
70 <h1>{ts}Edit Details{/ts}</h1>
71 <div class="crm-submit-buttons" style='float:right'>
72 {include file="CRM/common/formButtons.tpl"}{if $isDuplicate}<span class="crm-button">{$form._qf_Edit_upload_duplicate.html}</span>{/if}
76 {assign var=zeroField value="Initial Non Existent Fieldset"}
77 {assign var=fieldset value=$zeroField}
78 {foreach from=$fields item=field key=fieldName}
79 {if $field.skipDisplay}
82 {assign var="profileID" value=$field.group_id}
83 {assign var=n value=$field.name}
84 {if $field.groupTitle != $fieldset}
85 {if $mode neq 8 && $mode neq 4}
86 <div {if $context neq 'dialog'}id="profilewrap{$field.group_id}"{/if}>
87 <fieldset><legend>{$field.groupTitle}</legend>
89 {assign var=fieldset value=`$field.groupTitle`}
90 {assign var=groupHelpPost value=`$field.groupHelpPost`}
91 {if $field.groupHelpPre}
92 <div class="messages help">{$field.groupHelpPre}</div>
95 {if $field.field_type eq "Formatting"}
98 {if $field.groupTitle != $fieldset}
99 {if $fieldset != $zeroField}
101 <div class="messages help">{$groupHelpPost}</div>
103 {if $mode neq 8 && $mode neq 4}
104 </div><!-- end form-layout-compressed-div -->
109 <div class="form-layout-compressed">
111 {if $field.help_pre && $action neq 4 && $form.$n.html}
112 <div class="crm-section helprow-{$n}-section helprow-pre" id="helprow-{$n}">
113 <div class="content description">{$field.help_pre}</div>
116 {if $field.options_per_line}
117 <div class="crm-section editrow_{$n}-section form-item" id="editrow-{$n}">
118 <div class="label">{$form.$n.label}</div>
119 <div class="content edit-value">
120 {assign var="count" value="1"}
122 <table class="form-layout-compressed">
124 {* sort by fails for option per line. Added a variable to iterate through the element array*}
125 {assign var="index" value="1"}
126 {foreach name=outer key=key item=item from=$form.$n}
128 {assign var="index" value=`$index+1`}
130 <td class="labels font-light">{$form.$n.$key.html}</td>
131 {if $count == $field.options_per_line}
134 {assign var="count" value="1"}
136 {assign var="count" value=`$count+1`}
144 <div class="clear"></div>
145 </div>{* end of main edit section div*}
147 <div id="editrow-{$n}" class="crm-section editrow_{$n}-section form-item">
151 <div class="edit-value content">
152 {if $n|substr:0:3 eq 'im-'}
153 {assign var="provider" value=$n|cat:"-provider_id"}
154 {$form.$provider.html}
156 {if $n eq 'email_greeting' or $n eq 'postal_greeting' or $n eq 'addressee'}
157 {include file="CRM/Profile/Form/GreetingType.tpl"}
158 {elseif ( $n eq 'group' && $form.group ) || ( $n eq 'tag' && $form.tag )}
159 {include file="CRM/Contact/Form/Edit/TagsAndGroups.tpl" type=$n context="profile" tableLayout=1}
160 {elseif ( $form.$n.name eq 'image_URL' )}
162 {if !empty($imageURL)}
163 <div class="crm-section contact_image-section">
164 <div class="content">
165 {include file="CRM/Contact/Page/ContactImage.tpl"}
169 {elseif $n|substr:0:5 eq 'phone'}
170 {assign var="phone_ext_field" value=$n|replace:'phone':'phone_ext'}
172 {if $form.$phone_ext_field.html}
173 {$form.$phone_ext_field.html}
177 {if $field.html_type eq 'Autocomplete-Select'}
178 {if $field.data_type eq 'ContactReference'}
179 {include file="CRM/Custom/Form/ContactReference.tpl" element_name = $n}
184 <div class="clear"></div>
187 {if $form.$n.type eq 'file'}
188 <div class="crm-section file_displayURL-section file_displayURL{$n}-section"><div class="content">{$customFiles.$n.displayURL}</div></div>
189 <div class="crm-section file_deleteURL-section file_deleteURL{$n}-section"><div class="content">{$customFiles.$n.deleteURL}</div></div>
193 {* Show explanatory text for field if not in 'view' mode *}
194 {if $field.help_post && $action neq 4 && $form.$n.html}
195 <div class="crm-section helprow-{$n}-section helprow-post" id="helprow-{$n}">
196 <div class="content description">{$field.help_post}</div>
199 {/if}{* end of main if field name if *}
202 {if $isCaptcha && ( $mode eq 8 || $mode eq 4 || $mode eq 1 ) }
203 {include file='CRM/common/ReCAPTCHA.tpl'}
204 <script type="text/javascript">cj('.recaptcha_label').attr('width', '140px');</script>
207 {if $field.groupHelpPost}
208 <div class="messages help">{$field.groupHelpPost}</div>
211 {if $mode neq 8 && $mode neq 4}
216 {if ($action eq 1 and $mode eq 4 ) or ($action eq 2) or ($action eq 8192)}
217 {if $action eq 2 and $multiRecordFieldListing}
218 {include file="CRM/Profile/Page/MultipleRecordFieldsListing.tpl" showListing=true}
219 {assign var=floatStyle value='float:right'}
221 <div class="crm-submit-buttons" style='{$floatStyle}'>
222 {include file="CRM/common/formButtons.tpl"}{if $isDuplicate}<span class="crm-button">{$form._qf_Edit_upload_duplicate.html}</span>{/if}
223 {if $includeCancelButton}
224 <a class="button cancel" href="{$cancelURL}">
226 <i class="crm-i fa-times"></i>
233 {if $help_post && $action neq 4}<br /><div class="messages help">{$help_post}</div>{/if}
236 </div> {* end crm-container div *}
238 <script type="text/javascript">
241 if ( document.getElementsByName("cms_create_account")[0].checked ) {
242 cj('#details').show();
245 cj('#details').hide();
250 {/if} {* fields array is not empty *}
251 {if $multiRecordFieldListing and empty($fields)}
252 {include file="CRM/Profile/Page/MultipleRecordFieldsListing.tpl" showListing=true}
255 {include file="CRM/common/showHideByFieldValue.tpl"
256 trigger_field_id ="create_account"
258 target_element_id ="details"
259 target_element_type ="block"
263 {elseif $statusMessage}
264 <div class="messages status no-popup">
265 <div class="icon inform-icon"></div>
269 {/if} {*end of if for $deleteRecord*}
271 <script type="text/javascript">
274 cj('#selector tr:even').addClass('odd-row ');
275 cj('#selector tr:odd ').addClass('even-row');
281 </div> {* end crm-profile-NAME *}