{* +--------------------------------------------------------------------+ | CiviCRM version 4.5 | +--------------------------------------------------------------------+ | Copyright CiviCRM LLC (c) 2004-2014 | +--------------------------------------------------------------------+ | This file is a part of CiviCRM. | | | | CiviCRM is free software; you can copy, modify, and distribute it | | under the terms of the GNU Affero General Public License | | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. | | | | CiviCRM is distributed in the hope that it will be useful, but | | WITHOUT ANY WARRANTY; without even the implied warranty of | | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | | See the GNU Affero General Public License for more details. | | | | You should have received a copy of the GNU Affero General Public | | License and the CiviCRM Licensing Exception along | | with this program; if not, contact CiviCRM LLC | | at info[AT]civicrm[DOT]org. If you have questions about the | | GNU Affero General Public License or the licensing of CiviCRM, | | see the CiviCRM license FAQ at http://civicrm.org/licensing | +--------------------------------------------------------------------+ *}
{crmRegion name=profile-form-`$ufGroupName`} {* Profile forms when embedded in CMS account create (mode=1) or cms account edit (mode=8) or civicrm/profile (mode=4) pages *} {if $deleteRecord}
  {ts}Are you sure you want to delete this record?{/ts}
{$form._qf_Edit_upload_delete.html}
{include file="CRM/common/formButtons.tpl"}
{else} {if ! empty( $fields )} {* Wrap in crm-container div so crm styles are used.*} {* 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" *} {if $action eq 1 or $action eq 2 or $action eq 4 }
{else}
{/if} {if $isDuplicate and ( ($action eq 1 and $mode eq 4 ) or ($action eq 2) or ($action eq 8192) ) }
{$form._qf_Edit_upload_duplicate.html}
{/if} {if $mode eq 1 || $activeComponent neq "CiviCRM"} {include file="CRM/Form/body.tpl"} {/if} {strip} {if $help_pre && $action neq 4}
{$help_pre}
{/if} {include file="CRM/common/CMSUser.tpl"} {if $action eq 2 and $multiRecordFieldListing}

{ts}Edit Details{/ts}

{include file="CRM/common/formButtons.tpl"}{if $isDuplicate}{$form._qf_Edit_upload_duplicate.html}{/if}
{/if} {assign var=zeroField value="Initial Non Existent Fieldset"} {assign var=fieldset value=$zeroField} {foreach from=$fields item=field key=fieldName} {if $field.skipDisplay} {continue} {/if} {assign var="profileID" value=$field.group_id} {assign var=n value=$field.name} {if $field.groupTitle != $fieldset} {if $mode neq 8 && $mode neq 4}
{$field.groupTitle} {/if} {assign var=fieldset value=`$field.groupTitle`} {assign var=groupHelpPost value=`$field.groupHelpPost`} {if $field.groupHelpPre}
{$field.groupHelpPre}
{/if} {/if} {if $field.field_type eq "Formatting"} {$field.help_pre} {elseif $n} {if $field.groupTitle != $fieldset} {if $fieldset != $zeroField} {if $groupHelpPost}
{$groupHelpPost}
{/if} {if $mode neq 8 && $mode neq 4}
{/if} {/if}
{/if} {if $field.help_pre && $action neq 4 && $form.$n.html}
{$field.help_pre}
{/if} {if $field.options_per_line}
{$form.$n.label}
{assign var="count" value="1"} {strip} {* sort by fails for option per line. Added a variable to iterate through the element array*} {assign var="index" value="1"} {foreach name=outer key=key item=item from=$form.$n} {if $index < 10} {assign var="index" value=`$index+1`} {else} {if $count == $field.options_per_line} {assign var="count" value="1"} {else} {assign var="count" value=`$count+1`} {/if} {/if} {/foreach}
{$form.$n.$key.html}
{/strip}
{* end of main edit section div*} {else}
{$form.$n.label}
{if $n|substr:0:3 eq 'im-'} {assign var="provider" value=$n|cat:"-provider_id"} {$form.$provider.html}  {elseif $n|substr:0:4 eq 'url-'} {assign var="websiteType" value=$n|cat:"-website_type_id"} {$form.$websiteType.html}  {/if} {if $n eq 'email_greeting' or $n eq 'postal_greeting' or $n eq 'addressee'} {include file="CRM/Profile/Form/GreetingType.tpl"} {elseif ( $n eq 'group' && $form.group ) || ( $n eq 'tag' && $form.tag )} {include file="CRM/Contact/Form/Edit/TagsAndGroups.tpl" type=$n context="profile"} {elseif ( $form.$n.name eq 'image_URL' )} {$form.$n.html} {if !empty($imageURL)}
{include file="CRM/Contact/Page/ContactImage.tpl"}
{/if} {elseif $n|substr:0:5 eq 'phone'} {assign var="phone_ext_field" value=$n|replace:'phone':'phone_ext'} {$form.$n.html} {if $form.$phone_ext_field.html}  {$form.$phone_ext_field.html} {/if} {else} {if ( $field.data_type eq 'Date' or ( ( ( $n eq 'birth_date' ) or ( $n eq 'deceased_date' ) or ( $n eq 'activity_date_time' ) ) ) ) and $field.is_view neq 1 } {include file="CRM/common/jcalendar.tpl" elementName=$n} {else} {$form.$n.html} {/if} {if $field.html_type eq 'Autocomplete-Select'} {if $field.data_type eq 'ContactReference'} {include file="CRM/Custom/Form/ContactReference.tpl" element_name = $n} {/if} {/if} {/if}
{if $form.$n.type eq 'file'}
{$customFiles.$n.displayURL}
{$customFiles.$n.deleteURL}
{/if} {/if} {* Show explanatory text for field if not in 'view' mode *} {if $field.help_post && $action neq 4 && $form.$n.html}
{$field.help_post}
{/if} {/if}{* end of main if field name if *} {/foreach} {if $isCaptcha && ( $mode eq 8 || $mode eq 4 || $mode eq 1 ) } {include file='CRM/common/ReCAPTCHA.tpl'} {/if} {if $field.groupHelpPost}
{$field.groupHelpPost}
{/if} {if $mode neq 8 && $mode neq 4}
{/if} {if ($action eq 1 and $mode eq 4 ) or ($action eq 2) or ($action eq 8192)} {if $action eq 2 and $multiRecordFieldListing} {include file="CRM/Profile/Page/MultipleRecordFieldsListing.tpl" showListing=true} {assign var=floatStyle value='float:right'} {/if}
{include file="CRM/common/formButtons.tpl"}{if $isDuplicate}{$form._qf_Edit_upload_duplicate.html}{/if}
{/if} {if $help_post && $action neq 4}
{$help_post}
{/if} {/strip}
{* end crm-container div *} {/if} {* fields array is not empty *} {if $multiRecordFieldListing and empty($fields)} {include file="CRM/Profile/Page/MultipleRecordFieldsListing.tpl" showListing=true} {/if} {if $drupalCms} {include file="CRM/common/showHideByFieldValue.tpl" trigger_field_id ="create_account" trigger_value ="" target_element_id ="details" target_element_type ="block" field_type ="radio" invert = 0 } {elseif $statusMessage}
{$statusMessage}
{/if} {/if} {*end of if for $deleteRecord*} {literal} {/crmRegion}
{* end crm-profile-NAME *}