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,104 @@
{*
+--------------------------------------------------------------------+
| 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-accordion-wrapper collapsed">
<div class="crm-accordion-header">
Advanced Settings
</div><!-- /.crm-accordion-header -->
<div class="crm-accordion-body">
<div class="crm-block crm-form-block crm-uf-advancesetting-form-block">
<table class="form-layout">
<tr class="crm-uf-advancesetting-form-block-group">
<td class="label">{$form.group.label}</td>
<td>{$form.group.html} {help id='id-limit_group' file="CRM/UF/Form/Group.hlp"}</td>
</tr>
<tr class="crm-uf-advancesetting-form-block-add_contact_to_group">
<td class="label">{$form.add_contact_to_group.label}</td>
<td>{$form.add_contact_to_group.html} {help id='id-add_group' file="CRM/UF/Form/Group.hlp"}</td>
</tr>
<tr class="crm-uf-advancesetting-form-block-notify">
<td class="label">{$form.notify.label}</td>
<td>{$form.notify.html} {help id='id-notify_email' file="CRM/UF/Form/Group.hlp"}</td>
</tr>
<tr class="crm-uf-advancesetting-form-block-post_URL">
<td class="label">{$form.post_URL.label}</td>
<td>{$form.post_URL.html} {help id='id-post_URL' file="CRM/UF/Form/Group.hlp"}</td>
</tr>
<tr class="crm-uf-advancesetting-form-block-cancel_URL">
<td class="label">{$form.cancel_URL.label}</td>
<td>{$form.cancel_URL.html} {help id='id-cancel_URL' file="CRM/UF/Form/Group.hlp"}</td>
</tr>
<tr class="crm-uf-advancesetting-form-block-cancel_button_text">
<td class="label">{$form.cancel_button_text.label}</td>
<td>{$form.cancel_button_text.html} {help id='id-cancel_button_text' file="CRM/UF/Form/Group.hlp"}</td>
</tr>
<tr class="crm-uf-advancesetting-form-block-submit_button_text">
<td class="label">{$form.submit_button_text.label}</td>
<td>{$form.submit_button_text.html} {help id='id-submit_button_text' file="CRM/UF/Form/Group.hlp"}</td>
</tr>
<tr class="crm-uf-advancesetting-form-block-add_captcha">
<td class="label"></td>
<td>{$form.add_captcha.html} {$form.add_captcha.label} {help id='id-add_captcha' file="CRM/UF/Form/Group.hlp"}</td>
</tr>
<tr class="crm-uf-advancesetting-form-block-is_cms_user">
<td class="label">{$form.is_cms_user.label}</td>
<td>{$form.is_cms_user.html} {help id='id-is_cms_user' file="CRM/UF/Form/Group.hlp"}</td>
</tr>
<tr class="crm-uf-advancesetting-form-block-is_update_dupe">
<td class="label">{$form.is_update_dupe.label}</td>
<td>{$form.is_update_dupe.html} {help id='id-is_update_dupe' file="CRM/UF/Form/Group.hlp"}</td>
</tr>
<tr class="crm-uf-advancesetting-form-block-is_proximity_search">
<td class="label">{$form.is_proximity_search.label}</td>
<td>{$form.is_proximity_search.html} {help id='id-is_proximity_search' file="CRM/UF/Form/Group.hlp"}</td></tr>
<tr class="crm-uf-advancesetting-form-block-is_map">
<td class="label"></td>
<td>{$form.is_map.html} {$form.is_map.label} {help id='id-is_map' file="CRM/UF/Form/Group.hlp"}</td>
</tr>
<tr class="crm-uf-advancesetting-form-block-is_edit_link">
<td class="label"></td>
<td>{$form.is_edit_link.html} {$form.is_edit_link.label} {help id='id-is_edit_link' file="CRM/UF/Form/Group.hlp"}</td>
</tr>
<tr class="crm-uf-advancesetting-form-block-is_uf_link">
<td class="label"></td>
<td>{$form.is_uf_link.html} {$form.is_uf_link.label} {help id='id-is_uf_link' file="CRM/UF/Form/Group.hlp"}</td>
</tr>
</table>
</div><!-- / .crm-block -->
</div><!-- /.crm-accordion-body -->
</div><!-- /.crm-accordion-wrapper -->

View file

@ -0,0 +1,60 @@
{*
+--------------------------------------------------------------------+
| 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 |
+--------------------------------------------------------------------+
*}
{* Edit or display Profile fields, when embedded in an online contribution or event registration form. *}
{if ! empty( $fields )}
{strip}
{if $help_pre && $action neq 4}<div class="messages help">{$help_pre}</div>{/if}
{assign var=zeroField value="Initial Non Existent Fieldset"}
{assign var=fieldset value=$zeroField}
{include file="CRM/UF/Form/Fields.tpl"}
{if $field.groupHelpPost && $action neq 4 && $action neq 1028}
<div class="messages help">{$field.groupHelpPost}</div>
{/if}
{if $mode eq 4}
<div class="crm-submit-buttons">
{$form.buttons.html}
</div>
{/if}
{if $mode ne 8 && $action neq 1028 && !$hideFieldset}
</fieldset>
{/if}
{if $help_post && $action neq 4}<br /><div class="messages help">{$help_post}</div>{/if}
{/strip}
{/if} {* fields array is not empty *}
{literal}
<script type="text/javascript">
CRM.$(function($) {
$('#selector tr:even').addClass('odd-row');
$('#selector tr:odd ').addClass('even-row');
});
</script>
{/literal}

View file

@ -0,0 +1,110 @@
{htxt id='field_name_0-title'}
{ts}Field Name{/ts}
{/htxt}
{htxt id='field_name_0'}
{capture assign="ltURL"}{crmURL p="civicrm/admin/locationType" q="reset=1"}{/capture}
<p>
{ts}Choose the field to add to the profile.{/ts}<br/>
<strong>{ts}Restrictions:{/ts}</strong><br/>
{ts}Only one field of each communication type (EG. phone) can use the primary location type.{/ts}
</p>
<p>
{ts 1=$ltURL}When you choose the primary location type the collected data will use the default location type from the <a href="%1">Location types</a> setup.{/ts}
</p>
{/htxt}
{htxt id='label-title'}
{ts}Field Label{/ts}
{/htxt}
{htxt id='label'}
<p>
{ts}The field label displayed on the form (over-ride the default field label here, if desired).{/ts}
</p>
{/htxt}
{htxt id='is_multi_summary-title'}
{ts}Multi-record listing{/ts}
{/htxt}
{htxt id='is_multi_summary'}
<p>
{ts}Fields which are part of a custom data set that supports multiple records will be listed below the standard single-record fields when in profile edit view. Use this option to determine which fields you want displayed in that listing{/ts}
</p>
{/htxt}
{htxt id='is_required-title'}
{ts}Required{/ts}
{/htxt}
{htxt id='is_required'}
<p>
{ts}Are users required to complete this field?{/ts}
</p>
{/htxt}
{htxt id='is_view-title'}
{ts}View Only{/ts}
{/htxt}
{htxt id='is_view'}
<p>
{ts}If checked, users can view but not edit this field.{/ts}
</p>
<p>
{ts}NOTE: View Only fields can not be included in Profile Search forms.{/ts}
</p>
{/htxt}
{htxt id='visibility-title'}
{ts}Visibility{/ts}
{/htxt}
{htxt id='visibility'}
<p>
{ts}Is this field hidden from public search ('User and User Admin Only'), or is it visible to the public and potentially searchable in the Profile Search form ('Expose Publicly' or 'Expose Publicly and for Listings')? ('User and User Admin Only') fields can still be used for Edit and Create mode.{/ts}
</p>
<p>
{ts}When visibility is 'Expose Publicly and for Listings', users can also click the field value when viewing a contact in order to locate other contacts with the same value(s) (i.e. other contacts who live in Poland).{/ts}
</p>
{/htxt}
{htxt id='is_searchable-title'}
{ts}Searchable{/ts}
{/htxt}
{htxt id='is_searchable'}
<p>
{ts}Do you want to include this field in the Profile's Search form?{/ts}
</p>
{/htxt}
{htxt id='in_selector-title'}
{ts}Results Column{/ts}
{/htxt}
{htxt id='in_selector'}
<p>
{ts}Is this field included as a column in the search results table? This setting applies only to fields with 'Public Pages' or 'Public Pages and Listings' visibility.{/ts}
</p>
{/htxt}
{htxt id='help-title'}
{ts}Help Text{/ts}
{/htxt}
{htxt id='help'}
<p>
{ts}Explanatory text displayed to users for this field (can include HTML formatting tags).{/ts}
</p>
{/htxt}
{htxt id='weight-title'}
{ts}Order{/ts}
{/htxt}
{htxt id='weight'}
<p>
{ts}Weight controls the order in which fields are displayed within a profile. Enter a positive or negative integer - lower numbers are displayed ahead of higher numbers. Note: The field order will not respect non-multi fields interspersed with multi record fields in edit mode.{/ts}
</p>
{/htxt}
{htxt id='is_active-title'}
{ts}Active{/ts}
{/htxt}
{htxt id='is_active'}
<p>
{ts}Disable this option to remove the field from the profile without deleting it.{/ts}
</p>
{/htxt}

View file

@ -0,0 +1,304 @@
{*
+--------------------------------------------------------------------+
| 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-block crm-form-block crm-uf-field-form-block">
{if $action eq 8}
<div class="messages status no-popup">
<div class="icon inform-icon"></div>
{ts}WARNING: Deleting this profile field will remove it from Profile forms and listings. If this field is used in any 'stand-alone' Profile forms, you will need to update those forms to remove this field.{/ts} {ts}Do you want to continue?{/ts}
</div>
{else}
<div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
<table class="form-layout-compressed">
<tr class="crm-uf-field-form-block-field_name">
<td class="label">{$form.field_name.label} {help id='field_name_0'}</td>
<td>{$form.field_name.html}<br />
<span class="description">&nbsp;{ts}Select the type of CiviCRM record and the field you want to include in this Profile.{/ts}</span></td>
</tr>
<tr class="crm-uf-field-form-block-label">
<td class="label">{$form.label.label} {help id='label'}{if $action == 2}{include file='CRM/Core/I18n/Dialog.tpl' table='civicrm_uf_field' field='label' id=$fieldId}{/if}</td>
<td>{$form.label.html}</td>
</tr>
<tr class="crm-uf-field-form-block-is_multi">
<td class="label">{$form.is_multi_summary.label}{help id='is_multi_summary'}</td>
<td>{$form.is_multi_summary.html}<br />
</tr>
<tr class="crm-uf-field-form-block-is_required">
<td class="label">{$form.is_required.label} {help id='is_required'}</td>
<td>{$form.is_required.html}</td>
</tr>
<tr class="crm-uf-field-form-block-is_view">
<td class="label">{$form.is_view.label} {help id='is_view'}</td>
<td>{$form.is_view.html}</td>
</tr>
<tr id="profile_visibility" class="crm-uf-field-form-block-visibility">
<td class="label">{$form.visibility.label} {help id='visibility'}</td>
<td>{$form.visibility.html}</td>
</tr>
<tr class="crm-uf-field-form-block-is_searchable">
<td class="label"><div id="is_search_label">{$form.is_searchable.label} {help id='is_searchable'}</div></td>
<td><div id="is_search_html">{$form.is_searchable.html}</td>
</tr>
<tr class="crm-uf-field-form-block-in_selector">
<td class="label"><div id="in_selector_label">{$form.in_selector.label}{help id='in_selector'}</div></td>
<td><div id="in_selector_html">{$form.in_selector.html}</div></td>
</tr>
<tr class="crm-uf-field-form-block-help_pre">
<td class="label">{$form.help_pre.label}{if $action == 2}{include file='CRM/Core/I18n/Dialog.tpl' table='civicrm_uf_field' field='help_pre' id=$fieldId}{/if} {help id='help'}</td>
<td>{$form.help_pre.html}</td>
</tr>
<tr class="crm-uf-field-form-block-help_post">
<td class="label">{$form.help_post.label}{if $action == 2}{include file='CRM/Core/I18n/Dialog.tpl' table='civicrm_uf_field' field='help_post' id=$fieldId}{/if} {help id='help'}</td>
<td>{$form.help_post.html}</td>
</tr>
<tr class="crm-uf-field-form-block-weight">
<td class="label">{$form.weight.label} {help id='weight'}</td>
<td>&nbsp;{$form.weight.html}</td>
</tr>
<tr class="crm-uf-field-form-block-is_active">
<td class="label">{$form.is_active.label} {help id='is_active'}</td>
<td>{$form.is_active.html}</td>
</tr>
</table>
{/if}
<div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="bottom"}</div>
</div>
{$initHideBoxes}
{literal}
<script type="text/javascript">
CRM.$(function($) {
var otherModule = {/literal}{$otherModules|@json_encode}{literal};
if ( $.inArray( "Profile", otherModule ) > -1 && $.inArray( "Search Profile", otherModule ) == -1 ){
$('#profile_visibility').show();
}
else if( $.inArray( "Search Profile", otherModule ) > -1 ){
$('#profile_visibility').show();
$("#in_selector").prop('checked',true);
}
else if( $.inArray( "Profile", otherModule ) == -1 && $.inArray( "Search Profile", otherModule ) == -1 ){
$('#profile_visibility').hide();
}
$('[id^=field_name]').change(function() {
showLabel();
mixProfile();
});
});
var preHelpLabel = "";
function showLabel( ) {
if (preHelpLabel) {
cj(".crm-uf-field-form-block-help_pre .label").html(preHelpLabel);
}
var $elements = cj(".crm-uf-field-form-block-is_view, .crm-uf-field-form-block-is_required, .crm-uf-field-form-block-visibility, .crm-uf-field-form-block-is_searchable, .crm-uf-field-form-block-in_selector, .crm-uf-field-form-block-help_post");
$elements.show();
if (cj('[name="field_name[0]"]').val() == "Formatting") {
if (!preHelpLabel) {
preHelpLabel = cj(".crm-uf-field-form-block-help_post .label").html();
}
cj(".crm-uf-field-form-block-help_pre .label").html('<label for="help_pre">HTML Code</label>');
$elements.hide();
}
// Set the Field Label
var labelValue = '';
if (cj('[name="field_name[0]"]').val()) {
var fieldId = cj('[name="field_name[1]"]').val();
if (fieldId) {
labelValue = cj('[name="field_name[1]"] :selected').text().split(' :: ', 2)[0];
if (cj('[name="field_name[3]"]').val()) {
labelValue += '-' + cj('[name="field_name[3]"] :selected').text();
}
if (cj('[name="field_name[2]"]').val()) {
labelValue += ' (' + cj('[name="field_name[2]"] :selected').text() + ')';
}
}
}
cj('#label').val(labelValue);
/* Code to hide searchable attribute for no searchable fields */
if (document.getElementsByName("field_name[1]")[0].selectedIndex == -1) {
return;
}
var field2 = document.getElementsByName("field_name[1]")[0][document.getElementsByName("field_name[1]")[0].selectedIndex].text;
{/literal}
{foreach from=$noSearchable key=dnc item=val}
{literal}
if (field2 == "{/literal}{$val}{literal}") {
cj('#is_search_label, #is_search_html').hide();
}
{/literal}
{/foreach}
{literal}
// Code to set Profile Field help, from custom data field help
if (fieldId.substring(0, 7) == 'custom_') {
fieldId = fieldId.substring( fieldId.length, 7);
var dataUrl = {/literal}"{crmURL p='civicrm/ajax/custom' h=0 }"{literal};
cj.post( dataUrl, { id: fieldId }, function(data) {
cj('#help_post').val(data.help_post);
cj('#help_pre').val(data.help_pre);
}, 'json');
}
}
{/literal}{if $action neq 8}{literal}
showHideSeletorSearch();
function showHideSeletorSearch() {
var is_search = cj('#is_search_label, #is_search_html');
var in_selector = cj('#in_selector_label, #in_selector_html');
if (cj("#visibility").val() == "User and User Admin Only") {
is_search.hide();
in_selector.hide();
cj("#is_searchable").prop('checked',false);
}
else {
if (!cj("#is_view").prop('checked')) {
is_search.show();
}
var fldName = cj("#field_name_1").val();
if (fldName == 'group' || fldName == 'tag') {
in_selector.hide();
}
else {
in_selector.show();
}
}
}
cj("#field_name_1").bind( 'change blur', function( ) {
showHideSeletorSearch( );
});
CRM.$(function($) {
cj("#field_name_1").addClass( 'huge' );
viewOnlyShowHide( );
cj("#is_view").click( function(){
viewOnlyShowHide();
});
});
{/literal}{/if}{literal}
cj("#field_name_1").change(
function() {
multiSummaryToggle(cj(this).val());
});
CRM.$(function($) {
var fieldId = cj("#field_name_1").val();
multiSummaryToggle(fieldId);
});
function multiSummaryToggle(customId) {
if (customId && customId.match(/custom_[\d]/)) {
var dataUrl = "{/literal}{crmURL p='civicrm/ajax/rest' q='className=CRM_UF_Page_AJAX&fnName=checkIsMultiRecord&json=1' h=0 }"{literal};
dataUrl = dataUrl + '&customId=' + customId;
cj.ajax({ url: dataUrl,
async: false,
global: false,
dataType : 'json',
success : function(response) {
if (response.is_multi != 0 ) {
cj('.crm-uf-field-form-block-is_multi').show();
}
else {
if (cj('#is_multi_summary').is(':checked')) {
cj('#is_multi_summary').prop('checked', false);
}
cj('.crm-uf-field-form-block-is_multi').hide();
}
}
});
}
else {
if (cj('#is_multi_summary').is(':checked')) {
cj('#is_multi_summary').prop('checked', false);
}
cj('.crm-uf-field-form-block-is_multi').hide();
}
}
function viewOnlyShowHide() {
var is_search = cj('#is_search_label, #is_search_html');
if (cj("#is_view").prop('checked')) {
is_search.hide();
cj("#is_searchable").prop('checked', false);
}
else if (cj("#visibility").val() != "User and User Admin Only") {
is_search.show();
}
}
//CRM-4363
function mixProfile( ) {
var allMixTypes = ["Participant", "Membership", "Contribution"];
var type = document.forms.Field['field_name[0]'].value;
var alreadyMixProfile = {/literal}{if $alreadyMixProfile}true{else}false{/if}{literal};
if (allMixTypes.indexOf( type ) != -1 || alreadyMixProfile) {
if (document.getElementById("is_searchable").checked) {
document.getElementById("is_searchable").checked = false;
if ( alreadyMixProfile ) {
var message = {/literal}'{ts escape="js"}You can not mark fields as Searchable in a profile that contains fields for multiple record types.{/ts}'{literal};
}
else {
var message = type + {/literal}'{ts escape="js"} fields can not be marked as Searchable in a profile.{/ts}'{literal};
}
cj().crmError(message, {/literal}'{ts escape="js"}Error{/ts}'{literal});
}
if ( document.getElementById("in_selector").checked ) {
document.getElementById("in_selector").checked = false;
if ( alreadyMixProfile ) {
var message = {/literal}'{ts escape="js"}You can not mark a field as a Result Column in a profile that contains fields from multiple record types.{/ts}'{literal};
}
else {
var message = type + {/literal}'{ts escape="js"} can not be used as a Result Column for profile searches.{/ts}'{literal};
}
cj().crmError(message, {/literal}'{ts escape="js"}Error{/ts}'{literal});
}
}
}
function verify( ) {
var allMixTypes = ["Participant", "Membership", "Contribution"];
var type = document.forms.Field['field_name[0]'].value;
if ( allMixTypes.indexOf( type ) != -1 ) {
var message = {/literal}'{ts escape='js'}Oops. One or more fields in this profile are configured to be Searchable and / or shown in a Results Column, AND you are trying to add a {/ts}'
+ type + '{ts} field. Profiles with a mixture of field types can not include Searchable or Results Column fields. If you save this field now, the Seachable and Results Column settings will be removed for all fields in this profile. Do you want to continue?{/ts}'{literal};
var ok = confirm( message );
if ( !ok ) {
return false;
}
}
}
</script>
{/literal}

View file

@ -0,0 +1,142 @@
{foreach from=$fields item=field key=fieldName}
{if $field.skipDisplay}
{continue}
{/if}
{assign var=profileFieldName value=$field.name}
{if $prefix}
{assign var="formElement" value=$form.$prefix.$profileFieldName}
{else}
{assign var="formElement" value=$form.$profileFieldName}
{/if}
{if $field.groupTitle != $fieldset}
{if $fieldset != $zeroField}
{if $groupHelpPost && $action neq 4}
<div class="messages help">{$groupHelpPost}</div>
{/if}
{if $mode ne 8}
</fieldset>
{/if}
{/if}
{if $mode ne 8 && $action ne 1028 && $action ne 4 && !$hideFieldset}
<fieldset class="crm-profile crm-profile-id-{$field.group_id} crm-profile-name-{$field.groupName}"><legend>{$field.groupTitle}</legend>
{/if}
{if ($form.formName eq 'Confirm' OR $form.formName eq 'ThankYou') AND $prefix neq 'honor'}
<div class="header-dark">{$field.groupTitle} </div>
{/if}
{assign var=fieldset value=`$field.groupTitle`}
{assign var=groupHelpPost value=`$field.groupHelpPost`}
{if $field.groupHelpPre && $action neq 4 && $action neq 1028}
<div class="messages help">{$field.groupHelpPre}</div>
{/if}
{/if}
{if $field.field_type eq "Formatting"}
{if $action neq 4 && $action neq 1028}
{$field.help_pre}
{/if}
{elseif $profileFieldName}
{* Show explanatory text for field if not in 'view' or 'preview' modes *}
{if $field.help_pre && $action neq 4 && $action neq 1028}
<div class="crm-section helprow-{$profileFieldName}-section helprow-pre" id="helprow-{$profileFieldName}">
<div class="content description">{$field.help_pre}</div>
</div>
{/if}
{if $field.options_per_line != 0}
<div class="crm-section editrow_{$profileFieldName}-section form-item" id="editrow-{$profileFieldName}">
<div class="label option-label">{$formElement.label}</div>
<div class="content 3">
{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=$formElement}
{if $index < 10}
{assign var="index" value=`$index+1`}
{else}
<td class="labels font-light">{$formElement.$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>
{else}
<div class="crm-section editrow_{$profileFieldName}-section form-item" id="editrow-{$profileFieldName}">
<div class="label">
{$formElement.label}
</div>
<div class="content">
{if $profileFieldName|substr:0:3 eq 'im-'}
{assign var="provider" value=profileFieldNamen|cat:"-provider_id"}
{$form.$provider.html}&nbsp;
{/if}
{if $profileFieldName eq 'email_greeting' or $profileFieldName eq 'postal_greeting' or $profileFieldName eq 'addressee'}
{include file="CRM/Profile/Form/GreetingType.tpl"}
{elseif ($profileFieldName eq 'group' && $form.group) || ($profileFieldName eq 'tag' && $form.tag)}
{include file="CRM/Contact/Form/Edit/TagsAndGroups.tpl" type=$profileFieldName title=null context="profile"}
{elseif $field.is_datetime_field && $action & 4}
<span class="crm-frozen-field">
{$formElement.value|crmDate:$field.smarty_view_format}
<input type="hidden"
name="{$formElement.name}"
value="{$formElement.value}" id="{$formElement.name}"
>
</span>
{elseif $profileFieldName|substr:0:5 eq 'phone'}
{assign var="phone_ext_field" value=$profileFieldName|replace:'phone':'phone_ext'}
{$formElement.html}
{if $form.$phone_ext_field.html}
&nbsp;{$form.$phone_ext_field.html}
{/if}
{else}
{if $prefix}
{if $profileFieldName eq 'organization_name' && !empty($form.onbehalfof_id)}
{$form.onbehalfof_id.html}
{/if}
{if $field.html_type eq 'File' && $viewOnlyPrefixFileValues}
{$viewOnlyPrefixFileValues.$prefix.$profileFieldName}
{else}
{$formElement.html}
{/if}
{elseif $field.html_type eq 'File' && $viewOnlyFileValues}
{$viewOnlyFileValues.$profileFieldName}
{else}
{$formElement.html}
{/if}
{/if}
{*CRM-4564*}
{if $field.html_type eq 'Autocomplete-Select'}
{if $field.data_type eq 'ContactReference'}
{include file="CRM/Custom/Form/ContactReference.tpl" element_name = $profileFieldName}
{/if}
{/if}
</div>
<div class="clear"></div>
</div>
{/if}
{* Show explanatory text for field if not in 'view' or 'preview' modes *}
{if $field.help_post && $action neq 4 && $action neq 1028}
<div class="crm-section helprow-{$profileFieldName}-section helprow-post" id="helprow-{$profileFieldName}">
<div class="content description">{$field.help_post}</div>
</div>
{/if}
{/if}
{/foreach}

View file

@ -0,0 +1,191 @@
{*
+--------------------------------------------------------------------+
| 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 |
+--------------------------------------------------------------------+
*}
{htxt id='id-description-title'}
{ts}Help Description{/ts}
{/htxt}
{htxt id='id-description'}
{ts}Explanatory text for profile.{/ts}
{/htxt}
{htxt id='id-used_for-title'}
{ts}Used For{/ts}
{/htxt}
{htxt id='id-used_for'}
{ts}Profiles can be used in many different ways (and a single profile can be used in multiple contexts){/ts}:<br />
<ul class="left-alignment">
<li>{ts}You can collect additional information about a donor or event participant by including profiles directly in Online Contribution Pages and Event Registration forms. When using a profile in this manner you do not need to check any of the "Used For" checkboxes.{/ts}</li>
<li>{ts}Check <strong>Standalone Form or Directory</strong> if you want it to use this profile for custom forms, or contact listing and view screens (from the civicrm/profile path).{/ts}</li>
<li>{ts}Check <strong>Search Results</strong> to use this profile to display an alternate set of results columns for CiviCRM Basic and Advanced Search.{/ts}</li>
{if $config->userSystem->supports_form_extensions EQ '1'}
<li>{ts}Check <strong>User Registration</strong> if you want this Profile to be included in the New Account registration form.{/ts}</li>
<li>{ts}Check <strong>View/Edit User Account</strong> to include it in the view and edit screens for existing user accounts.{/ts}</li>
{/if}
</ul>
{docURL page="user/organising-your-data/profiles/"}
{/htxt}
{htxt id='id-profile_weight-title'}
{ts}Weight{/ts}
{/htxt}
{htxt id='id-profile_weight'}
{ts}Weight controls the order in which profiles are presented when more than one profile is included in User Registration or My Account screens. Enter a positive or negative integer - lower numbers are displayed ahead of higher numbers.{/ts}
{/htxt}
{htxt id='id-help_pre-title'}
{ts}Help Pre-Form{/ts}
{/htxt}
{htxt id='id-help_pre'}
{ts}Explanatory text displayed at the beginning of the form.{/ts}{ts}Note that this help text is displayed on profile create/edit screens only.{/ts}
{/htxt}
{htxt id='id-help_post-title'}
{ts}Help Post-Form{/ts}
{/htxt}
{htxt id='id-help_post'}
{ts}Explanatory text displayed at the end of the form.{/ts}{ts}Note that this help text is displayed on profile create/edit screens only.{/ts}
{/htxt}
{htxt id='id-limit_group-title'}
{ts}Limit Group{/ts}
{/htxt}
{htxt id='id-limit_group'}
{ts}Select a group if you are using this profile for search and listings, AND you want to limit the listings to members of a specific group.{/ts}
{/htxt}
{htxt id='id-add_group-title'}
{ts}Add to Group{/ts}
{/htxt}
{htxt id='id-add_group'}
{ts}Select a group if you are using this profile for adding new contacts, AND you want the new contacts to be automatically assigned to a group.{/ts}
{/htxt}
{htxt id='id-notify_email-title'}
{ts}Notify Email{/ts}
{/htxt}
{htxt id='id-notify_email'}
{ts}If you want member(s) of your organization to receive a notification email whenever this Profile form is used to enter or update contact information, enter one or more email addresses here. Multiple email addresses should be separated by a comma (e.g. jane@example.org, paula@example.org). The first email address listed will be used as the FROM address in the notifications.{/ts}
{/htxt}
{htxt id='id-post_URL-title'}
{ts}Redirect{/ts}
{/htxt}
{htxt id='id-post_URL'}
{ts}If you are using this profile as a contact signup or edit form, and want to redirect the user to a static URL after they've submitted the form, you can also use contact tokens in URL - enter the complete URL here. If this field is left blank, the built-in Profile form will be redisplayed with a generic status message - 'Your contact information has been saved.'{/ts}
{/htxt}
{htxt id='id-cancel_URL-title'}
{ts}Cancel Redirect{/ts}
{/htxt}
{htxt id='id-cancel_URL'}
{ts}If you are using this profile as a contact signup or edit form, and want to redirect the user to a static URL if they click the Cancel button - enter the complete URL here. If this field is left blank, the built-in Profile form will be redisplayed.{/ts}
{/htxt}
{htxt id='id-cancel_button_text-title'}
{ts}Cancel Button Text{/ts}
{/htxt}
{htxt id='id-cancel_button_text'}
{ts}Override the default button text for the cancel button for this profile{/ts}
{/htxt}
{htxt id='id-submit_button_text-title'}
{ts}Submit Button Text{/ts}
{/htxt}
{htxt id='id-submit_button_text'}
{ts}Override the default button text for the submit button for this profile{/ts}
{/htxt}
{htxt id='id-add_captcha-title'}
{ts}reCaptcha{/ts}
{/htxt}
{htxt id='id-add_captcha'}
{capture assign="miscURL"}{crmURL p="civicrm/admin/setting/misc" q="reset=1"}{/capture}
<p>{ts}When reCAPTCHA is enabled for a profile form, anonymous users are required to read an image with letters and numbers and enter the value in a field. This helps prevent abuse by automated scripts.{/ts}</p>
<p>{ts 1="https://www.google.com/recaptcha" 2=$miscURL}To use reCAPTCHA you must sign up at <a href="%1" target="_blank">Google's reCaptcha site</a> to get your public and private keys. Then enter both keys in <a href="%2">Administer CiviCRM &raquo; System Settings &raquo; Misc (Undelete, PDFs, Limits, Logging, Captcha, etc.)</a>.{/ts}</p>
<p><strong>{ts}Do not enable this feature if you are using this profile as an HTML Form Snippet embedded in a non-CiviCRM web page. reCAPTCHA requires dynamic page generation. Submitting a stand-alone form with reCAPTCHA included will always result in a reCAPTCHA validation error.{/ts}</strong></p>
{if $config->userSystem->supports_form_extensions EQ '1'}
<p><strong>{ts}reCAPTCHA is also not available when a profile is used inside the User Registration and My Account screens.{/ts}</strong></p>
{/if}
{/htxt}
{htxt id='id-is_cms_user-title'}
{ts}Account Creation{/ts}
{/htxt}
{htxt id='id-is_cms_user'}
{ts 1=`$config->userFramework`}If you are using this profile as a contact signup form, using it in an online contribution page OR an event registration page, anonymous users will be given the option to create a %1 User Account as part of completing the form.{/ts}
{if $config->userSystem->is_drupal EQ '1'}
{ts}This feature requires your Drupal User Settings to allow 'vistors to create accounts' (with or without administrator approval). The 'Email Verification' option may be enabled or disabled.{/ts}
{ts}If the 'Email Verification' option is enabled, users will receive a welcome email from Drupal with login information. Otherwise they will select a Password inline, and if administrator approval is not required they will be automatically logged in as soon as the transaction is completed.{/ts}
{elseif $config->userFramework EQ 'Joomla'}
{ts}This feature requires the 'Allow User Registration' setting to be 'Yes' in Joomla Global Configuration >> System Settings.{/ts}
{/if}
{ts}In addition, you must include a Primary Email Address field in the profile.{/ts}
{/htxt}
{htxt id='id-is_update_dupe-title'}
{ts}Duplicate Matching{/ts}
{/htxt}
{htxt id='id-is_update_dupe'}
<p>{ts}If you are using the profile as a contact signup and editing form - this option controls what happens if the data matches an existing contact record. Using this option user can update the matching record or create a duplicate record or otherwise he will get a 'duplicate record' warning, and their input will not be saved. Contact matching is based on your configured 'Strict' rule for identifying duplicate contacts.{/ts} {docURL page="user/common-workflows/deduping-and-merging"}</p>
<p>{ts}This setting is ignored if the profile is embedded in an online contribution, membership signup or event registration form. In this case a contact match always results in the transaction being linked to the matching contact.</p>{/ts}
<p>{ts}In all cases, the check for an existing matching contact uses the default "Individual Strict Duplicate Matching Rule" (match on email address). If you are concerned with existing contact data being over-written by anonymous visitors, you can modify this rule to make matches less likely (or even impossible). For example, if you NEVER want anonymous input to match (i.e. always create a new contact record) - edit that rule and set the 'weight threshold' higher than 10. You will then need to run Find Duplicates periodically using a different rule, and merge any duplicate records with their associated memberships, contributions, etc.{/ts}</p>
<p>{ts}NOTE: If there are multiple matching contacts, the first matching record is used.{/ts}</p>
{/htxt}
{htxt id='id-is_map-title'}
{ts}Map Link{/ts}
{/htxt}
{htxt id='id-is_map'}
{ts}If enabled, a Map link is included on the profile listings rows and detail screens for any contacts whose records include sufficient location data for your mapping provider.{/ts}
{/htxt}
{htxt id='id-is_edit_link-title'}
{ts}Edit Link{/ts}
{/htxt}
{htxt id='id-is_edit_link'}
{ts}Check this box if you want to include a link in the listings to Edit profile fields. Only users with permission to edit the contact will see this link.{/ts}
{/htxt}
{htxt id='id-is_uf_link-title'}
{ts}User Link{/ts}
{/htxt}
{htxt id='id-is_uf_link'}
{ts 1=`$config->userFramework`}Check this box if you want to include a link in the listings to view contacts' %1 user account information (e.g. their 'My Account' page). This link will only be included for contacts who have a user account on your website.{/ts}
{/htxt}
{htxt id='id-is_proximity_search-title'}
{ts}Proximity Search{/ts}
{/htxt}
{htxt id='id-is_proximity_search'}
<p>
{ts}If you are using this profile as a search form, you can choose to include proximity searching. When enabled, a proximity search block will be added to the search criteria. This block will contain fields to set the proximity start address, and a field to set a 'Radius' (distance from that address).{/ts}
</p>
<p>
{ts}Set Proximity Search as required if you want all searches using this profile to require the user to enter a start address and a radius.{/ts}
</p>
<p>
{ts}IMPORTANT: You must enable a Mapping Provider in order to use the Proximity Search feature (Administer > System Settings > Mapping and Geocoding).{/ts}
</p>
{/htxt}

View file

@ -0,0 +1,83 @@
{*
+--------------------------------------------------------------------+
| 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 |
+--------------------------------------------------------------------+
*}
{* add/update/view CiviCRM Profile *}
{if $action eq 8}
<h3> {ts}Delete CiviCRM Profile{/ts} - {$profileTitle}</h3>
{/if}
<div class=" crm-block crm-form-block crm-uf_group-form-block">
{* CRM-13693 Duplicate Delete button *}
{if $action neq 8}
<div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
{/if}
{if ($action eq 2 or $action eq 4) and $snippet neq 'json' } {* Update or View*}
<div class="action-link">
<a href="{crmURL p='civicrm/admin/uf/group/field' q="action=browse&reset=1&gid=$gid"}" class="button"><span>{ts}View or Edit Fields for this Profile{/ts}</a></span>
<div class="clear"></div>
</div>
{/if}
{if $action eq 8 or $action eq 64}
<div class="messages status no-popup">
<div class="icon inform-icon"></div>
{$message}
</div>
{else}
<table class="form-layout">
<tr class="crm-uf_group-form-block-title">
<td class="label">{$form.title.label} {if $action == 2}{include file='CRM/Core/I18n/Dialog.tpl' table='civicrm_uf_group' field='title' id=$gid}{/if}</td>
<td class="html-adjust">{$form.title.html}</td>
</tr>
<tr class="crm-uf_group-form-block-description">
<td class="label">{$form.description.label} {help id='id-description' file="CRM/UF/Form/Group.hlp"}</td>
<td class="html-adjust">{$form.description.html}</td>
</tr>
<tr class="crm-uf_group-form-block-uf_group_type">
<td class="label">{$form.uf_group_type.label} {help id='id-used_for' file="CRM/UF/Form/Group.hlp"}</td>
<td class="html-adjust">{$form.uf_group_type.html}&nbsp;{$otherModuleString}</td>
</tr>
<tr class="crm-uf_group-form-block-weight" >
<td class="label">{$form.weight.label}{if $config->userSystem->is_drupal EQ '1'} {help id='id-profile_weight' file="CRM/UF/Form/Group.hlp"}{/if}</td>
<td class="html-adjust">{$form.weight.html}</td>
</tr>
<tr class="crm-uf_group-form-block-help_pre" >
<td class="label">{$form.help_pre.label} {help id='id-help_pre' file="CRM/UF/Form/Group.hlp"} {if $action == 2}{include file='CRM/Core/I18n/Dialog.tpl' table='civicrm_uf_group' field='help_pre' id=$gid}{/if}</td>
<td class="html-adjust">{$form.help_pre.html}</td>
</tr>
<tr class="crm-uf_group-form-block-help_post" >
<td class="label">{$form.help_post.label} {help id='id-help_post' file="CRM/UF/Form/Group.hlp"} {if $action == 2}{include file='CRM/Core/I18n/Dialog.tpl' table='civicrm_uf_group' field='help_post' id=$gid}{/if}</td>
<td class="html-adjust">{$form.help_post.html}</td>
</tr>
<tr class="crm-uf_group-form-block-is_active" >
<td class="label"></td><td class="html-adjust">{$form.is_active.html} {$form.is_active.label}</td>
</tr>
</table>
{* adding advance setting tab *}
{include file='CRM/UF/Form/AdvanceSetting.tpl'}
{/if}
<div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="bottom"}</div>
</div>
{include file="CRM/common/showHide.tpl"}

View file

@ -0,0 +1,61 @@
{*
+--------------------------------------------------------------------+
| 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 $previewField}
{capture assign=infoTitle}{ts}Profile Field Preview{/ts}{/capture}
{else}
{capture assign=infoTitle}{ts}Profile Preview{/ts}{/capture}
{/if}
{include file="CRM/common/info.tpl" infoType="no-popup profile-preview-msg" infoMessage=" "}
<div class="crm-form-block">
{if ! empty( $fields )}
{if $viewOnly}
{* wrap in crm-container div so crm styles are used *}
<div id="crm-container-inner" lang="{$config->lcMessages|truncate:2:"":true}" xml:lang="{$config->lcMessages|truncate:2:"":true}">
{include file="CRM/common/CMSUser.tpl"}
{strip}
{if $help_pre && $action neq 4}<div class="messages help">{$help_pre}</div>{/if}
{assign var=zeroField value="Initial Non Existent Fieldset"}
{assign var=fieldset value=$zeroField}
{include file="CRM/UF/Form/Fields.tpl"}
{if $addCAPTCHA }
{include file='CRM/common/ReCAPTCHA.tpl'}
{/if}
{if $field.groupHelpPost}
<div class="messages help">{$field.groupHelpPost}</div>
{/if}
{/strip}
</div> {* end crm-container div *}
{else}
{capture assign=infoMessage}{ts}This CiviCRM profile field is view only.{/ts}{/capture}
{include file="CRM/common/info.tpl"}
{/if}
{/if} {* fields array is not empty *}
<div class="crm-submit-buttons">
{include file="CRM/common/formButtons.tpl"}
</div>
</div>