First commit

This commit is contained in:
Theodotos Andreou 2018-01-14 13:10:16 +00:00
commit c6e2478c40
13918 changed files with 2303184 additions and 0 deletions

View file

@ -0,0 +1,277 @@
{*
+--------------------------------------------------------------------+
| CiviCRM version 4.7 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2017 |
+--------------------------------------------------------------------+
| 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 |
+--------------------------------------------------------------------+
*}
<div class="crm-profile-name-{$ufGroupName}">
{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}
<div class="messages status no-popup">
<div class="icon inform-icon"></div>&nbsp;
{ts}Are you sure you want to delete this record?{/ts}
</div>
<div class="crm-submit-buttons">
<span class="crm-button">{$form._qf_Edit_upload_delete.html}</span>
<a class="button cancel" href="{$cancelURL}">{$cancelButtonText}</a>
</div>
{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 }
<div id="crm-profile-block" class="crm-container crm-public">
{else}
<div id="crm-container" class="crm-container crm-public" lang="{$config->lcMessages|truncate:2:"":true}" xml:lang="{$config->lcMessages|truncate:2:"":true}">
{/if}
{if $isDuplicate and ( ($action eq 1 and $mode eq 4 ) or ($action eq 2) or ($action eq 8192) ) }
<div class="crm-submit-buttons">
<span class="crm-button">{$form._qf_Edit_upload_duplicate.html}</span>
</div>
{/if}
{if $mode eq 1 || $activeComponent neq "CiviCRM"}
{include file="CRM/Form/body.tpl"}
{/if}
{strip}
{if $help_pre && $action neq 4}
<div class="messages help">{$help_pre}</div>
{/if}
{include file="CRM/common/CMSUser.tpl"}
{if $action eq 2 and $multiRecordFieldListing}
<h1>{ts}Edit Details{/ts}</h1>
<div class="crm-submit-buttons" style='float:right'>
{include file="CRM/common/formButtons.tpl"}{if $isDuplicate}<span class="crm-button">{$form._qf_Edit_upload_duplicate.html}</span>{/if}
</div>
{/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}
<div {if $context neq 'dialog'}id="profilewrap{$field.group_id}"{/if}>
<fieldset><legend>{$field.groupTitle}</legend>
{/if}
{assign var=fieldset value=`$field.groupTitle`}
{assign var=groupHelpPost value=`$field.groupHelpPost`}
{if $field.groupHelpPre}
<div class="messages help">{$field.groupHelpPre}</div>
{/if}
{/if}
{if $field.field_type eq "Formatting"}
{$field.help_pre}
{elseif $n}
{if $field.groupTitle != $fieldset}
{if $fieldset != $zeroField}
{if $groupHelpPost}
<div class="messages help">{$groupHelpPost}</div>
{/if}
{if $mode neq 8 && $mode neq 4}
</div><!-- end form-layout-compressed-div -->
</fieldset>
</div>
{/if}
{/if}
<div class="form-layout-compressed">
{/if}
{if $field.help_pre && $action neq 4 && $form.$n.html}
<div class="crm-section helprow-{$n}-section helprow-pre" id="helprow-{$n}">
<div class="content description">{$field.help_pre}</div>
</div>
{/if}
{if $field.options_per_line}
<div class="crm-section editrow_{$n}-section form-item" id="editrow-{$n}">
<div class="label">{$form.$n.label}</div>
<div class="content edit-value">
{assign var="count" value="1"}
{strip}
<table class="form-layout-compressed">
<tr>
{* 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}
<td class="labels font-light">{$form.$n.$key.html}</td>
{if $count == $field.options_per_line}
</tr>
<tr>
{assign var="count" value="1"}
{else}
{assign var="count" value=`$count+1`}
{/if}
{/if}
{/foreach}
</tr>
</table>
{/strip}
</div>
<div class="clear"></div>
</div>{* end of main edit section div*}
{else}
<div id="editrow-{$n}" class="crm-section editrow_{$n}-section form-item">
<div class="label">
{$form.$n.label}
</div>
<div class="edit-value content">
{if $n|substr:0:3 eq 'im-'}
{assign var="provider" value=$n|cat:"-provider_id"}
{$form.$provider.html}&nbsp;
{/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" tableLayout=1}
{elseif ( $form.$n.name eq 'image_URL' )}
{$form.$n.html}
{if !empty($imageURL)}
<div class="crm-section contact_image-section">
<div class="content">
{include file="CRM/Contact/Page/ContactImage.tpl"}
</div>
</div>
{/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}
&nbsp;{$form.$phone_ext_field.html}
{/if}
{else}
{$form.$n.html}
{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}
</div>
<div class="clear"></div>
</div>
{if $form.$n.type eq 'file'}
<div class="crm-section file_displayURL-section file_displayURL{$n}-section"><div class="content">{$customFiles.$n.displayURL}</div></div>
<div class="crm-section file_deleteURL-section file_deleteURL{$n}-section"><div class="content">{$customFiles.$n.deleteURL}</div></div>
{/if}
{/if}
{* Show explanatory text for field if not in 'view' mode *}
{if $field.help_post && $action neq 4 && $form.$n.html}
<div class="crm-section helprow-{$n}-section helprow-post" id="helprow-{$n}">
<div class="content description">{$field.help_post}</div>
</div>
{/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'}
<script type="text/javascript">cj('.recaptcha_label').attr('width', '140px');</script>
{/if}
{if $field.groupHelpPost}
<div class="messages help">{$field.groupHelpPost}</div>
{/if}
{if $mode neq 8 && $mode neq 4}
</fieldset>
</div>
{/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}
<div class="crm-submit-buttons" style='{$floatStyle}'>
{include file="CRM/common/formButtons.tpl"}{if $isDuplicate}<span class="crm-button">{$form._qf_Edit_upload_duplicate.html}</span>{/if}
<a class="button cancel" href="{$cancelURL}">
<span>
<i class="crm-i fa-times"></i>
{$cancelButtonText}
</span>
</a>
</div>
{/if}
{if $help_post && $action neq 4}<br /><div class="messages help">{$help_post}</div>{/if}
{/strip}
</div> {* end crm-container div *}
<script type="text/javascript">
{if $drupalCms}
{literal}
if ( document.getElementsByName("cms_create_account")[0].checked ) {
cj('#details').show();
}
else {
cj('#details').hide();
}
{/literal}
{/if}
</script>
{/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}
<div class="messages status no-popup">
<div class="icon inform-icon"></div>
{$statusMessage}
</div>
{/if}
{/if} {*end of if for $deleteRecord*}
{literal}
<script type="text/javascript">
CRM.$(function($) {
cj('#selector tr:even').addClass('odd-row ');
cj('#selector tr:odd ').addClass('even-row');
});
{/literal}
</script>
{/crmRegion}
</div> {* end crm-profile-NAME *}

View file

@ -0,0 +1,26 @@
{*
+--------------------------------------------------------------------+
| CiviCRM version 4.7 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2017 |
+--------------------------------------------------------------------+
| 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 |
+--------------------------------------------------------------------+
*}
{include file="CRM/Profile/Form/Dynamic.tpl"}

View file

@ -0,0 +1,47 @@
{*
+--------------------------------------------------------------------+
| CiviCRM version 4.7 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2017 |
+--------------------------------------------------------------------+
| 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 |
+--------------------------------------------------------------------+
*}
{assign var="customGreeting" value=$n|cat:"_custom"}
<span>{$form.$n.html|crmAddClass:big}</span>&nbsp;<span id="{$customGreeting}_html" class="hiddenElement">{$form.$customGreeting.html|crmAddClass:big}</span>
<script type="text/javascript">
var fieldName = '{$n}';
{literal}
cj( "#" + fieldName ).change( function( ) {
var fldName = cj(this).attr( 'id' );
showCustom( fldName, cj(this).val( ) );
});
showCustom( fieldName, cj( "#" + fieldName ).val( ) );
function showCustom( fldName, value ) {
if ( value == 4 ) {
cj( "#" + fldName + "_custom_html").show( );
} else {
cj( "#" + fldName + "_custom_html").hide( );
cj( "#" + fldName + "_custom" ).val('');
}
}
{/literal}
</script>

View file

@ -0,0 +1,124 @@
{*
+--------------------------------------------------------------------+
| CiviCRM version 4.7 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2017 |
+--------------------------------------------------------------------+
| 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 |
+--------------------------------------------------------------------+
*}
{if ! empty( $fields )}
{if $groupId }
<div class="crm-accordion-wrapper crm-group-{$groupId}-accordion {if $rows}collapsed{/if}">
<div class="crm-accordion-header crm-master-accordion-header">
{ts}Edit Search Criteria{/ts}
</div>
<div class="crm-accordion-body">
{else}
<div>
{/if}
<table class="form-layout-compressed" id="profile">
{foreach from=$fields item=field key=fieldName}
{if $field.skipDisplay}
{continue}
{/if}
{assign var=n value=$field.name}
{assign var="operator_name" value=$n|cat:'_operator'}
{if $field.is_search_range}
{assign var=from value=$field.name|cat:'_from'}
{assign var=to value=$field.name|cat:'_to'}
<tr>
<td class="label">{$form.$from.label}</td>
<td class="description">{$form.$from.html}&nbsp;&nbsp;{$form.$to.label}&nbsp;&nbsp;{$form.$to.html}</td>
</tr>
{else}
<tr>
<td class="label">
{$form.$n.label}
</td>
{if $n eq 'addressee' or $n eq 'email_greeting' or $n eq 'postal_greeting'}
<td class="description">
{include file="CRM/Profile/Form/GreetingType.tpl"}
</td>
{elseif $n eq 'group'}
<td>
<table id="selector" class="selector" style="width:auto;">
<tr><td>{$form.$n.html}{* quickform add closing </td> </tr>*}
</table>
</td>
{else}
<td class="description">
{if $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}
&nbsp;{$form.$phone_ext_field.html}
{/if}
{else}
{$form.$n.html}
{/if}
{if $field.html_type eq 'Autocomplete-Select' and $field.data_type eq 'ContactReference'}
{include file="CRM/Custom/Form/ContactReference.tpl" element_name = $n}
{/if}
{if !empty($form.$operator_name)}
<span class="crm-multivalue-search-op" for="{$n}">{$form.$operator_name.html}</span>
{assign var="add_multivalue_js" value=true}
{/if}
</td>
{/if}
</tr>
{/if}
{/foreach}
{if $proximity_search}
<tr><td colspan="2">{include file="CRM/Contact/Form/Task/ProximityCommon.tpl"}</td></tr>
{/if}
<tr><td></td><td>{include file="CRM/common/formButtons.tpl"}</td></tr>
</table>
{if $groupId}
</div><!-- /.crm-accordion-body -->
</div><!-- /.crm-accordion-wrapper -->
{/if}
{elseif $statusMessage}
<div class="messages status no-popup">
<div class="icon inform-icon"></div>
{$statusMessage}
</div>
{else} {* empty fields *}
<div class="messages status no-popup">
<div class="icon inform-icon"></div>
{ts}No fields in this Profile have been configured as searchable. Ask the site administrator to check the Profile setup.{/ts}
</div>
{/if}
{literal}
<script type="text/javascript">
CRM.$(function($) {
$('#selector tr:even').addClass('odd-row ');
$('#selector tr:odd ').addClass('even-row');
});
</script>
{/literal}
{if !empty($add_multivalue_js)}
{include file="CRM/Custom/Form/MultiValueSearch.js.tpl"}
{/if}