First commit
This commit is contained in:
commit
c6e2478c40
13918 changed files with 2303184 additions and 0 deletions
194
sites/all/modules/civicrm/templates/CRM/Contact/Form/Contact.hlp
Normal file
194
sites/all/modules/civicrm/templates/CRM/Contact/Form/Contact.hlp
Normal file
|
@ -0,0 +1,194 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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-emailFormat-title"}
|
||||
{ts}Email Format{/ts}
|
||||
{/htxt}
|
||||
{htxt id="id-emailFormat"}
|
||||
{ts}Select the email format preferred by this contact. Select 'Both' to send HTML and Text formats.{/ts}
|
||||
{/htxt}
|
||||
|
||||
{htxt id="id-bulkmail-title"}
|
||||
{ts}Bulk Mailings{/ts}
|
||||
{/htxt}
|
||||
{htxt id="id-bulkmail"}
|
||||
{ts}If you are using the CiviMail component to send mailings to contacts, this field provides additional control over which email address is used. By default, CiviMail sends mail to each contact's preferred email address. If the contact has multiple locations, then the preferred email of the primary location is used. However, if the contact prefers to have CiviMail ('bulk') mailings set to an alternate email address - check the 'Use for Bulk Mailings' box next to that email address.{/ts}
|
||||
{/htxt}
|
||||
|
||||
{htxt id="id-optOut-title"}
|
||||
{ts}Opt Out{/ts}
|
||||
{/htxt}
|
||||
{htxt id="id-optOut"}
|
||||
{ts}This option is designed to be set by the contact themselves when they don't want to receive bulk email from your organization (they set it using the opt-out action from a CiviMail mailing). Please think before changing it, as it will override the preference they have set.{/ts}
|
||||
{/htxt}
|
||||
|
||||
{htxt id="id-onhold-title"}
|
||||
{ts}Email Hold{/ts}
|
||||
{/htxt}
|
||||
{htxt id="id-onhold"}
|
||||
{ts}This flag is most commonly used to mark an email address that is bouncing. If you are using the CiviMail component, emails that bounce excessively are automatically placed on hold and mailings are not sent to this address as long as it is marked hold. You can also set (or unset) this option manually - but remember that emails will not be sent to this address as long as it is marked 'On Hold'.{/ts}
|
||||
{/htxt}
|
||||
|
||||
{htxt id="id-preferred_communication_method-title"}
|
||||
{ts}Preferred Communication{/ts}
|
||||
{/htxt}
|
||||
{htxt id="id-preferred_communication_method"}
|
||||
{ts}Select the preferred method(s) of communicating with this contact.{/ts}
|
||||
{/htxt}
|
||||
|
||||
{htxt id="id-privacy-title"}
|
||||
{ts}Privacy{/ts}
|
||||
{/htxt}
|
||||
{htxt id="id-privacy"}
|
||||
{ts}Select the appropriate Privacy Options.{/ts}
|
||||
<p>{ts}Contacts with 'Do not email' will be excluded from receiving CiviMail mailings, and the Send Email activity will be disabled for them. However they will still receive email for contribution receipts and event registration confirmations.{/ts}</p>
|
||||
<p>{ts}Contacts with 'Do not SMS' will be excluded from receiving Bulk SMS messages, and the Send SMS activity will be disabled.{/ts}</p>
|
||||
<p>{ts}Contacts with 'Do not mail' will be excluded when mailing labels are created.{/ts}</p>
|
||||
{/htxt}
|
||||
|
||||
{htxt id="id-sharedAddress-title"}
|
||||
{ts}Shared Address{/ts}
|
||||
{/htxt}
|
||||
{htxt id="id-sharedAddress"}
|
||||
<p>{ts}Check this option if you want to link this address to another contact's address. For example, you might want to link a person's "Work" address to their employer's address. Or, you might want to link their "Home" address to a Household record. Changes made to the linked address will automatically be applied to this address. For example, if you use an employer (organization) address for an individual's work address - any updates to the employer address will also be applied to the individual's work address.{/ts}</p>
|
||||
<p>{ts}You can use an address belonging to an existing contact or create a new contact by selecting the desired contact type from the select field. If you link an individual's address to an organization, an employee-employer relationship will be automatically created. If you link an individual's address to a household, a household member relationship is created.{/ts}</p>
|
||||
{/htxt}
|
||||
|
||||
{htxt id="id-communication_style-title"}
|
||||
{ts}Communication Style{/ts}
|
||||
{/htxt}
|
||||
{htxt id="id-communication_style"}
|
||||
<p>{ts}Choose how you communicate with this contact, e.g. on formal or familiar terms.{/ts}</p>
|
||||
<p>{ts}Depending on the CiviCRM setup, email and postal greetings (see below) may be automatically adapted accordingly; or the information can be used in other ways.{/ts}</p>
|
||||
{/htxt}
|
||||
|
||||
{htxt id="id-greeting-title"}
|
||||
{ts}Greeting{/ts}
|
||||
{/htxt}
|
||||
{htxt id="id-greeting"}
|
||||
{capture assign=docLink}{docURL page="user/common-workflows/tokens-and-mail-merge"}{/capture}
|
||||
<p>{ts}Use the greeting/address options to determine how you would like the contact's salutation and name displayed for different communication methods. When you send an email or export a list of records to a .csv file for mail merging, the greeting and addressee fields will reflect your preferences.{/ts}</p>
|
||||
<p>{ts 1=$docLink}You may also create a customized greeting and use field tokens to insert fields of your choice. For more information on available tokens, see the online documentation %1.{/ts}</p>
|
||||
{/htxt}
|
||||
|
||||
{htxt id="id-edit-street-elements-title"}
|
||||
{ts}Street Address{/ts}
|
||||
{/htxt}
|
||||
{htxt id="id-edit-street-elements"}
|
||||
<p>{ts}CiviCRM will attempt to split street addresses into separate elements (street number, street name and unit/apt) to help you make lists and reports where you need to sort by street number (and/or separate addresses with odd and even numbers). For most addresses, this is done for you automatically. However, you can manually edit these elements, and potentially handle addresses that are in unusual formats, by clicking 'Edit Address Elements'.{/ts}</p>
|
||||
{/htxt}
|
||||
|
||||
{htxt id="id-edit-complete-street-title"}
|
||||
{ts}Street Editing{/ts}
|
||||
{/htxt}
|
||||
{htxt id="id-edit-complete-street"}
|
||||
<p>{ts}Click here to return to editing the street address as a single field. Addresses which don't fit the expected format for address elements can still be saved by entering them in the single 'Street Address' field.{/ts}
|
||||
{/htxt}
|
||||
|
||||
{htxt id="id-current-employer-title"}
|
||||
{ts}Current Employer{/ts}
|
||||
{/htxt}
|
||||
{htxt id="id-current-employer"}
|
||||
<p>{ts}You can select an existing organization record here, OR type in the name of a new organization if this person's employer is not already in your database. However, if you want this person to share their work address with their employer AND that organization doesn't exist yet - leave this field blank and use the Shared Address feature in the Address pane below to create the employer record AND enter the employer address. The 'current employer' relationship will be automatically created for you.{/ts}</p>
|
||||
{/htxt}
|
||||
|
||||
{htxt id="id-website-title"}
|
||||
{ts}Website{/ts}
|
||||
{/htxt}
|
||||
{htxt id="id-website"}
|
||||
<p>{ts}Record one or more web addresses (URLs) associated with this contact. Examples include personal web addresses like a Facebook or Twitter page, as well as links to a company or organization web site or page.{/ts}</p>
|
||||
{/htxt}
|
||||
|
||||
{htxt id="id-upload-image-title"}
|
||||
{ts}Contact Image{/ts}
|
||||
{/htxt}
|
||||
{htxt id="id-upload-image"}
|
||||
<p>{ts}Upload a photo or icon that you want to be displayed when viewing this contact.{/ts}</p>
|
||||
{/htxt}
|
||||
|
||||
{htxt id="id-internal-id-title"}
|
||||
{ts}Contact ID{/ts}
|
||||
{/htxt}
|
||||
{htxt id="id-internal-id"}
|
||||
<p>{ts}Every contact in CiviCRM has a unique ID number. This number will never change and is the most accurate way of identifying a contact.{/ts}</p>
|
||||
{/htxt}
|
||||
|
||||
{htxt id="id-external-id-title"}
|
||||
{ts}External ID{/ts}
|
||||
{/htxt}
|
||||
{htxt id="id-external-id"}
|
||||
<p>{ts}Use this field to store a unique identifier. This is generally used to link contacts with records in a related or legacy application. When migrating data from another system, import the unique contact identifier from the old system to this field. You can then use it to match imported contributions and other transactional data to the corresponding contact record.{/ts}</p>
|
||||
{/htxt}
|
||||
|
||||
{htxt id="id-address-name-title"}
|
||||
{ts}Address Name{/ts}
|
||||
{/htxt}
|
||||
{htxt id="id-address-name"}
|
||||
<p>{ts}Enter a descriptive name for this address block such as "Summer Home", "School Address", etc.{/ts}
|
||||
{/htxt}
|
||||
|
||||
{htxt id="id-postal-code-suffix-title"}
|
||||
{ts}Postal Code Suffix{/ts}
|
||||
{/htxt}
|
||||
{htxt id="id-postal-code-suffix"}
|
||||
<p>{ts}Enter optional 'add-on' code after the dash ('plus 4' code for U.S. addresses).{/ts}</p>
|
||||
{/htxt}
|
||||
|
||||
{htxt id="id-geo-code-title"}
|
||||
{ts}Geocoding{/ts}
|
||||
{/htxt}
|
||||
{htxt id="id-geo-code"}
|
||||
{capture assign=docLink}{docURL page="user/initial-set-up/installation-and-basic-setup" text="(Refer to the Mapping and Geocoding section in the Installation and Basic Setup Chapter)"}{/capture}
|
||||
<p>{ts}Latitude and longitude may be automatically populated by enabling a Mapping Provider.{/ts} {$docLink}</p>
|
||||
{/htxt}
|
||||
|
||||
{htxt id="id-geo-code-override-title"}
|
||||
{ts}Override Geocoding{/ts}
|
||||
{/htxt}
|
||||
{htxt id="id-geo-code-override"}
|
||||
<p>{ts}Check this box if you want to assign latitude and longitude manually rather than letting your mapping provider assign it. This is useful for addresses in locations where your mapping provider is not able to provide accurate geocoding.{/ts}</p>
|
||||
{/htxt}
|
||||
|
||||
{htxt id="id-street-address-title"}
|
||||
{ts}Street Address{/ts}
|
||||
{/htxt}
|
||||
{htxt id="id-street-address"}
|
||||
<p>{ts}Street number, street name, apartment/unit/suite - OR P.O. box.{/ts}</p>
|
||||
{/htxt}
|
||||
|
||||
{htxt id="id-supplemental-address-title"}
|
||||
{ts}Supplemental Address{/ts}
|
||||
{/htxt}
|
||||
{htxt id="id-supplemental-address"}
|
||||
<p>{ts}Supplemental address info, e.g. c/o, department name, building name, etc.{/ts}</p>
|
||||
{/htxt}
|
||||
|
||||
{htxt id="id-source-title"}
|
||||
{ts}Contact Source{/ts}
|
||||
{/htxt}
|
||||
{htxt id="id-source"}
|
||||
<p>{ts}Use this field to store a description of how/why this contact was added to the database. This field is usually auto-filled when a contact is created from a public form i.e. Event Registration.{/ts}</p>
|
||||
{/htxt}
|
||||
|
272
sites/all/modules/civicrm/templates/CRM/Contact/Form/Contact.tpl
Normal file
272
sites/all/modules/civicrm/templates/CRM/Contact/Form/Contact.tpl
Normal file
|
@ -0,0 +1,272 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{* This form is for Contact Add/Edit interface *}
|
||||
{if $addBlock}
|
||||
{include file="CRM/Contact/Form/Edit/$blockName.tpl"}
|
||||
{else}
|
||||
{if $contactId}
|
||||
{include file="CRM/Contact/Form/Edit/Lock.tpl"}
|
||||
{/if}
|
||||
<div class="crm-form-block crm-search-form-block">
|
||||
{if call_user_func(array('CRM_Core_Permission','check'), 'administer CiviCRM') }
|
||||
<a href='{crmURL p="civicrm/admin/setting/preferences/display" q="reset=1"}' title="{ts}Click here to configure the panes.{/ts}"><i class="crm-i fa-wrench"></i></a>
|
||||
{/if}
|
||||
<span style="float:right;"><a href="#expand" id="expand">{ts}Expand all tabs{/ts}</a></span>
|
||||
<div class="crm-submit-buttons">
|
||||
{include file="CRM/common/formButtons.tpl" location="top"}
|
||||
</div>
|
||||
|
||||
<div class="crm-accordion-wrapper crm-contactDetails-accordion">
|
||||
<div class="crm-accordion-header">
|
||||
{ts}Contact Details{/ts}
|
||||
</div><!-- /.crm-accordion-header -->
|
||||
<div class="crm-accordion-body" id="contactDetails">
|
||||
<div id="contactDetails">
|
||||
<div class="crm-section contact_basic_information-section">
|
||||
{include file="CRM/Contact/Form/Edit/$contactType.tpl"}
|
||||
</div>
|
||||
<table class="crm-section contact_information-section form-layout-compressed">
|
||||
{foreach from=$blocks item="label" key="block"}
|
||||
{include file="CRM/Contact/Form/Edit/$block.tpl"}
|
||||
{/foreach}
|
||||
</table>
|
||||
<table class="crm-section contact_source-section form-layout-compressed">
|
||||
<tr class="last-row">
|
||||
<td>{$form.contact_source.label} {help id="id-source"}<br />
|
||||
{$form.contact_source.html|crmAddClass:twenty}
|
||||
</td>
|
||||
<td>{$form.external_identifier.label} {help id="id-external-id"}<br />
|
||||
{$form.external_identifier.html}
|
||||
</td>
|
||||
{if $contactId}
|
||||
<td>
|
||||
<label for="internal_identifier_display">{ts}Contact ID{/ts} {help id="id-internal-id"}</label><br />
|
||||
<input id="internal_identifier_display" type="text" class="crm-form-text six" size="6" readonly="readonly" value="{$contactId}">
|
||||
</td>
|
||||
{/if}
|
||||
</tr>
|
||||
</table>
|
||||
<table class="image_URL-section form-layout-compressed">
|
||||
<tr>
|
||||
<td>
|
||||
{$form.image_URL.label} {help id="id-upload-image" file="CRM/Contact/Form/Contact.hlp"}<br />
|
||||
{$form.image_URL.html|crmAddClass:twenty}
|
||||
{if !empty($imageURL)}
|
||||
{include file="CRM/Contact/Page/ContactImage.tpl"}
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
{*add dupe buttons *}
|
||||
<span class="crm-button crm-button_qf_Contact_refresh_dedupe">
|
||||
{$form._qf_Contact_refresh_dedupe.html}
|
||||
</span>
|
||||
{if $isDuplicate}
|
||||
|
||||
<span class="crm-button crm-button_qf_Contact_upload_duplicate">
|
||||
{$form._qf_Contact_upload_duplicate.html}
|
||||
</span>
|
||||
{/if}
|
||||
<div class="spacer"></div>
|
||||
</div>
|
||||
</div><!-- /.crm-accordion-body -->
|
||||
</div><!-- /.crm-accordion-wrapper -->
|
||||
|
||||
{foreach from = $editOptions item = "title" key="name"}
|
||||
{if $name eq 'CustomData' }
|
||||
<div id='customData'>{include file="CRM/Contact/Form/Edit/CustomData.tpl"}</div>
|
||||
{else}
|
||||
{include file="CRM/Contact/Form/Edit/$name.tpl"}
|
||||
{/if}
|
||||
{/foreach}
|
||||
<div class="crm-submit-buttons">
|
||||
{include file="CRM/common/formButtons.tpl" location="bottom"}
|
||||
</div>
|
||||
</div>
|
||||
{literal}
|
||||
|
||||
<script type="text/javascript" >
|
||||
CRM.$(function($) {
|
||||
var $form = $("form.{/literal}{$form.formClass}{literal}");
|
||||
var action = "{/literal}{$action}{literal}";
|
||||
|
||||
$('.crm-accordion-body').each( function() {
|
||||
//remove tab which doesn't have any element
|
||||
if ( ! $.trim( $(this).text() ) ) {
|
||||
ele = $(this);
|
||||
prevEle = $(this).prev();
|
||||
$(ele).remove();
|
||||
$(prevEle).remove();
|
||||
}
|
||||
//open tab if form rule throws error
|
||||
if ( $(this).children().find('span.crm-error').text().length > 0 ) {
|
||||
$(this).parents('.collapsed').crmAccordionToggle();
|
||||
}
|
||||
});
|
||||
if (action == '2') {
|
||||
$('.crm-accordion-wrapper').not('.crm-accordion-wrapper .crm-accordion-wrapper').each(function() {
|
||||
highlightTabs(this);
|
||||
});
|
||||
$('#crm-container').on('change click', '.crm-accordion-body :input, .crm-accordion-body a', function() {
|
||||
highlightTabs($(this).parents('.crm-accordion-wrapper'));
|
||||
});
|
||||
}
|
||||
function highlightTabs(tab) {
|
||||
//highlight the tab having data inside.
|
||||
$('.crm-accordion-body :input', tab).each( function() {
|
||||
var active = false;
|
||||
switch($(this).prop('type')) {
|
||||
case 'checkbox':
|
||||
case 'radio':
|
||||
if($(this).is(':checked') && !$(this).is('[id$=IsPrimary],[id$=IsBilling]')) {
|
||||
$('.crm-accordion-header:first', tab).addClass('active');
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
|
||||
case 'text':
|
||||
case 'textarea':
|
||||
if($(this).val()) {
|
||||
$('.crm-accordion-header:first', tab).addClass('active');
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
|
||||
case 'select-one':
|
||||
case 'select-multiple':
|
||||
if($(this).val() && $('option[value=""]', this).length > 0) {
|
||||
$('.crm-accordion-header:first', tab).addClass('active');
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
|
||||
case 'file':
|
||||
if($(this).next().html()) {
|
||||
$('.crm-accordion-header:first', tab).addClass('active');
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
}
|
||||
$('.crm-accordion-header:first', tab).removeClass('active');
|
||||
});
|
||||
}
|
||||
|
||||
$('a#expand').click( function() {
|
||||
if( $(this).attr('href') == '#expand') {
|
||||
var message = {/literal}"{ts escape='js'}Collapse all tabs{/ts}"{literal};
|
||||
$(this).attr('href', '#collapse');
|
||||
$('.crm-accordion-wrapper.collapsed').crmAccordionToggle();
|
||||
}
|
||||
else {
|
||||
var message = {/literal}"{ts escape='js'}Expand all tabs{/ts}"{literal};
|
||||
$('.crm-accordion-wrapper:not(.collapsed)').crmAccordionToggle();
|
||||
$(this).attr('href', '#expand');
|
||||
}
|
||||
$(this).html(message);
|
||||
return false;
|
||||
});
|
||||
|
||||
$('.customDataPresent').change(function() {
|
||||
var values = $("#contact_sub_type").val();
|
||||
CRM.buildCustomData({/literal}"{$contactType}"{literal}, values).one('crmLoad', function() {
|
||||
highlightTabs(this);
|
||||
loadMultiRecordFields(values);
|
||||
});
|
||||
});
|
||||
|
||||
function loadMultiRecordFields(subTypeValues) {
|
||||
if (subTypeValues === false) {
|
||||
subTypeValues = null;
|
||||
}
|
||||
else if (!subTypeValues) {
|
||||
subTypeValues = {/literal}"{$paramSubType}"{literal};
|
||||
}
|
||||
function loadNextRecord(i, groupValue, groupCount) {
|
||||
if (i < groupCount) {
|
||||
CRM.buildCustomData({/literal}"{$contactType}"{literal}, subTypeValues, null, i, groupValue, true).one('crmLoad', function() {
|
||||
highlightTabs(this);
|
||||
loadNextRecord(i+1, groupValue, groupCount);
|
||||
});
|
||||
}
|
||||
}
|
||||
{/literal}
|
||||
{foreach from=$customValueCount item="groupCount" key="groupValue"}
|
||||
{if $groupValue}{literal}
|
||||
loadNextRecord(1, {/literal}{$groupValue}{literal}, {/literal}{$groupCount}{literal});
|
||||
{/literal}
|
||||
{/if}
|
||||
{/foreach}
|
||||
{literal}
|
||||
}
|
||||
|
||||
loadMultiRecordFields();
|
||||
|
||||
{/literal}{if $oldSubtypes}{literal}
|
||||
$('input[name=_qf_Contact_upload_view], input[name=_qf_Contact_upload_new]').click(function() {
|
||||
var submittedSubtypes = $('#contact_sub_type').val();
|
||||
var oldSubtypes = {/literal}{$oldSubtypes}{literal};
|
||||
|
||||
var warning = false;
|
||||
$.each(oldSubtypes, function(index, subtype) {
|
||||
if ( $.inArray(subtype, submittedSubtypes) < 0 ) {
|
||||
warning = true;
|
||||
}
|
||||
});
|
||||
if ( warning ) {
|
||||
return confirm({/literal}'{ts escape="js"}One or more contact subtypes have been de-selected from the list for this contact. Any custom data associated with de-selected subtype will be removed as long as the contact does not have a contact subtype still selected. Click OK to proceed, or Cancel to review your changes before saving.{/ts}'{literal});
|
||||
}
|
||||
return true;
|
||||
});
|
||||
{/literal}{/if}{literal}
|
||||
|
||||
// Handle delete of multi-record custom data
|
||||
$form.on('click', '.crm-custom-value-del', function(e) {
|
||||
e.preventDefault();
|
||||
var $el = $(this),
|
||||
msg = '{/literal}{ts escape="js"}The record will be deleted immediately. This action cannot be undone.{/ts}{literal}';
|
||||
CRM.confirm({title: $el.attr('title'), message: msg})
|
||||
.on('crmConfirm:yes', function() {
|
||||
var url = CRM.url('civicrm/ajax/customvalue');
|
||||
var request = $.post(url, $el.data('post'));
|
||||
CRM.status({success: '{/literal}{ts escape="js"}Record Deleted{/ts}{literal}'}, request);
|
||||
var addClass = '.add-more-link-' + $el.data('post').groupID;
|
||||
$el.closest('div.crm-custom-accordion').remove();
|
||||
$('div' + addClass).last().show();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
{/literal}
|
||||
|
||||
{* jQuery validate *}
|
||||
{include file="CRM/Form/validate.tpl"}
|
||||
|
||||
{* include common additional blocks tpl *}
|
||||
{include file="CRM/common/additionalBlocks.tpl"}
|
||||
|
||||
{/if}
|
|
@ -0,0 +1,64 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{* this template is used for building tabbed custom data *}
|
||||
{if $cdType || $postedInfo}
|
||||
{include file="CRM/Custom/Form/CustomData.tpl"}
|
||||
{if $multiRecordDisplay eq 'single'}
|
||||
<div class="crm-submit-buttons">{$form.buttons.html}</div>
|
||||
{/if}
|
||||
{else}
|
||||
<div id="customData"></div>
|
||||
<div class="crm-submit-buttons">{$form.buttons.html}</div>
|
||||
|
||||
{*include custom data js file*}
|
||||
{include file="CRM/common/customData.tpl"}
|
||||
|
||||
{if $customValueCount}
|
||||
{literal}
|
||||
<script type="text/javascript">
|
||||
CRM.$(function() {
|
||||
{/literal}
|
||||
var customValueCount = "{$customValueCount}",
|
||||
groupID = "{$groupID}",
|
||||
contact_type = "{$contact_type}",
|
||||
contact_subtype = "{$contact_subtype}",
|
||||
i = 1;
|
||||
{literal}
|
||||
// FIXME: This is pretty terrible. Loading each item at a time via ajax.
|
||||
// Building the complete form in php with no ajax would be way more efficient.
|
||||
function loadNextRecord() {
|
||||
if (i < customValueCount) {
|
||||
CRM.buildCustomData(contact_type, contact_subtype, null, i++, groupID, true).one('crmLoad', loadNextRecord);
|
||||
}
|
||||
}
|
||||
CRM.buildCustomData(contact_type, contact_subtype).one('crmLoad', loadNextRecord);
|
||||
});
|
||||
</script>
|
||||
{/literal}
|
||||
{/if}
|
||||
{include file="CRM/Form/attachmentjs.tpl"}
|
||||
{/if}
|
||||
|
|
@ -0,0 +1,45 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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-dedupe-find-form-block">
|
||||
<div class="help">
|
||||
{ts}You can search all contacts for duplicates or limit the results for better performance.
|
||||
If you limit by group then it will look for matches with that group both inside and outside of the group.
|
||||
You can also limit the contacts in the group to be matched by specifying the number of contacts to match. This can be done in conjunction with a group or separately and is recommended for performance reasons.
|
||||
{/ts}
|
||||
</div>
|
||||
<div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
|
||||
<table class="form-layout-compressed">
|
||||
<tr class="crm-dedupe-find-form-block-group_id">
|
||||
<td class="label">{$form.group_id.label}</td>
|
||||
<td>{$form.group_id.html}</td>
|
||||
</tr>
|
||||
<tr class="crm-dedupe-find-form-block-limit">
|
||||
<td class="label">{$form.limit.label}</td>
|
||||
<td>{$form.limit.html}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="bottom"}</div>
|
||||
</div>
|
|
@ -0,0 +1,115 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
|
||||
<h3>{ts 1=$contact_type}Matching Rule for %1 Contacts{/ts}</h3>
|
||||
<div class="crm-block crm-form-block crm-dedupe-rules-form-block">
|
||||
<div class="help">
|
||||
{ts}Configure up to five fields to evaluate when searching for 'suspected' duplicate contact records.{/ts} {help id="id-rules"}
|
||||
</div>
|
||||
<div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
|
||||
<table class="form-layout">
|
||||
<tr class="crm-dedupe-rules-form-block-title">
|
||||
<td class="label">{$form.title.label}</td>
|
||||
<td>
|
||||
{$form.title.html}
|
||||
<div class="description">
|
||||
{ts}Enter descriptive name for this matching rule.{/ts}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="crm-dedupe-rules-form-block-used">
|
||||
<td class="label">{$form.used.label}</td>
|
||||
<td>{$form.used.html} {help id="id-rule-used"}</td>
|
||||
</tr>
|
||||
<tr class="crm-dedupe-rules-form-block-is_reserved">
|
||||
<td class="label">{$form.is_reserved.label}</td>
|
||||
<td>{$form.is_reserved.html}
|
||||
{if !$isReserved}
|
||||
<br />
|
||||
<span class="description">{ts}WARNING: Once a rule is marked as reserved it can not be deleted and the fields and weights can not be modified.{/ts}</span>
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="crm-dedupe-rules-form-block-fields">
|
||||
<td></td>
|
||||
<td>
|
||||
<table class="form-layout-compressed">
|
||||
{* Hide fields and document match criteria for optimized reserved rules. *}
|
||||
{if $ruleName EQ 'IndividualSupervised' OR $ruleName EQ 'IndividualUnsupervised' OR $ruleName EQ 'IndividualGeneral'}
|
||||
<tr>
|
||||
<td>
|
||||
<div class="status message">
|
||||
{ts}This reserved rule is pre-configured with matching fields to optimize dedupe scanning performance. It matches on:{/ts}
|
||||
<ul>
|
||||
{if $ruleName EQ 'IndividualUnsupervised'}
|
||||
<li>{ts}Email only{/ts}</li>
|
||||
{elseif $ruleName EQ 'IndividualSupervised'}
|
||||
<li>{ts}Email{/ts}</li>
|
||||
<li>{ts}First Name{/ts}</li>
|
||||
<li>{ts}Last Name{/ts}</li>
|
||||
{elseif $ruleName EQ 'IndividualGeneral'}
|
||||
<li>{ts}First Name{/ts}</li>
|
||||
<li>{ts}Last Name{/ts}</li>
|
||||
<li>{ts}Middle Name (if present){/ts}</li>
|
||||
<li>{ts}Suffix (if present){/ts}</li>
|
||||
<li>{ts}Street Address (if present){/ts}</li>
|
||||
<li>{ts}Birth Date (if present){/ts}</li>
|
||||
{/if}
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{else}
|
||||
{if $isReserved}
|
||||
<tr>
|
||||
<td>
|
||||
<div class="status message">
|
||||
{ts}Note: You cannot edit fields for a reserved rule.{/ts}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
<tr class="columnheader"><td>{ts}Field{/ts}</td><td>{ts}Length{/ts}</td><td>{ts}Weight{/ts}</td></tr>
|
||||
{section name=count loop=5}
|
||||
{capture assign=where}where_{$smarty.section.count.index}{/capture}
|
||||
{capture assign=length}length_{$smarty.section.count.index}{/capture}
|
||||
{capture assign=weight}weight_{$smarty.section.count.index}{/capture}
|
||||
<tr class="{cycle values="odd-row,even-row"}">
|
||||
<td>{$form.$where.html}</td>
|
||||
<td>{$form.$length.html}</td>
|
||||
<td>{$form.$weight.html}</td>
|
||||
</tr>
|
||||
{/section}
|
||||
<tr class="columnheader"><td colspan="2">{$form.threshold.label}</td>
|
||||
<td>{$form.threshold.html}</td>
|
||||
</tr>
|
||||
{/if}
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="bottom"}</div>
|
||||
</div>
|
|
@ -0,0 +1,62 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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="domain-name-title"}
|
||||
{ts}Domain Name{/ts}
|
||||
{/htxt}
|
||||
{htxt id="domain-name"}
|
||||
{ts 1='{domain.name}'}Enter the name of the organization or entity which owns this CiviCRM domain. Use the %1 token to include this value in mailing content. It is used in the default Opt-out Message.{/ts}
|
||||
{/htxt}
|
||||
|
||||
|
||||
{htxt id="from-name-title"}
|
||||
{ts}From Name{/ts}
|
||||
{/htxt}
|
||||
{htxt id="from-name"}
|
||||
{ts}The FROM Name and Email Address are used when automated emails are sent from this domain (e.g. subscribe and unsubscribe confirmations...). This Name and Email Address are also used as the default 'sender' values when you create a new CiviMail Mailing.{/ts}
|
||||
{/htxt}
|
||||
|
||||
{htxt id="from-email-title"}
|
||||
{ts}From Address{/ts}
|
||||
{/htxt}
|
||||
{htxt id="from-email"}
|
||||
{ts}The FROM Name and Email Address are used when automated emails are sent from this domain (e.g. subscribe and unsubscribe confirmations...). This Name and Email Address are also used as the default 'sender' values when you create a new CiviMail Mailing.{/ts}
|
||||
{/htxt}
|
||||
|
||||
{htxt id="return-path-title"}
|
||||
{ts}Return Path{/ts}
|
||||
{/htxt}
|
||||
{htxt id="return-path"}
|
||||
{ts}Use this field if you need to populate the <code>Return-Path</code> mail header element with a fixed value (e.g., <code>myuser@example.org</code>). Enter a fully qualified email address which belongs to a valid SMTP account in your domain. This address will not be seen by 'typical' email clients. Consult with your SMTP provider what address to put in here so that the SMTP server accepts outgoing mail from CiviMail. If this field is left blank, the <code>From</code> email address will be used as the <code>Return-Path</code>.{/ts}
|
||||
{/htxt}
|
||||
|
||||
{htxt id="additional-contact-title"}
|
||||
{ts}Additional Fields{/ts}
|
||||
{/htxt}
|
||||
{htxt id="additional-contact"}
|
||||
{capture assign=componentUrl}{crmURL p="civicrm/admin/component" q="reset=1"}{/capture}
|
||||
{ts 1=$componentUrl 2='{domain.email}' 3='{domain.phone}'}You can also include general email and/or phone contact information in mailings by filling in the fields below, and then using the %2 and %3 tokens in your mailings. These are particularly useful for inclusion in pre-configured mailing <a href='%1'>Headers or Footers</a>.{/ts}
|
||||
{/htxt}
|
||||
|
|
@ -0,0 +1,92 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{* this template is used for viewing and editing Domain information (for system-generated emails CiviMail-related values) *}
|
||||
<div class="crm-block crm-form-block crm-domain-form-block">
|
||||
{if !($action eq 4)}
|
||||
<div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
|
||||
{/if}
|
||||
<table class="form-layout-compressed">
|
||||
<tr>
|
||||
<td>
|
||||
{$form.name.label}{help id="domain-name"}<br />
|
||||
{$form.name.html}
|
||||
<br /><span class="description">{ts}The name of the organization or entity which owns this CiviCRM site or domain. This is the default organization contact record.{/ts}</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{$form.description.label}<br />
|
||||
{$form.description.html}
|
||||
<br /><span class="description">{ts}Optional description of this domain (useful for sites with multiple domains).{/ts}</span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h3>{ts}System-generated Mail Settings{/ts}</h3>
|
||||
<table class="form-layout-compressed">
|
||||
<tr>
|
||||
<td>
|
||||
{$form.email_name.label} {help id="from-name"}<br />
|
||||
{$form.email_name.html}
|
||||
</td>
|
||||
<td class="">
|
||||
{$form.email_address.label} {help id="from-email"}<br />
|
||||
{$form.email_address.html}
|
||||
<br /><span class="description">(info@example.org)</span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h3>{ts}Default Organization Address{/ts}</h3>
|
||||
<div class="description">{ts 1={domain.address}}CiviMail mailings must include the sending organization's address. This is done by putting the %1 token in either the body or footer of the mailing. This token may also be used in regular 'Email - send now' messages and in other Message Templates. The token is replaced by the address entered below when the message is sent.{/ts}</div>
|
||||
{include file="CRM/Contact/Form/Edit/Address.tpl"}
|
||||
<h3>{ts}Organization Contact Information{/ts}</h3>
|
||||
<div class="description">{ts}You can also include general email and/or phone contact information in mailings.{/ts} {help id="additional-contact"}</div>
|
||||
<table class="form-layout-compressed">
|
||||
{* Display the email block *}
|
||||
{include file="CRM/Contact/Form/Edit/Email.tpl"}
|
||||
|
||||
{* Display the phone block *}
|
||||
{include file="CRM/Contact/Form/Edit/Phone.tpl"}
|
||||
</table>
|
||||
|
||||
<div class="spacer"></div>
|
||||
|
||||
{if ($action eq 4)}
|
||||
<div class="action-link">
|
||||
<a href="{crmURL q="action=update&reset=1"}" id="editDomainInfo">» {ts}Edit Domain Information{/ts}</a>
|
||||
</div>
|
||||
{/if}
|
||||
{if !($action eq 4)}
|
||||
<div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="bottom"}</div>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
{* phone_2 a email_2 only included in form if CiviMail enabled. *}
|
||||
{if array_search('CiviMail', $config->enableComponents)}
|
||||
<script type="text/javascript">
|
||||
cj('a#addEmail,a#addPhone').hide();
|
||||
</script>
|
||||
{/if}
|
|
@ -0,0 +1,111 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{* This file provides the plugin for the Address block *}
|
||||
{* @var $form Contains the array for the form elements and other form associated information assigned to the template by the controller*}
|
||||
{* @var $blockId Contains the current address block id, and assigned in the CRM/Contact/Form/Location.php file *}
|
||||
|
||||
{if $title and $className eq 'CRM_Contact_Form_Contact'}
|
||||
<div id="addressBlockId" class="crm-accordion-wrapper crm-address-accordion collapsed">
|
||||
<div class="crm-accordion-header">
|
||||
{$title}
|
||||
</div><!-- /.crm-accordion-header -->
|
||||
<div class="crm-accordion-body" id="addressBlock">
|
||||
{/if}
|
||||
|
||||
<div id="Address_Block_{$blockId}" {if $className eq 'CRM_Contact_Form_Contact'} class="boxBlock crm-edit-address-block crm-address_{$blockId}"{/if}>
|
||||
{if $blockId gt 1}<fieldset><legend>{ts}Supplemental Address{/ts}</legend>{/if}
|
||||
<table class="form-layout-compressed crm-edit-address-form">
|
||||
{if $masterAddress.$blockId gt 0 }
|
||||
<tr><td><div class="message status"><div class="icon inform-icon"></div> {ts 1=$masterAddress.$blockId}This address is shared with %1 contact record(s). Modifying this address will automatically update the shared address for these contacts.{/ts}</div></td></tr>
|
||||
{/if}
|
||||
|
||||
{if $className eq 'CRM_Contact_Form_Contact'}
|
||||
<tr>
|
||||
<td id='Address-Primary-html' colspan="2">
|
||||
<span class="crm-address-element location_type_id-address-element">{$form.address.$blockId.location_type_id.label}
|
||||
{$form.address.$blockId.location_type_id.html}</span>
|
||||
<span class="crm-address-element is_primary-address-element">{$form.address.$blockId.is_primary.html}</span>
|
||||
<span class="crm-address-element is_billing-address-element">{$form.address.$blockId.is_billing.html}</span>
|
||||
</td>
|
||||
{if $blockId gt 0}
|
||||
<td>
|
||||
<a href="#" title="{ts}Delete Address Block{/ts}" onClick="removeBlock( 'Address', '{$blockId}' ); return false;">{ts}Delete this address{/ts}</a>
|
||||
</td>
|
||||
{/if}
|
||||
</tr>
|
||||
|
||||
{* include shared address template *}
|
||||
{include file="CRM/Contact/Form/ShareAddress.tpl"}
|
||||
|
||||
{/if}
|
||||
<tr>
|
||||
<td>
|
||||
<table id="address_table_{$blockId}" class="form-layout-compressed">
|
||||
{* build address block w/ address sequence. *}
|
||||
{foreach item=addressElement from=$addressSequence}
|
||||
{include file=CRM/Contact/Form/Edit/Address/$addressElement.tpl}
|
||||
{/foreach}
|
||||
{include file=CRM/Contact/Form/Edit/Address/geo_code.tpl}
|
||||
</table>
|
||||
</td>
|
||||
<td colspan="2">
|
||||
<div class="crm-edit-address-custom_data crm-address-custom-set-block-{$blockId}">
|
||||
{include file="CRM/Contact/Form/Edit/Address/CustomData.tpl"}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
{if $className eq 'CRM_Contact_Form_Contact'}
|
||||
<div id="addMoreAddress{$blockId}" class="crm-add-address-wrapper">
|
||||
<a href="#" class="button" onclick="buildAdditionalBlocks( 'Address', '{$className}' );return false;"><span><i class="crm-i fa-plus-circle"></i> {ts}Another Address{/ts}</span></a>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if $title and $className eq 'CRM_Contact_Form_Contact'}
|
||||
</div>
|
||||
</div><!-- /.crm-accordion-body -->
|
||||
</div><!-- /.crm-accordion-wrapper -->
|
||||
{/if}
|
||||
{literal}
|
||||
<script type="text/javascript">
|
||||
//to check if same location type is already selected.
|
||||
function checkLocation( object, noAlert ) {
|
||||
var ele = cj('#' + object);
|
||||
var selectedText = cj(':selected', ele).text();
|
||||
cj('td#Address-Primary-html select').each( function() {
|
||||
element = cj(this).attr('id');
|
||||
if ( cj(this).val() && element != object && selectedText == cj(':selected', this).text() ) {
|
||||
if ( !noAlert ) {
|
||||
var alertText = selectedText + {/literal}" {ts escape='js'}has already been assigned to another address. Please select another location for this address.{/ts}"{literal};
|
||||
ele.crmError(alertText);
|
||||
}
|
||||
cj( '#' + object ).val('');
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
{/literal}
|
|
@ -0,0 +1,49 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
|
||||
{foreach from=$address_groupTree.$blockId item=cd_edit key=group_id}
|
||||
<div id="{$cd_edit.name}_{$group_id}_{$blockId}" class="form-item">
|
||||
<div class="crm-collapsible crm-{$cd_edit.name}_{$group_id}_{$blockId}-accordion {if $cd_edit.collapse_display}collapsed{/if}">
|
||||
<div class="collapsible-title">
|
||||
{$cd_edit.title}
|
||||
</div>
|
||||
<div>
|
||||
{if $cd_edit.help_pre}
|
||||
<div class="messages help">{$cd_edit.help_pre}</div>
|
||||
{/if}
|
||||
<table class="form-layout-compressed">
|
||||
{foreach from=$cd_edit.fields item=element key=field_id}
|
||||
{include file="CRM/Contact/Form/Edit/Address/CustomField.tpl"}
|
||||
{/foreach}
|
||||
</table>
|
||||
<div class="spacer"></div>
|
||||
{if $cd_edit.help_post}<div class="messages help">{$cd_edit.help_post}</div>{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="custom_group_{$group_id}_{$blockId}"></div>
|
||||
</div>
|
||||
{/foreach}
|
|
@ -0,0 +1,107 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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="element_name" value=$element.element_custom_name}
|
||||
{if $element.is_view eq 0}{* fix for CRM-3510 *}
|
||||
{if $element.help_pre}
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td class="html-adjust description">{$element.help_pre}</td>
|
||||
</tr>
|
||||
{/if}
|
||||
{if $element.options_per_line != 0 }
|
||||
<tr>
|
||||
<td class="label">{$form.address.$blockId.$element_name.label}</td>
|
||||
<td class="html-adjust">
|
||||
{assign var="count" value="1"}
|
||||
<table class="form-layout-compressed" style="margin-top: -0.5em;">
|
||||
<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.address.$blockId.$element_name}
|
||||
{if $index < 10}
|
||||
{assign var="index" value=`$index+1`}
|
||||
{else}
|
||||
<td class="labels font-light">{$form.address.$blockId.$element_name.$key.html}</td>
|
||||
{if $count == $element.options_per_line}
|
||||
</tr>
|
||||
<tr>
|
||||
{assign var="count" value="1"}
|
||||
{else}
|
||||
{assign var="count" value=`$count+1`}
|
||||
{/if}
|
||||
{/if}
|
||||
{/foreach}
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
{if $element.help_post}
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td class="description">{$element.help_post}<br /> </td>
|
||||
</tr>
|
||||
{/if}
|
||||
{else}
|
||||
<tr>
|
||||
<td class="label">{$form.address.$blockId.$element_name.label}</td>
|
||||
<td class="html-adjust">
|
||||
{$form.address.$blockId.$element_name.html}
|
||||
|
||||
{if $element.data_type eq 'File'}
|
||||
{if $element.element_value.data}
|
||||
<span class="html-adjust"><br />
|
||||
{ts}Attached File{/ts}:
|
||||
{if $element.element_value.displayURL }
|
||||
<a href="{$element.element_value.displayURL}" class='crm-image-popup'>
|
||||
<img src="{$element.element_value.displayURL}" height = "100" width="100">
|
||||
</a>
|
||||
{else}
|
||||
<a href="{$element.element_value.fileURL}">{$element.element_value.fileName}</a>
|
||||
{/if}
|
||||
{if $element.element_value.deleteURL }
|
||||
<br />
|
||||
{$element.element_value.deleteURL}
|
||||
{/if}
|
||||
</span>
|
||||
{/if}
|
||||
{elseif $element.html_type eq 'Autocomplete-Select'}
|
||||
{assign var="element_name" value="address[$blockId][$element_name]" }
|
||||
{if $element.data_type eq 'ContactReference'}
|
||||
{include file="CRM/Custom/Form/ContactReference.tpl"}
|
||||
{/if}
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
{if $element.help_post}
|
||||
|
||||
<td> </td>
|
||||
<td class="description">{$element.help_post}<br /> </td>
|
||||
</tr>
|
||||
{/if}
|
||||
{/if}
|
||||
{/if}
|
|
@ -0,0 +1,33 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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($form.address.$blockId.name)}
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
{$form.address.$blockId.name.label} {help id="id-address-name" file="CRM/Contact/Form/Contact.hlp"}<br />
|
||||
{$form.address.$blockId.name.html}
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
|
@ -0,0 +1,50 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
<tr><td colspan="3" style="padding:0;">
|
||||
<table class="crm-address-element">
|
||||
<tr>
|
||||
{if !empty($form.address.$blockId.city)}
|
||||
<td>
|
||||
{$form.address.$blockId.city.label}<br />
|
||||
{$form.address.$blockId.city.html}
|
||||
</td>
|
||||
{/if}
|
||||
{if !empty($form.address.$blockId.postal_code)}
|
||||
<td>
|
||||
{$form.address.$blockId.postal_code.label}<br />
|
||||
{$form.address.$blockId.postal_code.html}
|
||||
</td>
|
||||
{if !empty($form.address.$blockId.postal_code_suffix)}
|
||||
<td>
|
||||
{$form.address.$blockId.postal_code_suffix.label} {help id="id-postal-code-suffix" file="CRM/Contact/Form/Contact.hlp"}<br/>
|
||||
{$form.address.$blockId.postal_code_suffix.html}
|
||||
<td>
|
||||
{/if}
|
||||
{/if}
|
||||
<td colspan="2"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</td></tr>
|
|
@ -0,0 +1,44 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
<tr><td colspan="3" style="padding:0;">
|
||||
<table class="crm-address-element">
|
||||
<tr>
|
||||
{if !empty($form.address.$blockId.country_id)}
|
||||
<td>
|
||||
{$form.address.$blockId.country_id.label}<br />
|
||||
{$form.address.$blockId.country_id.html}
|
||||
</td>
|
||||
{/if}
|
||||
{if !empty($form.address.$blockId.state_province_id)}
|
||||
<td>
|
||||
{$form.address.$blockId.state_province_id.label}<br />
|
||||
{$form.address.$blockId.state_province_id.html}
|
||||
</td>
|
||||
{/if}
|
||||
<td colspan="2"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</td></tr>
|
|
@ -0,0 +1,33 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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($form.address.$blockId.county_id)}
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
{$form.address.$blockId.county_id.label}<br />
|
||||
{$form.address.$blockId.county_id.html}<br />
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
|
@ -0,0 +1,42 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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($form.address.$blockId.geo_code_1) && !empty($form.address.$blockId.geo_code_2)}
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
{$form.address.$blockId.geo_code_1.label}, {$form.address.$blockId.geo_code_2.label} {help id="id-geo-code" file="CRM/Contact/Form/Contact.hlp"}<br />
|
||||
{$form.address.$blockId.geo_code_1.html}, {$form.address.$blockId.geo_code_2.html}<br />
|
||||
</td>
|
||||
</tr>
|
||||
{if !empty($form.address.$blockId.manual_geo_code)}
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
{$form.address.$blockId.manual_geo_code.html}
|
||||
{$form.address.$blockId.manual_geo_code.label} {help id="id-geo-code-override" file="CRM/Contact/Form/Contact.hlp"}
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
</tr>
|
||||
{/if}
|
|
@ -0,0 +1,106 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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($form.address.$blockId.street_address)}
|
||||
<tr id="streetAddress_{$blockId}">
|
||||
<td colspan="2">
|
||||
{$form.address.$blockId.street_address.label} {help id="id-street-address" file="CRM/Contact/Form/Contact.hlp"}<br />
|
||||
{$form.address.$blockId.street_address.html}
|
||||
{if $parseStreetAddress eq 1 && ($action eq 1 || $action eq 2)}
|
||||
<a href="#" title="{ts}Edit Address Elements{/ts}" onClick="processAddressFields( 'addressElements' , '{$blockId}', 1 );return false;">{ts}Edit Address Elements{/ts}</a>
|
||||
{help id="id-edit-street-elements" file="CRM/Contact/Form/Contact.hlp"}
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
{if $parseStreetAddress eq 1 && ($action eq 1 || $action eq 2)}
|
||||
<tr id="addressElements_{$blockId}" class=hiddenElement>
|
||||
<td>
|
||||
{$form.address.$blockId.street_number.label}<br />
|
||||
{$form.address.$blockId.street_number.html}
|
||||
</td>
|
||||
|
||||
<td>
|
||||
{$form.address.$blockId.street_name.label}<br />
|
||||
{$form.address.$blockId.street_name.html}<br />
|
||||
</td>
|
||||
|
||||
<td colspan="2">
|
||||
{$form.address.$blockId.street_unit.label}<br />
|
||||
{$form.address.$blockId.street_unit.html}
|
||||
<a href="#" title="{ts}Edit Street Address{/ts}" onClick="processAddressFields( 'streetAddress', '{$blockId}', 1 );return false;">{ts}Edit Complete Street Address{/ts}</a>
|
||||
{help id="id-edit-complete-street" file="CRM/Contact/Form/Contact.hlp"}
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
|
||||
{if $parseStreetAddress eq 1}
|
||||
{literal}
|
||||
<script type="text/javascript">
|
||||
function processAddressFields( name, blockId, loadData ) {
|
||||
|
||||
if ( loadData ) {
|
||||
var allAddressValues = {/literal}{if $allAddressFieldValues}{$allAddressFieldValues}{else}''{/if}{literal};
|
||||
|
||||
var streetName = eval( "allAddressValues.street_name_" + blockId );
|
||||
if (streetName === null) streetName = '';
|
||||
var streetUnit = eval( "allAddressValues.street_unit_" + blockId );
|
||||
if (streetUnit === null) streetUnit = '';
|
||||
var streetNumber = eval( "allAddressValues.street_number_" + blockId );
|
||||
if (streetNumber === null) streetNumber = '';
|
||||
var streetAddress = eval( "allAddressValues.street_address_" + blockId );
|
||||
if (streetAddress === null) streetAddress = '';
|
||||
}
|
||||
|
||||
if ( name == 'addressElements' ) {
|
||||
if ( loadData ) {
|
||||
streetAddress = '';
|
||||
}
|
||||
|
||||
cj('#addressElements_' + blockId).show();
|
||||
cj('#streetAddress_' + blockId).hide();
|
||||
} else {
|
||||
if ( loadData ) {
|
||||
streetNumber = streetName = streetUnit = '';
|
||||
}
|
||||
|
||||
cj('#streetAddress_' + blockId).show();
|
||||
cj('#addressElements_'+ blockId).hide();
|
||||
}
|
||||
|
||||
// set the values.
|
||||
if ( loadData ) {
|
||||
cj( '#address_' + blockId +'_street_name' ).val( streetName );
|
||||
cj( '#address_' + blockId +'_street_unit' ).val( streetUnit );
|
||||
cj( '#address_' + blockId +'_street_number' ).val( streetNumber );
|
||||
cj( '#address_' + blockId +'_street_address' ).val( streetAddress );
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
{/literal}
|
||||
{/if}
|
||||
{/if}
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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($form.address.$blockId.supplemental_address_1)}
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
{$form.address.$blockId.supplemental_address_1.label} {help id="id-supplemental-address" file="CRM/Contact/Form/Contact.hlp"}<br />
|
||||
{$form.address.$blockId.supplemental_address_1.html}
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
|
@ -0,0 +1,33 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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($form.address.$blockId.supplemental_address_2)}
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
{$form.address.$blockId.supplemental_address_2.label}<br />
|
||||
{$form.address.$blockId.supplemental_address_2.html}
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
|
@ -0,0 +1,33 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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($form.address.$blockId.supplemental_address_3)}
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
{$form.address.$blockId.supplemental_address_3.label}<br />
|
||||
{$form.address.$blockId.supplemental_address_3.html}
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
|
@ -0,0 +1,53 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{literal}
|
||||
<script type="text/javascript">
|
||||
CRM.$(function($) {
|
||||
var $form = $('form.{/literal}{$form.formClass}{literal}');
|
||||
$('#postal_greeting_id, #addressee_id, #email_greeting_id', $form).change(function() {
|
||||
var fldName = $(this).attr('id');
|
||||
if ($(this).val() == 4) {
|
||||
$("#greetings1, #greetings2", $form).show();
|
||||
$("#" + fldName + "_html, #" + fldName + "_label", $form).show();
|
||||
} else {
|
||||
$("#" + fldName + "_html, #" + fldName + "_label", $form).hide();
|
||||
$("#" + fldName.slice(0, -3) + "_custom", $form).val('');
|
||||
}
|
||||
});
|
||||
|
||||
$('.replace-plain[data-id]', $form).click(function() {
|
||||
var element = $(this).data('id');
|
||||
$(this).hide();
|
||||
$('#' + element, $form).show();
|
||||
var fldName = '#' + element + '_id';
|
||||
if ($(fldName, $form).val() == 4) {
|
||||
$("#greetings1, #greetings2", $form).show();
|
||||
$(fldName + "_html, " + fldName + "_label", $form).show();
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{/literal}
|
|
@ -0,0 +1,132 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{* This file provides the plugin for the communication preferences in all the three types of contact *}
|
||||
{* @var $form Contains the array for the form elements and other form associated information assigned to the template by the controller *}
|
||||
|
||||
<div class="crm-accordion-wrapper crm-commPrefs-accordion collapsed">
|
||||
<div class="crm-accordion-header">
|
||||
{$title}
|
||||
</div><!-- /.crm-accordion-header -->
|
||||
<div id="commPrefs" class="crm-accordion-body">
|
||||
<table class="form-layout-compressed" >
|
||||
{if !empty($form.communication_style_id)}
|
||||
<tr><td colspan='4'>
|
||||
<span class="label">{$form.communication_style_id.label} {help id="id-communication_style" file="CRM/Contact/Form/Contact.hlp"}</span>
|
||||
<span class="value">{$form.communication_style_id.html}</span>
|
||||
</td><tr>
|
||||
{/if}
|
||||
<tr>
|
||||
{if !empty($form.email_greeting_id)}
|
||||
<td>{$form.email_greeting_id.label}</td>
|
||||
{/if}
|
||||
{if !empty($form.postal_greeting_id)}
|
||||
<td>{$form.postal_greeting_id.label}</td>
|
||||
{/if}
|
||||
{if !empty($form.addressee_id)}
|
||||
<td>{$form.addressee_id.label}</td>
|
||||
{/if}
|
||||
{if !empty($form.email_greeting_id) OR !empty($form.postal_greeting_id) OR !empty($form.addressee_id)}
|
||||
<td> {help id="id-greeting" file="CRM/Contact/Form/Contact.hlp"}</td>
|
||||
{/if}
|
||||
</tr>
|
||||
<tr>
|
||||
{if !empty($form.email_greeting_id)}
|
||||
<td>
|
||||
<span id="email_greeting" {if !empty($email_greeting_display) and $action eq 2} class="hiddenElement"{/if}>{$form.email_greeting_id.html|crmAddClass:big}</span>
|
||||
{if !empty($email_greeting_display) and $action eq 2}
|
||||
<div data-id="email_greeting" class="replace-plain" title="{ts}Click to edit{/ts}">
|
||||
{$email_greeting_display}
|
||||
</div>
|
||||
{/if}
|
||||
</td>
|
||||
{/if}
|
||||
{if !empty($form.postal_greeting_id)}
|
||||
<td>
|
||||
<span id="postal_greeting" {if !empty($postal_greeting_display) and $action eq 2} class="hiddenElement"{/if}>{$form.postal_greeting_id.html|crmAddClass:big}</span>
|
||||
{if !empty($postal_greeting_display) and $action eq 2}
|
||||
<div data-id="postal_greeting" class="replace-plain" title="{ts}Click to edit{/ts}">
|
||||
{$postal_greeting_display}
|
||||
</div>
|
||||
{/if}
|
||||
</td>
|
||||
{/if}
|
||||
{if !empty($form.addressee_id)}
|
||||
<td>
|
||||
<span id="addressee" {if !empty($addressee_display) and $action eq 2} class="hiddenElement"{/if}>{$form.addressee_id.html|crmAddClass:big}</span>
|
||||
{if !empty($addressee_display) and $action eq 2}
|
||||
<div data-id="addressee" class="replace-plain" title="{ts}Click to edit{/ts}">
|
||||
{$addressee_display}
|
||||
</div>
|
||||
{/if}
|
||||
</td>
|
||||
{/if}
|
||||
</tr>
|
||||
<tr id="greetings1" class="hiddenElement">
|
||||
{if !empty($form.email_greeting_custom)}
|
||||
<td><span id="email_greeting_id_label" class="hiddenElement">{$form.email_greeting_custom.label}</span></td>
|
||||
{/if}
|
||||
{if !empty($form.postal_greeting_custom)}
|
||||
<td><span id="postal_greeting_id_label" class="hiddenElement">{$form.postal_greeting_custom.label}</span></td>
|
||||
{/if}
|
||||
{if !empty($form.addressee_custom)}
|
||||
<td><span id="addressee_id_label" class="hiddenElement">{$form.addressee_custom.label}</span></td>
|
||||
{/if}
|
||||
</tr>
|
||||
<tr id="greetings2" class="hiddenElement">
|
||||
{if !empty($form.email_greeting_custom)}
|
||||
<td><span id="email_greeting_id_html" class="hiddenElement">{$form.email_greeting_custom.html|crmAddClass:big}</span></td>
|
||||
{/if}
|
||||
{if !empty($form.postal_greeting_custom)}
|
||||
<td><span id="postal_greeting_id_html" class="hiddenElement">{$form.postal_greeting_custom.html|crmAddClass:big}</span></td>
|
||||
{/if}
|
||||
{if !empty($form.addressee_custom)}
|
||||
<td><span id="addressee_id_html" class="hiddenElement">{$form.addressee_custom.html|crmAddClass:big}</span></td>
|
||||
{/if}
|
||||
</tr>
|
||||
<tr>
|
||||
{foreach key=key item=item from=$commPreference}
|
||||
<td>
|
||||
<br/><span class="label">{$form.$key.label}</span> {help id="id-$key" file="CRM/Contact/Form/Contact.hlp"}
|
||||
<br/>{$form.$key.html}
|
||||
</td>
|
||||
{/foreach}
|
||||
<td>
|
||||
<br/><span class="label">{$form.preferred_language.label}</span>
|
||||
<br/>{$form.preferred_language.html}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{$form.is_opt_out.html} {$form.is_opt_out.label} {help id="id-optOut" file="CRM/Contact/Form/Contact.hlp"}</td>
|
||||
{if !empty($form.preferred_mail_format)}
|
||||
<td>{$form.preferred_mail_format.label}
|
||||
{$form.preferred_mail_format.html} {help id="id-emailFormat" file="CRM/Contact/Form/Contact.hlp"}
|
||||
</td>
|
||||
{/if}
|
||||
</tr>
|
||||
</table>
|
||||
</div><!-- /.crm-accordion-body -->
|
||||
</div><!-- /.crm-accordion-wrapper -->
|
||||
{include file="CRM/Contact/Form/Edit/CommunicationPreferences.js.tpl"}
|
|
@ -0,0 +1,66 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
|
||||
{foreach from=$groupTree item=cd_edit key=group_id}
|
||||
{if $cd_edit.is_multiple eq 1}
|
||||
{assign var=tableID value=$cd_edit.table_id}
|
||||
{assign var=divName value=$group_id|cat:"_$tableID"}
|
||||
<div></div>
|
||||
<div
|
||||
class="crm-accordion-wrapper crm-custom-accordion {if $cd_edit.collapse_display and !$skipTitle}collapsed{/if}">
|
||||
{else}
|
||||
<div id="{$cd_edit.name}"
|
||||
class="crm-accordion-wrapper crm-custom-accordion {if $cd_edit.collapse_display}collapsed{/if}">
|
||||
{/if}
|
||||
<div class="crm-accordion-header">
|
||||
{$cd_edit.title}
|
||||
</div>
|
||||
|
||||
<div id="customData{$group_id}" class="crm-accordion-body">
|
||||
{if $cd_edit.is_multiple eq 1}
|
||||
{if $cd_edit.table_id}
|
||||
<table class="no-border">
|
||||
<tr>
|
||||
<a href="#" class="crm-hover-button crm-custom-value-del" title="{ts 1=$cd_edit.title}Delete %1{/ts}"
|
||||
data-post='{ldelim}"valueID": "{$tableID}", "groupID": "{$group_id}", "contactId": "{$contactId}", "key": "{crmKey name='civicrm/ajax/customvalue'}"{rdelim}'>
|
||||
<span class="icon delete-icon"></span> {ts}Delete{/ts}
|
||||
</a>
|
||||
<!-- crm-submit-buttons -->
|
||||
</tr>
|
||||
</table>
|
||||
{/if}
|
||||
{/if}
|
||||
{include file="CRM/Custom/Form/CustomData.tpl" formEdit=true}
|
||||
</div>
|
||||
<!-- crm-accordion-body-->
|
||||
</div>
|
||||
<!-- crm-accordion-wrapper -->
|
||||
<div id="custom_group_{$group_id}_{$cgCount}"></div>
|
||||
{/foreach}
|
||||
|
||||
{include file="CRM/common/customData.tpl"}
|
||||
|
||||
{include file="CRM/Form/attachmentjs.tpl"}
|
|
@ -0,0 +1,66 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 crm-demographics-accordion collapsed">
|
||||
<div class="crm-accordion-header">
|
||||
{$title}
|
||||
</div><!-- /.crm-accordion-header -->
|
||||
<div id="demographics" class="crm-accordion-body">
|
||||
<div class="form-item">
|
||||
<span class="label">{$form.gender_id.label}</span>
|
||||
|
||||
<span class="value">
|
||||
{$form.gender_id.html}
|
||||
</span>
|
||||
</div>
|
||||
<div class="form-item">
|
||||
<span class="label">{$form.birth_date.label}</span>
|
||||
<span class="fields">{$form.birth_date.html}</span>
|
||||
</div>
|
||||
<div class="form-item">
|
||||
{$form.is_deceased.html}
|
||||
{$form.is_deceased.label}
|
||||
</div>
|
||||
<div id="showDeceasedDate" class="form-item">
|
||||
<span class="label">{$form.deceased_date.label}</span>
|
||||
<span class="fields">{$form.deceased_date.html}</span>
|
||||
</div>
|
||||
</div><!-- /.crm-accordion-body -->
|
||||
</div><!-- /.crm-accordion-wrapper -->
|
||||
|
||||
{literal}
|
||||
<script type="text/javascript">
|
||||
showDeceasedDate( );
|
||||
function showDeceasedDate( )
|
||||
{
|
||||
if ( cj("#is_deceased").is(':checked') ) {
|
||||
cj("#showDeceasedDate").show( );
|
||||
} else {
|
||||
cj("#showDeceasedDate").hide( );
|
||||
cj("#deceased_date").val('');
|
||||
}
|
||||
}
|
||||
</script>
|
||||
{/literal}
|
|
@ -0,0 +1,69 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{* This file provides the plugin for the email block *}
|
||||
{* @var $form Contains the array for the form elements and other form associated information assigned to the template by the controller*}
|
||||
{* @var $blockId Contains the current email block id in evaluation, and assigned in the CRM/Contact/Form/Location.php file *}
|
||||
|
||||
{if !$addBlock}
|
||||
<tr>
|
||||
<td>{ts}Email{/ts}
|
||||
<a id='addEmail' href="#" title={ts}Add{/ts} onClick="buildAdditionalBlocks( 'Email', '{$className}');return false;">{ts}add{/ts}</a>
|
||||
</td>
|
||||
{if $className eq 'CRM_Contact_Form_Contact'}
|
||||
<td>{ts}On Hold?{/ts} {help id="id-onhold" file="CRM/Contact/Form/Contact.hlp"}</td>
|
||||
<td>{ts}Bulk Mailings?{/ts} {help id="id-bulkmail" file="CRM/Contact/Form/Contact.hlp"}</td>
|
||||
<td id="Email-Primary" class="hiddenElement">{ts}Primary?{/ts}</td>
|
||||
{/if}
|
||||
</tr>
|
||||
{/if}
|
||||
|
||||
<tr id="Email_Block_{$blockId}">
|
||||
<td>{$form.email.$blockId.email.html|crmAddClass:email} {$form.email.$blockId.location_type_id.html}
|
||||
<div class="clear"></div>
|
||||
{if $className eq 'CRM_Contact_Form_Contact'}
|
||||
<div class="email-signature crm-collapsible collapsed">
|
||||
<div class="collapsible-title">
|
||||
{ts}Signature{/ts}
|
||||
</div>
|
||||
<div id="signatureBlock{$blockId}">
|
||||
{$form.email.$blockId.signature_html.label}<br />{$form.email.$blockId.signature_html.html}<br />
|
||||
{$form.email.$blockId.signature_text.label}<br />{$form.email.$blockId.signature_text.html}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/if}
|
||||
</td>
|
||||
<td align="center">{$form.email.$blockId.on_hold.html}</td>
|
||||
{if $multipleBulk}
|
||||
<td align="center" id="Email-Bulkmail-html">{$form.email.$blockId.is_bulkmail.html}</td>
|
||||
{else}
|
||||
<td align="center" id="Email-Bulkmail-html">{$form.email.$blockId.is_bulkmail.1.html}</td>
|
||||
{/if}
|
||||
<td align="center" id="Email-Primary-html" {if $blockId eq 1}class="hiddenElement"{/if}>{$form.email.$blockId.is_primary.1.html}</td>
|
||||
{if $blockId gt 1}
|
||||
<td><a href="#" title="{ts}Delete Email Block{/ts}" onClick="removeBlock( 'Email', '{$blockId}' ); return false;">{ts}delete{/ts}</a></td>
|
||||
{/if}
|
||||
</tr>
|
|
@ -0,0 +1,42 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{* tpl for building Household related fields *}
|
||||
<table class="form-layout-compressed">
|
||||
<tr>
|
||||
<td>{$form.household_name.label}<br/>
|
||||
{$form.household_name.html}
|
||||
</td>
|
||||
|
||||
<td>{$form.nick_name.label}<br/>
|
||||
{$form.nick_name.html}</td>
|
||||
|
||||
<td>{if $action == 1 and $contactSubType} {else}
|
||||
{$form.contact_sub_type.label}<br />
|
||||
{$form.contact_sub_type.html}
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
|
@ -0,0 +1,55 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{* This file provides the plugin for the Instant Messenger block *}
|
||||
{* @var $form Contains the array for the form elements and other form associated information assigned to the template by the controller*}
|
||||
{* @var $blockId Contains the current block id, assigned in the CRM/Contact/Form/Location.php file *}
|
||||
|
||||
{if !$addBlock}
|
||||
<tr>
|
||||
<td>{ts}Instant Messenger{/ts}</td>
|
||||
<td>{ts}IM Location{/ts}</td>
|
||||
<td colspan="2">{ts}IM Type{/ts}</td>
|
||||
<td id="IM-Primary" class="hiddenElement">{ts}Primary?{/ts}</td>
|
||||
</tr>
|
||||
{/if}
|
||||
|
||||
<tr id="IM_Block_{$blockId}">
|
||||
<td>{$form.im.$blockId.name.html|crmAddClass:twenty} </td>
|
||||
<td>{$form.im.$blockId.location_type_id.html}</td>
|
||||
<td colspan="2">{$form.im.$blockId.provider_id.html}</td>
|
||||
<td align="center" id="IM-Primary-html" {if $blockId eq 1}class="hiddenElement"{/if}>{$form.im.$blockId.is_primary.1.html}</td>
|
||||
{if $blockId gt 1}
|
||||
<td><a href="#" title="{ts}Delete IM Block{/ts}" onClick="removeBlock('IM','{$blockId}'); return false;">{ts}delete{/ts}</a></td>
|
||||
{/if}
|
||||
</tr>
|
||||
{if !$addBlock}
|
||||
<tr>
|
||||
<td colspan="4">
|
||||
<a href="#" title={ts}Add{/ts} onClick="buildAdditionalBlocks( 'IM', '{$className}');return false;">{ts}Add another IM{/ts}</a>
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
|
|
@ -0,0 +1,131 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{* tpl for building Individual related fields *}
|
||||
<script type="text/javascript">
|
||||
{literal}
|
||||
CRM.$(function($) {
|
||||
{/literal}
|
||||
var cid = "{$contactId}",
|
||||
viewIndividual = "{crmURL p='civicrm/contact/view' q='reset=1&cid=' h=0}",
|
||||
checkSimilar = {$checkSimilar},
|
||||
lastnameMsg;
|
||||
{literal}
|
||||
if ($('#contact_sub_type *').length == 0) {//if they aren't any subtype we don't offer the option
|
||||
$('#contact_sub_type').parent().hide();
|
||||
}
|
||||
if (cid.length || !checkSimilar) {
|
||||
return;//no dupe check if this is a modif or if checkSimilar is disabled (contact_ajax_check_similar in civicrm_setting table)
|
||||
}
|
||||
$('#last_name').change(function() {
|
||||
// Close msg if it exists
|
||||
lastnameMsg && lastnameMsg.close && lastnameMsg.close();
|
||||
if (this.value == '') return;
|
||||
CRM.api3('contact', 'get', {
|
||||
sort_name: $('#last_name').val(),
|
||||
contact_type: 'Individual',
|
||||
'return': 'display_name,sort_name,email'
|
||||
}).done(function(data) {
|
||||
var title = data.count == 1 ? {/literal}"{ts escape='js'}Similar Contact Found{/ts}" : "{ts escape='js'}Similar Contacts Found{/ts}"{literal},
|
||||
msg = "<em>{/literal}{ts escape='js'}If the person you were trying to add is listed below, click their name to view or edit their record{/ts}{literal}:</em>";
|
||||
if (data.is_error == 1 || data.count == 0) {
|
||||
return;
|
||||
}
|
||||
msg += '<ul class="matching-contacts-actions">';
|
||||
$.each(data.values, function(i, contact) {
|
||||
contact.email = contact.email || '';
|
||||
msg += '<li><a href="'+viewIndividual+contact.id+'">'+ contact.display_name +'</a> '+contact.email+'</li>';
|
||||
});
|
||||
msg += '</ul>';
|
||||
lastnameMsg = CRM.alert(msg, title);
|
||||
$('.matching-contacts-actions a').click(function() {
|
||||
// No confirmation dialog on click
|
||||
$('[data-warn-changes=true]').attr('data-warn-changes', 'false');
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{/literal}
|
||||
|
||||
<table class="form-layout-compressed">
|
||||
<tr>
|
||||
{if $form.prefix_id}
|
||||
<td>
|
||||
{$form.prefix_id.label}<br/>
|
||||
{$form.prefix_id.html}
|
||||
</td>
|
||||
{/if}
|
||||
{if $form.formal_title}
|
||||
<td>
|
||||
{$form.formal_title.label}<br/>
|
||||
{$form.formal_title.html}
|
||||
</td>
|
||||
{/if}
|
||||
{if $form.first_name}
|
||||
<td>
|
||||
{$form.first_name.label}<br />
|
||||
{$form.first_name.html}
|
||||
</td>
|
||||
{/if}
|
||||
{if $form.middle_name}
|
||||
<td>
|
||||
{$form.middle_name.label}<br />
|
||||
{$form.middle_name.html}
|
||||
</td>
|
||||
{/if}
|
||||
{if $form.last_name}
|
||||
<td>
|
||||
{$form.last_name.label}<br />
|
||||
{$form.last_name.html}
|
||||
</td>
|
||||
{/if}
|
||||
{if $form.suffix_id}
|
||||
<td>
|
||||
{$form.suffix_id.label}<br/>
|
||||
{$form.suffix_id.html}
|
||||
</td>
|
||||
{/if}
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
{$form.employer_id.label} {help id="id-current-employer" file="CRM/Contact/Form/Contact.hlp"}<br />
|
||||
{$form.employer_id.html}
|
||||
</td>
|
||||
<td>
|
||||
{$form.job_title.label}<br />
|
||||
{$form.job_title.html}
|
||||
</td>
|
||||
<td>
|
||||
{$form.nick_name.label}<br />
|
||||
{$form.nick_name.html}
|
||||
</td>
|
||||
<td>
|
||||
{$form.contact_sub_type.label}<br />
|
||||
{$form.contact_sub_type.html}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
|
@ -0,0 +1,34 @@
|
|||
{literal}
|
||||
<script type="text/javascript">
|
||||
CRM.$(function($) {
|
||||
if ($('#update_modified_date').length == 0) {
|
||||
return;
|
||||
}
|
||||
$('<br>')
|
||||
.appendTo($('#update_modified_date'));
|
||||
$('<button>')
|
||||
.text("{/literal}{ts}Save Anyway{/ts}{literal}")
|
||||
.click(function() {
|
||||
$('input[name="modified_date"]').val(
|
||||
$('#update_modified_date').attr('data:latest_modified_date')
|
||||
);
|
||||
$('.crm-form-block .crm-form-submit.default').first().click();
|
||||
return false;
|
||||
})
|
||||
.appendTo($('#update_modified_date'))
|
||||
;
|
||||
$('<button>')
|
||||
.text("{/literal}{ts}Reload Page{/ts}{literal}")
|
||||
.click(function() {
|
||||
window.location.href = CRM.url('civicrm/contact/add', {
|
||||
reset: 1,
|
||||
action: 'update',
|
||||
cid: {/literal}{$contactId}{literal}
|
||||
});
|
||||
return false;
|
||||
})
|
||||
.appendTo($('#update_modified_date'))
|
||||
;
|
||||
});
|
||||
</script>
|
||||
{/literal}
|
|
@ -0,0 +1,44 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 crm-notesBlock-accordion collapsed">
|
||||
<div class="crm-accordion-header">
|
||||
|
||||
{$title}
|
||||
</div><!-- /.crm-accordion-header -->
|
||||
<div class="crm-accordion-body" id="notesBlock">
|
||||
<table class="form-layout-compressed">
|
||||
<tr>
|
||||
<td colspan=3>{$form.subject.label}<br >
|
||||
{$form.subject.html}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan=3>{$form.note.label}<br />
|
||||
{$form.note.html}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><!-- /.crm-accordion-body -->
|
||||
</div><!-- /.crm-accordion-wrapper -->
|
|
@ -0,0 +1,53 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{* This file provides the plugin for the openid block *}
|
||||
{* @var $form Contains the array for the form elements and other form associated information assigned to the template by the controller*}
|
||||
{* @var $blockId Contains the current block Id, and assigned in the CRM/Contact/Form/Location.php file *}
|
||||
|
||||
{if !$addBlock}
|
||||
<tr>
|
||||
<td>{ts}Open ID{/ts}</td>
|
||||
<td>{ts}Open ID Location{/ts}</td>
|
||||
<td id="OpenID-Primary" class="hiddenElement">{ts}Primary?{/ts}</td>
|
||||
</tr>
|
||||
{/if}
|
||||
|
||||
<tr id="OpenID_Block_{$blockId}">
|
||||
<td>{$form.openid.$blockId.openid.html|crmAddClass:twenty} </td>
|
||||
<td>{$form.openid.$blockId.location_type_id.html}</td>
|
||||
<td align="center" id="OpenID-Primary-html" {if $blockId eq 1}class="hiddenElement"{/if}>{$form.openid.$blockId.is_primary.1.html}</td>
|
||||
{if $blockId gt 1}
|
||||
<td><a href="#" title="{ts}Delete OpenID Block{/ts}" onClick="removeBlock('OpenID','{$blockId}'); return false;">{ts}delete{/ts}</a></td>
|
||||
{/if}
|
||||
</tr>
|
||||
{if !$addBlock}
|
||||
<tr>
|
||||
<td colspan="4">
|
||||
<a href="#" title={ts}Add{/ts} onClick="buildAdditionalBlocks( 'OpenID', '{$className}');return false;">{ts}Add another Open Id{/ts}</a>
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
|
|
@ -0,0 +1,48 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{* tpl for building Organization related fields *}
|
||||
<table class="form-layout-compressed">
|
||||
<tr>
|
||||
<td>{$form.organization_name.label}<br/>
|
||||
{$form.organization_name.html}
|
||||
</td>
|
||||
|
||||
<td>{$form.legal_name.label}<br/>
|
||||
{$form.legal_name.html}</td>
|
||||
|
||||
<td>{$form.nick_name.label}<br/>
|
||||
{$form.nick_name.html}</td>
|
||||
|
||||
<td>{$form.sic_code.label}<br/>
|
||||
{$form.sic_code.html}</td>
|
||||
|
||||
<td>{if $action == 1 and $contactSubType} {else}
|
||||
{$form.contact_sub_type.label}<br />
|
||||
{$form.contact_sub_type.html}
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
|
@ -0,0 +1,63 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{* This file provides the plugin for the phone block *}
|
||||
{* @var $form Contains the array for the form elements and other form associated information assigned to the template by the controller*}
|
||||
{* @var blockId Contains the current block id, and assigned in the CRM/Contact/Form/Location.php file *}
|
||||
|
||||
{if !$addBlock}
|
||||
<tr>
|
||||
<td>{ts}Phone{/ts}</td>
|
||||
{if $className eq 'CRM_Contact_Form_Contact'}
|
||||
<td>{ts}Phone Location{/ts}</td>
|
||||
{/if}
|
||||
<td colspan="2">{ts}Phone Type{/ts}</td>
|
||||
{if $className eq 'CRM_Contact_Form_Contact'}
|
||||
<td id="Phone-Primary" class="hiddenElement">{ts}Primary?{/ts}</td>
|
||||
{/if}
|
||||
</tr>
|
||||
{/if}
|
||||
<tr id="Phone_Block_{$blockId}">
|
||||
<td>{$form.phone.$blockId.phone.html} {ts}ext.{/ts} {$form.phone.$blockId.phone_ext.html|crmAddClass:four} </td>
|
||||
{if $className eq 'CRM_Contact_Form_Contact'}
|
||||
<td>{$form.phone.$blockId.location_type_id.html}</td>
|
||||
{/if}
|
||||
<td colspan="2">{$form.phone.$blockId.phone_type_id.html}</td>
|
||||
{if $className eq 'CRM_Contact_Form_Contact'}
|
||||
<td align="center" id="Phone-Primary-html" {if $blockId eq 1}class="hiddenElement"{/if}>{$form.phone.$blockId.is_primary.1.html}</td>
|
||||
{/if}
|
||||
{if $blockId gt 1}
|
||||
<td><a href="#" title="{ts}Delete Phone Block{/ts}" onClick="removeBlock('Phone','{$blockId}'); return false;">{ts}delete{/ts}</a></td>
|
||||
{/if}
|
||||
</tr>
|
||||
|
||||
{if !$addBlock}
|
||||
<tr>
|
||||
<td colspan="4">
|
||||
<a id='addPhone' href="#" title={ts}Add{/ts} onClick="buildAdditionalBlocks( 'Phone', '{$className}');return false;">{ts}Add another Phone number{/ts}</a>
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
|
|
@ -0,0 +1,68 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 $title}
|
||||
<div class="crm-accordion-wrapper crm-tagGroup-accordion collapsed">
|
||||
<div class="crm-accordion-header">{$title}</div>
|
||||
<div class="crm-accordion-body" id="tagGroup">
|
||||
{/if}
|
||||
<table class="form-layout-compressed{if $context EQ 'profile'} crm-profile-tagsandgroups{/if}">
|
||||
<tr>
|
||||
{if !$type || $type eq 'tag'}
|
||||
<td>
|
||||
<div class="crm-section tag-section">
|
||||
{if $title}{$form.tag.label}{/if}
|
||||
{$form.tag.html}
|
||||
</div>
|
||||
{if $context NEQ 'profile'}
|
||||
{include file="CRM/common/Tagset.tpl"}
|
||||
{/if}
|
||||
</td>
|
||||
{/if}
|
||||
{if !$type || $type eq 'group'}
|
||||
<td>
|
||||
{if $groupElementType eq 'select'}
|
||||
<div class="crm-section group-section">
|
||||
{if $title}{$form.group.label}{/if}
|
||||
{$form.group.html}
|
||||
</div>
|
||||
{else}
|
||||
{foreach key=key item=item from=$tagGroup.group}
|
||||
<div class="group-wrapper">
|
||||
{$form.group.$key.html}
|
||||
{if $item.description}
|
||||
<div class="description">{$item.description}</div>
|
||||
{/if}
|
||||
</div>
|
||||
{/foreach}
|
||||
{/if}
|
||||
</td>
|
||||
{/if}
|
||||
</tr>
|
||||
</table>
|
||||
{if $title}
|
||||
</div>
|
||||
</div><!-- /.crm-accordion-wrapper -->
|
||||
{/if}
|
|
@ -0,0 +1,40 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{* This tpl runs recursively to build each level of the tag tree *}
|
||||
<ul class="tree-level-{$level}">
|
||||
{foreach from=$tree item="node" key="id"}
|
||||
<li id="tagli_{$id}">
|
||||
<input name="tag[{$id}]" id="tag_{$id}" class="form-checkbox" type="checkbox" value="1" {if $node.is_selectable EQ 0}disabled=""{/if} {if $form.tag.value.$id EQ 1}checked="checked"{/if}/>
|
||||
<span>
|
||||
<label for="tag_{$id}" id="tagLabel_{$id}" class="crm-tag-item" {if !empty($allTags.$id.color)}style="background-color: {$allTags.$id.color}; color: {$allTags.$id.color|colorContrast};"{/if} title="{$node.description|escape}">{$node.name}</label>
|
||||
</span>
|
||||
{if $node.children}
|
||||
{* Recurse... *}
|
||||
{include file="CRM/Contact/Form/Edit/Tagtree.tpl" tree=$node.children level=$level+1}
|
||||
{/if}
|
||||
</li>
|
||||
{/foreach}
|
||||
</ul>
|
|
@ -0,0 +1,53 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{* This file provides the plugin for the Website block *}
|
||||
{* @var $form Contains the array for the form elements and other form associated information assigned to the template by the controller*}
|
||||
{* @var $blockId Contains the current block id, assigned in the CRM/Contact/Form/Location.php file *}
|
||||
|
||||
{if !$addBlock}
|
||||
<tr>
|
||||
<td>{ts}Website{/ts}
|
||||
{help id="id-website" file="CRM/Contact/Form/Contact.hlp"}
|
||||
</td>
|
||||
<td>{ts}Website Type{/ts}</td>
|
||||
<td colspan="2"></td>
|
||||
<td id="Website-Primary" class="hiddenElement"></td>
|
||||
</tr>
|
||||
{/if}
|
||||
|
||||
<tr id="Website_Block_{$blockId}">
|
||||
<td>{$form.website.$blockId.url.html|crmAddClass:url} </td>
|
||||
<td>{$form.website.$blockId.website_type_id.html}</td>
|
||||
<td colspan="3">{if $blockId > 1} <a href="#" title="{ts}Delete Website Block{/ts}" onClick="removeBlock('Website','{$blockId}'); return false;">{ts}delete{/ts}</a>{/if}</td>
|
||||
</tr>
|
||||
{if !$addBlock}
|
||||
<tr>
|
||||
<td colspan="4">
|
||||
<a href="#" title={ts}Add{/ts} onClick="buildAdditionalBlocks( 'Website', '{$className}');return false;">{ts}Add another website{/ts}</a>
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{* this template is used for adding a contact to a group (from view context) *}
|
||||
|
||||
<div class="form-item">
|
||||
{$form.group_id.html} {$form.buttons.html}
|
||||
{include file="CRM/Form/validate.tpl"}
|
||||
</div>
|
|
@ -0,0 +1,113 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{* This file builds html for address block inline edit *}
|
||||
{$form.oplock_ts.html}
|
||||
<table class="form-layout crm-edit-address-form crm-inline-edit-form">
|
||||
<tr>
|
||||
<td>
|
||||
<div class="crm-submit-buttons">
|
||||
{include file="CRM/common/formButtons.tpl"}
|
||||
{if $addressId}
|
||||
|
||||
<a class="button delete-button" href="#" style="display:inline-block;float:none;"><div class="icon delete-icon"></div> {ts}Delete{/ts}</a>
|
||||
{/if}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<span class="crm-address-element location_type_id-address-element">
|
||||
{$form.address.$blockId.location_type_id.label} {$form.address.$blockId.location_type_id.html}
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<span class="crm-address-element is_primary-address-element">{$form.address.$blockId.is_primary.html}</span>
|
||||
<span class="crm-address-element is_billing-address-element">{$form.address.$blockId.is_billing.html}</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
{* include shared address template *}
|
||||
{include file="CRM/Contact/Form/ShareAddress.tpl"}
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<table id="address_table_{$blockId}" class="form-layout-compressed">
|
||||
{* build address block w/ address sequence. *}
|
||||
{foreach item=addressElement from=$addressSequence}
|
||||
{include file=CRM/Contact/Form/Edit/Address/$addressElement.tpl}
|
||||
{/foreach}
|
||||
{include file=CRM/Contact/Form/Edit/Address/geo_code.tpl}
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div class="crm-edit-address-custom_data crm-inline-edit-form crm-address-custom-set-block-{$blockId}">
|
||||
{include file="CRM/Contact/Form/Edit/Address/CustomData.tpl"}
|
||||
</div>
|
||||
{literal}
|
||||
<script type="text/javascript">
|
||||
{/literal}{* // Enforce unique location_type_id fields *}{literal}
|
||||
cj('#address_{/literal}{$blockId}{literal}_location_type_id').change(function() {
|
||||
var ele = cj(this);
|
||||
var lt = ele.val();
|
||||
var container = ele.closest('div.crm-inline-edit.address');
|
||||
container.data('location-type-id', '');
|
||||
var ok = true;
|
||||
if (lt != '') {
|
||||
cj('.crm-inline-edit.address').each(function() {
|
||||
if (ok && cj(this).data('location-type-id') == lt) {
|
||||
var label = cj('option:selected', ele).text();
|
||||
ele.select2('val', '');
|
||||
ele.crmError(label + "{/literal} {ts escape='js'}has already been assigned to another address. Please select another location for this address.{/ts}"{literal});
|
||||
ok = false;
|
||||
}
|
||||
});
|
||||
if (ok) {
|
||||
container.data('location-type-id', lt);
|
||||
}
|
||||
}
|
||||
});
|
||||
{/literal}{* // Enforce unique is_primary fields *}{literal}
|
||||
cj(':checkbox[id*="[is_primary"]', 'form[name=Address_{/literal}{$blockId}{literal}]').change(function() {
|
||||
if (this.defaultChecked) {
|
||||
cj(this).crmError("{/literal} {ts escape='js'}Please choose another address to be primary before changing this one.{/ts}{literal}");
|
||||
cj(this).prop('checked', true);
|
||||
}
|
||||
});
|
||||
{/literal}{* // Reset location_type_id when cancel button pressed *}{literal}
|
||||
cj(':submit[name$=cancel]', 'form[name=Address_{/literal}{$blockId}{literal}]').click(function() {
|
||||
var container = cj(this).closest('div.crm-inline-edit.address');
|
||||
var origValue = container.attr('data-location-type-id') || '';
|
||||
container.data('location-type-id', origValue);
|
||||
});
|
||||
{/literal}
|
||||
{if $masterAddress.$blockId}
|
||||
CRM.alert('{ts escape="js" 1=$masterAddress.$blockId}This address is shared with %1 contact record(s). Modifying this address will automatically update the shared address for these contacts.{/ts}', '{ts escape="js"}Editing Master Address{/ts}', 'info', {ldelim}expires: 0{rdelim});
|
||||
{/if}
|
||||
</script>
|
|
@ -0,0 +1,153 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{* This file provides the plugin for the communication preferences in all the three types of contact *}
|
||||
{* @var $form Contains the array for the form elements and other form associated information assigned to the template by the controller *}
|
||||
{$form.oplock_ts.html}
|
||||
|
||||
<div class="crm-inline-edit-form">
|
||||
<div class="crm-inline-button">
|
||||
{include file="CRM/common/formButtons.tpl"}
|
||||
</div>
|
||||
<div class="crm-clear">
|
||||
{foreach key=key item=item from=$commPreference}
|
||||
<div class="crm-summary-row">
|
||||
<div class="crm-label">{$form.$key.label}
|
||||
{help id="id-$key" file="CRM/Contact/Form/Contact.hlp"}
|
||||
</div>
|
||||
<div class="crm-content">
|
||||
{foreach key=k item=i from=$item}
|
||||
{$form.$key.$k.html}<br/>
|
||||
{/foreach}
|
||||
</div>
|
||||
</div>
|
||||
{if $key eq 'privacy'}
|
||||
<div class="crm-summary-row">
|
||||
<div class="crm-label"> </div>
|
||||
<div class="crm-content">{
|
||||
$form.is_opt_out.html} {$form.is_opt_out.label} {help id="id-optOut" file="CRM/Contact/Form/Contact.hlp"}
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
{/foreach}
|
||||
<div class="crm-summary-row">
|
||||
<div class="crm-label">
|
||||
{$form.preferred_language.label}
|
||||
</div>
|
||||
<div class="crm-content">
|
||||
{$form.preferred_language.html}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{if !empty($form.preferred_mail_format)}
|
||||
<div class="crm-summary-row">
|
||||
<div class="crm-label">
|
||||
{$form.preferred_mail_format.label}
|
||||
{help id="id-emailFormat" file="CRM/Contact/Form/Contact.hlp"}
|
||||
</div>
|
||||
<div class="crm-content">
|
||||
{$form.preferred_mail_format.html}
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if !empty($form.communication_style_id)}
|
||||
<div class="crm-summary-row">
|
||||
<div class="crm-label">
|
||||
{$form.communication_style_id.label} {help id="id-communication_style" file="CRM/Contact/Form/Contact.hlp"}
|
||||
</div>
|
||||
<div class="crm-content">
|
||||
{$form.communication_style_id.html}
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if !empty($form.email_greeting_id)}
|
||||
<div class="crm-summary-row">
|
||||
<div class="crm-label">{$form.email_greeting_id.label}</div>
|
||||
<div class="crm-content">
|
||||
<span id="email_greeting" {if !empty($email_greeting_display)} class="hiddenElement"{/if}>
|
||||
{$form.email_greeting_id.html|crmAddClass:big}
|
||||
</span>
|
||||
{if !empty($email_greeting_display)}
|
||||
<div data-id="email_greeting" class="replace-plain big" title="{ts}Click to edit{/ts}">
|
||||
{$email_greeting_display}
|
||||
</div>
|
||||
{/if}
|
||||
{if !empty($form.email_greeting_custom)}
|
||||
<span id="email_greeting_id_html" class="hiddenElement">
|
||||
<br/>{$form.email_greeting_custom.html|crmAddClass:big}
|
||||
</span>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
|
||||
{if !empty($form.postal_greeting_id)}
|
||||
<div class="crm-summary-row">
|
||||
<div class="crm-label">{$form.postal_greeting_id.label}</div>
|
||||
<div class="crm-content">
|
||||
<span id="postal_greeting" {if !empty($postal_greeting_display)} class="hiddenElement"{/if}>
|
||||
{$form.postal_greeting_id.html|crmAddClass:big}
|
||||
</span>
|
||||
{if !empty($postal_greeting_display)}
|
||||
<div data-id="postal_greeting" class="replace-plain big" title="{ts}Click to edit{/ts}">
|
||||
{$postal_greeting_display}
|
||||
</div>
|
||||
{/if}
|
||||
{if !empty($form.postal_greeting_custom)}
|
||||
<span id="postal_greeting_id_html" class="hiddenElement">
|
||||
<br/>{$form.postal_greeting_custom.html|crmAddClass:big}
|
||||
</span>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if !empty($form.addressee_id)}
|
||||
<div class="crm-summary-row">
|
||||
<div class="crm-label">{$form.addressee_id.label}</div>
|
||||
<div class="crm-content">
|
||||
<span id="addressee" {if !empty($addressee_display)} class="hiddenElement"{/if}>
|
||||
{$form.addressee_id.html|crmAddClass:big}
|
||||
</span>
|
||||
{if !empty($addressee_display)}
|
||||
<div data-id="addressee" class="replace-plain big" title="{ts}Click to edit{/ts}">
|
||||
{$addressee_display}
|
||||
</div>
|
||||
{/if}
|
||||
{if !empty($form.addressee_custom)}
|
||||
<span id="addressee_id_html" class="hiddenElement">
|
||||
<br/>{$form.addressee_custom.html|crmAddClass:big}
|
||||
</span>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{include file="CRM/Contact/Form/Edit/CommunicationPreferences.js.tpl"}
|
|
@ -0,0 +1,64 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{$form.oplock_ts.html}
|
||||
<div class="crm-inline-edit-form">
|
||||
<div class="crm-inline-button">
|
||||
{include file="CRM/common/formButtons.tpl"}
|
||||
</div>
|
||||
|
||||
<div class="crm-clear">
|
||||
{if $contactType eq 'Individual'}
|
||||
<div class="crm-summary-row">
|
||||
<div class="crm-label">{$form.employer_id.label} {help id="id-current-employer" file="CRM/Contact/Form/Contact.hlp"}</div>
|
||||
<div class="crm-content">
|
||||
{$form.employer_id.html|crmAddClass:big}
|
||||
</div>
|
||||
</div>
|
||||
<div class="crm-summary-row">
|
||||
<div class="crm-label">{$form.job_title.label}</div>
|
||||
<div class="crm-content">{$form.job_title.html}</div>
|
||||
</div>
|
||||
{/if}
|
||||
<div class="crm-summary-row">
|
||||
<div class="crm-label">{$form.nick_name.label}</div>
|
||||
<div class="crm-content">{$form.nick_name.html}</div>
|
||||
</div>
|
||||
{if $contactType eq 'Organization'}
|
||||
<div class="crm-summary-row">
|
||||
<div class="crm-label">{$form.legal_name.label}</div>
|
||||
<div class="crm-content">{$form.legal_name.html}</div>
|
||||
</div>
|
||||
<div class="crm-summary-row">
|
||||
<div class="crm-label">{$form.sic_code.label}</div>
|
||||
<div class="crm-content">{$form.sic_code.html}</div>
|
||||
</div>
|
||||
{/if}
|
||||
<div class="crm-summary-row">
|
||||
<div class="crm-label">{$form.contact_source.label}</div>
|
||||
<div class="crm-content">{$form.contact_source.html}</div>
|
||||
</div>
|
||||
</div> <!-- end of main -->
|
||||
</div>
|
|
@ -0,0 +1,77 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{* This file builds html for Contact Display Name inline edit *}
|
||||
{$form.oplock_ts.html}
|
||||
<div class="crm-inline-edit-form">
|
||||
<div class="crm-inline-button">
|
||||
{include file="CRM/common/formButtons.tpl"}
|
||||
</div>
|
||||
{if $contactType eq 'Individual'}
|
||||
{if $form.prefix_id}
|
||||
<div class="crm-inline-edit-field">
|
||||
{$form.prefix_id.label}<br/>
|
||||
{$form.prefix_id.html}
|
||||
</div>
|
||||
{/if}
|
||||
{if $form.formal_title}
|
||||
<div class="crm-inline-edit-field">
|
||||
{$form.formal_title.label}<br/>
|
||||
{$form.formal_title.html}
|
||||
</div>
|
||||
{/if}
|
||||
{if $form.first_name}
|
||||
<div class="crm-inline-edit-field">
|
||||
{$form.first_name.label}<br />
|
||||
{$form.first_name.html}
|
||||
</div>
|
||||
{/if}
|
||||
{if $form.middle_name}
|
||||
<div class="crm-inline-edit-field">
|
||||
{$form.middle_name.label}<br />
|
||||
{$form.middle_name.html}
|
||||
</div>
|
||||
{/if}
|
||||
{if $form.last_name}
|
||||
<div class="crm-inline-edit-field">
|
||||
{$form.last_name.label}<br />
|
||||
{$form.last_name.html}
|
||||
</div>
|
||||
{/if}
|
||||
{if $form.suffix_id}
|
||||
<div class="crm-inline-edit-field">
|
||||
{$form.suffix_id.label}<br/>
|
||||
{$form.suffix_id.html}
|
||||
</div>
|
||||
{/if}
|
||||
{elseif $contactType eq 'Organization'}
|
||||
<div class="crm-inline-edit-field">{$form.organization_name.label}
|
||||
{$form.organization_name.html}</div>
|
||||
{elseif $contactType eq 'Household'}
|
||||
<div class="crm-inline-edit-field">{$form.household_name.label}
|
||||
{$form.household_name.html}</div>
|
||||
{/if}
|
||||
</div>
|
||||
<div class="clear"></div>
|
|
@ -0,0 +1,33 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
|
||||
{$form.oplock_ts.html}
|
||||
<div class="crm-inline-edit-form">
|
||||
<div class="crm-inline-button">
|
||||
{include file="CRM/common/formButtons.tpl"}
|
||||
</div>
|
||||
{include file="CRM/Custom/Form/CustomData.tpl" skipTitle=true}
|
||||
</div> <!-- end of main -->
|
|
@ -0,0 +1,74 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{$form.oplock_ts.html}
|
||||
<div class="crm-inline-edit-form">
|
||||
<div class="crm-inline-button">
|
||||
{include file="CRM/common/formButtons.tpl"}
|
||||
</div>
|
||||
|
||||
<div class="crm-clear">
|
||||
<div class="crm-summary-row">
|
||||
<div class="crm-label">{$form.gender_id.label}</div>
|
||||
<div class="crm-content">{$form.gender_id.html}</div>
|
||||
</div>
|
||||
<div class="crm-summary-row">
|
||||
<div class="crm-label">{$form.birth_date.label}</div>
|
||||
<div class="crm-content">
|
||||
{$form.birth_date.html}
|
||||
</div>
|
||||
</div>
|
||||
<div class="crm-summary-row">
|
||||
<div class="crm-label"> </div>
|
||||
<div class="crm-content">
|
||||
{$form.is_deceased.html}
|
||||
{$form.is_deceased.label}
|
||||
</div>
|
||||
</div>
|
||||
<div class="crm-summary-row">
|
||||
<div class="crm-label crm-deceased-date">{$form.deceased_date.label}</div>
|
||||
<div class="crm-content crm-deceased-date">
|
||||
{$form.deceased_date.html}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> <!-- end of main -->
|
||||
|
||||
{literal}
|
||||
<script type="text/javascript">
|
||||
function showDeceasedDate( ) {
|
||||
if ( cj("#is_deceased").is(':checked') ) {
|
||||
cj(".crm-deceased-date").show( );
|
||||
} else {
|
||||
cj(".crm-deceased-date").hide( );
|
||||
cj("#deceased_date").val('');
|
||||
}
|
||||
}
|
||||
|
||||
CRM.$(function($) {
|
||||
showDeceasedDate( );
|
||||
});
|
||||
</script>
|
||||
{/literal}
|
|
@ -0,0 +1,75 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{* This file provides the template for inline editing of emails *}
|
||||
{$form.oplock_ts.html}
|
||||
<table class="crm-inline-edit-form">
|
||||
<tr>
|
||||
<td colspan="5">
|
||||
<div class="crm-submit-buttons">
|
||||
{include file="CRM/common/formButtons.tpl"}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{ts}Email{/ts}
|
||||
{if $actualBlockCount lt 5 }
|
||||
<span id="add-more-email" title="{ts}click to add more{/ts}"><a class="crm-hover-button action-item add-more-inline" href="#">{ts}add{/ts}</a></span>
|
||||
{/if}
|
||||
</td>
|
||||
<td>{ts}On Hold?{/ts}</td>
|
||||
<td>{ts}Bulk Mailings?{/ts}</td>
|
||||
<td>{ts}Primary?{/ts}</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
{section name='i' start=1 loop=$totalBlocks}
|
||||
{assign var='blockId' value=$smarty.section.i.index}
|
||||
<tr id="Email_Block_{$blockId}" {if $blockId gt $actualBlockCount}class="hiddenElement"{/if}>
|
||||
<td>{$form.email.$blockId.email.html|crmAddClass:email} {$form.email.$blockId.location_type_id.html}
|
||||
</td>
|
||||
<td align="center">{$form.email.$blockId.on_hold.html}</td>
|
||||
{if $multipleBulk}
|
||||
<td align="center">{$form.email.$blockId.is_bulkmail.html}</td>
|
||||
{else}
|
||||
<td align="center" class="crm-email-bulkmail">{$form.email.$blockId.is_bulkmail.1.html}</td>
|
||||
{/if}
|
||||
<td align="center" class="crm-email-is_primary">{$form.email.$blockId.is_primary.1.html}</td>
|
||||
<td>
|
||||
{if $blockId gt 1}
|
||||
<a title="{ts}Delete Email{/ts}" class="crm-delete-inline crm-hover-button" href="#"><span class="icon delete-icon"></span></a>
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
{/section}
|
||||
</table>
|
||||
|
||||
{literal}
|
||||
<script type="text/javascript">
|
||||
CRM.$(function($) {
|
||||
// check first primary radio
|
||||
$('#Email_1_IsPrimary').prop('checked', true );
|
||||
});
|
||||
</script>
|
||||
{/literal}
|
|
@ -0,0 +1,70 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{* This file provides the template for inline editing of ims *}
|
||||
{$form.oplock_ts.html}
|
||||
<table class="crm-inline-edit-form">
|
||||
<tr>
|
||||
<td colspan="5">
|
||||
<div class="crm-submit-buttons">
|
||||
{include file="CRM/common/formButtons.tpl"}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{ts}Instant Messenger{/ts}
|
||||
{if $actualBlockCount lt 5 }
|
||||
<span id="add-more-im" title="{ts}click to add more{/ts}"><a class="crm-hover-button action-item add-more-inline" href="#">{ts}add{/ts}</a></span>
|
||||
{/if}
|
||||
</td>
|
||||
<td>{ts}IM Location{/ts}</td>
|
||||
<td>{ts}IM Type{/ts}</td>
|
||||
<td>{ts}Primary?{/ts}</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
{section name='i' start=1 loop=$totalBlocks}
|
||||
{assign var='blockId' value=$smarty.section.i.index}
|
||||
<tr id="IM_Block_{$blockId}" {if $blockId gt $actualBlockCount}class="hiddenElement"{/if}>
|
||||
<td>{$form.im.$blockId.name.html} </td>
|
||||
<td>{$form.im.$blockId.location_type_id.html}</td>
|
||||
<td>{$form.im.$blockId.provider_id.html}</td>
|
||||
<td align="center" class="crm-im-is_primary">{$form.im.$blockId.is_primary.1.html}</td>
|
||||
<td>
|
||||
{if $blockId gt 1}
|
||||
<a class="crm-delete-inline crm-hover-button" href="#" title="{ts}Delete IM{/ts}"><span class="icon delete-icon"></span></a>
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
{/section}
|
||||
</table>
|
||||
|
||||
{literal}
|
||||
<script type="text/javascript">
|
||||
CRM.$(function($) {
|
||||
// check first primary radio
|
||||
$('#IM_1_IsPrimary').prop('checked', true );
|
||||
});
|
||||
</script>
|
||||
{/literal}
|
|
@ -0,0 +1,70 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{* This file provides the template for inline editing of openids *}
|
||||
{$form.oplock_ts.html}
|
||||
<table class="crm-inline-edit-form">
|
||||
<tr>
|
||||
<td colspan="4">
|
||||
<div class="crm-submit-buttons">
|
||||
{include file="CRM/common/formButtons.tpl"}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>{ts}Open ID{/ts}
|
||||
{if $actualBlockCount lt 5 }
|
||||
<span id="add-more-openid" title="{ts}click to add more{/ts}"><a class="crm-hover-button action-item add-more-inline" href="#">{ts}add{/ts}</a></span>
|
||||
{/if}
|
||||
</td>
|
||||
<td>{ts}Open ID Location{/ts}</td>
|
||||
<td id="OpenID-Primary">{ts}Primary?{/ts}</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
|
||||
{section name='i' start=1 loop=$totalBlocks}
|
||||
{assign var='blockId' value=$smarty.section.i.index}
|
||||
<tr id="OpenID_Block_{$blockId}" {if $blockId gt $actualBlockCount}class="hiddenElement"{/if}>
|
||||
<td>{$form.openid.$blockId.openid.html|crmAddClass:twenty} </td>
|
||||
<td>{$form.openid.$blockId.location_type_id.html}</td>
|
||||
<td align="center" id="OpenID-Primary-html" class="crm-openid-is_primary">{$form.openid.$blockId.is_primary.1.html}</td>
|
||||
<td>
|
||||
{if $blockId gt 1}
|
||||
<a class="crm-delete-inline crm-hover-button" href="#" title="{ts}Delete OpenID{/ts}"><span class="icon delete-icon"></span></a>
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
{/section}
|
||||
</table>
|
||||
|
||||
{literal}
|
||||
<script type="text/javascript">
|
||||
CRM.$(function($) {
|
||||
// check first primary radio
|
||||
$('#OpenID_1_IsPrimary').prop('checked', true );
|
||||
});
|
||||
</script>
|
||||
{/literal}
|
|
@ -0,0 +1,70 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{* This file provides the template for inline editing of phones *}
|
||||
{$form.oplock_ts.html}
|
||||
<table class="crm-inline-edit-form">
|
||||
<tr>
|
||||
<td colspan="5">
|
||||
<div class="crm-submit-buttons">
|
||||
{include file="CRM/common/formButtons.tpl"}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{ts}Phone{/ts}
|
||||
{if $actualBlockCount lt 5 }
|
||||
<span id="add-more-phone" title="{ts}click to add more{/ts}"><a class="crm-hover-button action-item add-more-inline" href="#">{ts}add{/ts}</a></span>
|
||||
{/if}
|
||||
</td>
|
||||
<td>{ts}Phone Location{/ts}</td>
|
||||
<td>{ts}Phone Type{/ts}</td>
|
||||
<td>{ts}Primary?{/ts}</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
{section name='i' start=1 loop=$totalBlocks}
|
||||
{assign var='blockId' value=$smarty.section.i.index}
|
||||
<tr id="Phone_Block_{$blockId}" {if $blockId gt $actualBlockCount}class="hiddenElement"{/if}>
|
||||
<td>{$form.phone.$blockId.phone.html} {ts}ext.{/ts} {$form.phone.$blockId.phone_ext.html|crmAddClass:four} </td>
|
||||
<td>{$form.phone.$blockId.location_type_id.html}</td>
|
||||
<td>{$form.phone.$blockId.phone_type_id.html}</td>
|
||||
<td align="center" class="crm-phone-is_primary">{$form.phone.$blockId.is_primary.1.html}</td>
|
||||
<td>
|
||||
{if $blockId gt 1}
|
||||
<a class="crm-delete-inline crm-hover-button" href="#" title="{ts}Delete phone{/ts}"><span class="icon delete-icon"></span></a>
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
{/section}
|
||||
</table>
|
||||
|
||||
{literal}
|
||||
<script type="text/javascript">
|
||||
CRM.$(function($) {
|
||||
// check first primary radio
|
||||
$('#Phone_1_IsPrimary').prop('checked', true );
|
||||
});
|
||||
</script>
|
||||
{/literal}
|
|
@ -0,0 +1,73 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{* This file provides the template for inline editing of websites *}
|
||||
{$form.oplock_ts.html}
|
||||
<table class="crm-inline-edit-form">
|
||||
<tr>
|
||||
<td colspan="5">
|
||||
<div class="crm-submit-buttons">
|
||||
{include file="CRM/common/formButtons.tpl"}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>{ts}Website{/ts}
|
||||
{help id="id-website" file="CRM/Contact/Form/Contact.hlp"}
|
||||
{if $actualBlockCount lt 5 }
|
||||
<span id="add-more-website" title="{ts}click to add more{/ts}"><a class="crm-hover-button action-item add-more-inline" href="#">{ts}add{/ts}</a></span>
|
||||
{/if}
|
||||
</td>
|
||||
<td>{ts}Website Type{/ts}</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
|
||||
{section name='i' start=1 loop=$totalBlocks}
|
||||
{assign var='blockId' value=$smarty.section.i.index}
|
||||
<tr id="Website_Block_{$blockId}" {if $blockId gt $actualBlockCount}class="hiddenElement"{/if}>
|
||||
<td>{$form.website.$blockId.url.html|crmAddClass:url} </td>
|
||||
<td>{$form.website.$blockId.website_type_id.html}</td>
|
||||
<td>
|
||||
{if $blockId > 1}
|
||||
<a class="crm-delete-inline crm-hover-button action-item" href="#" title="{ts}Delete Website{/ts}"><span class="icon delete-icon"></span></a>
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
{/section}
|
||||
</table>
|
||||
|
||||
{literal}
|
||||
<script type="text/javascript">
|
||||
CRM.$(function($) {
|
||||
// error handling / show hideen elements duing form validation
|
||||
$('tr[id^="Website_Block_"]' ).each( function() {
|
||||
if( $(this).find('td:first span').length > 0 ) {
|
||||
$(this).removeClass('hiddenElement');
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{/literal}
|
|
@ -0,0 +1,33 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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="intro-title"}
|
||||
Merging Contacts
|
||||
{/htxt}
|
||||
{htxt id="intro"}
|
||||
<p>{ts}Click <strong>Merge</strong> to move data from the Duplicate Contact on the left into the Main Contact. In addition to the contact data (address, phone, email...), you may choose to move all or some of the related records (groups, activities, tags, etc.).{/ts}</p>
|
||||
<p>{ts}You will see a row and a checkbox for each type of related data currently linked to the duplicate contact. For example, if the duplicate contact has Activity records - you will see a row and a checkbox for you to mark IF you want those contribution records moved over to the main contact record. If you want to move all related records, you can check the <strong>Mark All</strong> checkbox.{/ts}</p>
|
||||
<p><strong>{ts}The Duplicate Contact record and all related information WILL BE DELETED after the Merge is complete.{/ts}</strong></p>
|
||||
{/htxt}
|
451
sites/all/modules/civicrm/templates/CRM/Contact/Form/Merge.tpl
Normal file
451
sites/all/modules/civicrm/templates/CRM/Contact/Form/Merge.tpl
Normal file
|
@ -0,0 +1,451 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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-contact-merge-form-block">
|
||||
<div class="help">
|
||||
{ts}Click <strong>Merge</strong> to move data from the Duplicate Contact on the left into the Main Contact. In addition to the contact data (address, phone, email...), you may choose to move all or some of the related activity records (groups, contributions, memberships, etc.).{/ts} {help id="intro"}
|
||||
</div>
|
||||
|
||||
<div class="message status">
|
||||
<div class="icon inform-icon"></div>
|
||||
<strong>{ts}WARNING: The duplicate contact record WILL BE DELETED after the merge is complete.{/ts}</strong>
|
||||
</div>
|
||||
|
||||
{if $user}
|
||||
<div class="message status">
|
||||
<div class="icon inform-icon"></div>
|
||||
<strong>{ts 1=$config->userFramework}WARNING: There are %1 user accounts associated with both the original and duplicate contacts. Ensure that the %1 user you want to retain is on the right - if necessary use the 'Flip between original and duplicate contacts.' option at top to swap the positions of the two records before doing the merge.
|
||||
The user record associated with the duplicate contact will not be deleted, but will be unlinked from the associated contact record (which will be deleted).
|
||||
You will need to manually delete that user (click on the link to open the %1 user account in new screen). You may need to give thought to how you handle any content or contents associated with that user.{/ts}</strong>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<div class="crm-submit-buttons">
|
||||
{include file="CRM/common/formButtons.tpl" location="top"}
|
||||
</div>
|
||||
|
||||
<div class="action-link">
|
||||
{if $prev}<a href="{$prev}" class="crm-hover-button action-item"><i class="crm-i fa-chevron-left"></i> {ts}Previous{/ts}</a>{/if}
|
||||
{if $next}<a href="{$next}" class="crm-hover-button action-item">{ts}Next{/ts} <i class="crm-i fa-chevron-right"></i></a>{/if}
|
||||
<a href="{$flip}" class="action-item crm-hover-button">
|
||||
<i class="crm-i fa-random"></i>
|
||||
{ts}Flip between original and duplicate contacts.{/ts}
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="action-link">
|
||||
<a href="#" class="action-item crm-hover-button crm-notDuplicate" title={ts}Mark this pair as not a duplicate.{/ts} onClick="processDupes( {$main_cid}, {$other_cid}, 'dupe-nondupe', 'merge-contact', '{$browseUrl}' );return false;">
|
||||
<i class="crm-i fa-times-circle"></i>
|
||||
{ts}Mark this pair as not a duplicate.{/ts}
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="action-link">
|
||||
<a href="javascript:void(0);" class="action-item crm-hover-button toggle_equal_rows">
|
||||
<i class="crm-i fa-eye-slash"></i>
|
||||
{ts}Show/hide rows with the same data on each contact record.{/ts}
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<table class="row-highlight">
|
||||
<tr class="columnheader">
|
||||
<th> </th>
|
||||
<th><a href="{crmURL p='civicrm/contact/view' q="reset=1&cid=$other_cid"}">{$other_name}</a> ({ts}duplicate{/ts})</th>
|
||||
<th>{ts}Mark All{/ts}<br />=={$form.toggleSelect.html} ==></th>
|
||||
<th><a href="{crmURL p='civicrm/contact/view' q="reset=1&cid=$main_cid"}">{$main_name}</a></th>
|
||||
<th width="300">Add/overwrite?</th>
|
||||
</tr>
|
||||
|
||||
{crmAPI var='other_result' entity='Contact' action='get' return="modified_date" id=$other_cid}
|
||||
|
||||
{crmAPI var='main_result' entity='Contact' action='get' return="modified_date" id=$main_cid}
|
||||
|
||||
<tr>
|
||||
<td>Last modified</td>
|
||||
<td>{$other_result.values.0.modified_date|crmDate} {if $other_result.values.0.modified_date gt $main_result.values.0.modified_date} (Most recent) {/if}</td>
|
||||
<td></td>
|
||||
<td>{$main_result.values.0.modified_date|crmDate} {if $main_result.values.0.modified_date gt $other_result.values.0.modified_date} (Most recent) {/if}</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
|
||||
{foreach from=$rows item=row key=field}
|
||||
|
||||
{if !isset($row.main) && !isset($row.other)}
|
||||
<tr style="background-color: #fff !important; border-bottom:1px solid #ccc !important;" class="no-data">
|
||||
<td>
|
||||
<strong>{$row.title}</strong>
|
||||
</td>
|
||||
{else}
|
||||
{if $row.main eq $row.other}
|
||||
<tr class="merge-row-equal crm-row-ok {cycle values="odd-row,even-row"}">
|
||||
{else}
|
||||
<tr class="crm-row-error {cycle values="odd-row,even-row"}">
|
||||
{/if}
|
||||
<td>
|
||||
{$row.title}
|
||||
</td>
|
||||
{/if}
|
||||
|
||||
{assign var=position value=$field|strrpos:'_'}
|
||||
{assign var=blockId value=$field|substr:$position+1}
|
||||
{assign var=blockName value=$field|substr:14:$position-14}
|
||||
|
||||
<td>
|
||||
{* @TODO check if this is ever an array or a fileName? *}
|
||||
{* This is on one long line for address formatting *}
|
||||
{if $row.title|substr:0:7 == "Address"}<span style="white-space: pre">{else}<span>{/if}{if !is_array($row.other)}{$row.other}{elseif $row.other.fileName}{$row.other.fileName}{else}{', '|implode:$row.other}{/if}</span>
|
||||
</td>
|
||||
|
||||
<td style='white-space: nowrap'>
|
||||
{if $form.$field}=={$form.$field.html|crmAddClass:"select-row"}==>{/if}
|
||||
</td>
|
||||
|
||||
{* For location blocks *}
|
||||
{if $row.title|substr:0:5 == "Email" OR
|
||||
$row.title|substr:0:7 == "Address" OR
|
||||
$row.title|substr:0:2 == "IM" OR
|
||||
$row.title|substr:0:7 == "Website" OR
|
||||
$row.title|substr:0:5 == "Phone"}
|
||||
|
||||
<td>
|
||||
{strip}
|
||||
{if $row.title|substr:0:7 == "Address"}
|
||||
<span style="white-space: pre" id="main_{$blockName}_{$blockId}">
|
||||
{else}
|
||||
<span id="main_{$blockName}_{$blockId}">
|
||||
{/if}
|
||||
{* @TODO check if this is ever an array or a fileName? *}
|
||||
{if !is_array($row.main)}
|
||||
{$row.main}
|
||||
{elseif $row.main.fileName}
|
||||
{$row.main.fileName}
|
||||
{else}
|
||||
{', '|implode:$row.main}
|
||||
{/if}
|
||||
</span>
|
||||
{/strip}
|
||||
</td>
|
||||
|
||||
<td>
|
||||
{* Display location for fields with locations *}
|
||||
{if $blockName eq 'email' || $blockName eq 'phone' || $blockName eq 'address' || $blockName eq 'im' }
|
||||
{$form.location_blocks.$blockName.$blockId.locTypeId.html}
|
||||
{/if}
|
||||
|
||||
{* Display other_type_id for websites, ims and phones *}
|
||||
{if $blockName eq 'website' || $blockName eq 'im' || $blockName eq 'phone' }
|
||||
{$form.location_blocks.$blockName.$blockId.typeTypeId.html}
|
||||
{/if}
|
||||
|
||||
{* Display the overwrite/add/add new label *}
|
||||
<span id="main_{$blockName}_{$blockId}_overwrite" class="location_block_controls">
|
||||
|
||||
<span class="location_primary">
|
||||
{if $row.main && $row.main_is_primary == "1"}Primary{/if}
|
||||
</span>
|
||||
|
||||
<span class="location_block_controls_options">
|
||||
<span class="location_operation_description">
|
||||
{if $row.main}({ts}overwrite{/ts}){else}({ts}add{/ts}){/if}
|
||||
</span>
|
||||
<span style="display: block" class="location_operation_checkbox">
|
||||
{if $row.main && ($blockName eq 'email' || $blockName eq 'phone')}
|
||||
{$form.location_blocks.$blockName.$blockId.operation.html}
|
||||
{/if}
|
||||
</span>
|
||||
<span style="display: block" class="location_set_other_primary">
|
||||
{if $blockName neq 'website' && (($row.main && $row.main_is_primary != "1") || !$row.main)}
|
||||
{$form.location_blocks.$blockName.$blockId.set_other_primary.html}
|
||||
{/if}
|
||||
</span>
|
||||
</span>
|
||||
</span>
|
||||
|
||||
</td>
|
||||
|
||||
{* For non-location blocks *}
|
||||
{else}
|
||||
|
||||
<td>
|
||||
<span>
|
||||
{if !is_array($row.main)}
|
||||
{$row.main}
|
||||
{elseif $row.main.fileName}
|
||||
{$row.main.fileName}
|
||||
{else}
|
||||
{', '|implode:$row.main}
|
||||
{/if}
|
||||
</span>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
{if isset($row.main) || isset($row.other)}
|
||||
<span>
|
||||
{if $row.main == $row.other}
|
||||
<span class="action_label">({ts}match{/ts})</span><br />
|
||||
{elseif $row.main}
|
||||
<span class="action_label">({ts}overwrite{/ts})</span><br />
|
||||
{else}
|
||||
<span class="action_label">({ts}add{/ts})</span>
|
||||
{/if}
|
||||
</span>
|
||||
{/if}
|
||||
</td>
|
||||
|
||||
{/if}
|
||||
|
||||
</tr>
|
||||
{/foreach}
|
||||
|
||||
{foreach from=$rel_tables item=params key=paramName}
|
||||
{if $paramName eq 'move_rel_table_users'}
|
||||
<tr class="{cycle values="even-row,odd-row"}">
|
||||
<td><strong>{ts}Move related...{/ts}</strong></td><td>{if $otherUfId}<a target="_blank" href="{$params.other_url}">{$otherUfName}</a></td><td style='white-space: nowrap'>=={$form.$paramName.html|crmAddClass:"select-row"}==>{else}<td style='white-space: nowrap'></td>{/if}</td><td>{if $mainUfId}<a target="_blank" href="{$params.main_url}">{$mainUfName}</a>{/if}</td>
|
||||
<td>({ts}migrate{/ts})</td>
|
||||
</tr>
|
||||
{else}
|
||||
<tr class="{cycle values="even-row,odd-row"}">
|
||||
<td><strong>{ts}Move related...{/ts}</strong></td><td><a href="{$params.other_url}">{$params.title}</a></td><td style='white-space: nowrap'>=={$form.$paramName.html|crmAddClass:"select-row"}==></td><td><a href="{$params.main_url}">{$params.title}</a>{if $form.operation.$paramName.add.html} {$form.operation.$paramName.add.html}{/if}</td>
|
||||
<td>({ts}migrate{/ts})</td>
|
||||
</tr>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</table>
|
||||
|
||||
<div class="crm-submit-buttons">
|
||||
{include file="CRM/common/formButtons.tpl" location="bottom"}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{literal}
|
||||
<script type="text/javascript">
|
||||
|
||||
var locationBlockInfo = {/literal}{$locationBlockInfo}{literal};
|
||||
var allBlock = {/literal}{$mainLocBlock}{literal};
|
||||
|
||||
/**
|
||||
* Triggered when a 'location' or 'type' destination is changed, and when
|
||||
* the operation or 'set primary' checkboxes are changed.
|
||||
*
|
||||
* Check to see if the 'main' contact record has a corresponding location
|
||||
* block when the destination of a field is changed. Allow existing location
|
||||
* fields to be overwritten with data from the 'other' contact.
|
||||
*
|
||||
* @param blockName string
|
||||
* The name of the entity.
|
||||
* @param blockId int
|
||||
* The block ID being affected.
|
||||
* @param event object
|
||||
* The event that triggered the update.
|
||||
*/
|
||||
function updateMainLocationBlock(blockName, blockId, event) {
|
||||
|
||||
// Get type of select list that's been changed (location or type)
|
||||
var locTypeId = CRM.$('select#location_blocks_' + blockName + '_' + blockId + '_locTypeId').val();
|
||||
var typeTypeId = CRM.$('select#location_blocks_' + blockName + '_' + blockId + '_typeTypeId').val();
|
||||
|
||||
// @todo Fix this 'special handling' for websites (no location id)
|
||||
if (!locTypeId) {
|
||||
locTypeId = 0;
|
||||
}
|
||||
|
||||
// Look for a matching block on the main contact
|
||||
var mainBlockId = 0;
|
||||
var mainBlockDisplay = '';
|
||||
var mainBlock = findBlock(blockName, locTypeId, typeTypeId);
|
||||
if (mainBlock != false) {
|
||||
mainBlockDisplay = mainBlock['display'];
|
||||
mainBlockId = mainBlock['id'];
|
||||
}
|
||||
|
||||
// Update main location display and id
|
||||
CRM.$("input[name='location_blocks[" + blockName + "][" + blockId + "][mainContactBlockId]']").val(mainBlockId);
|
||||
CRM.$("#main_" + blockName + "_" + blockId).html(mainBlockDisplay);
|
||||
|
||||
// Update controls area
|
||||
|
||||
// Get the parent block once for speed
|
||||
var this_controls = CRM.$("#main_" + blockName + "_" + blockId + "_overwrite");
|
||||
|
||||
// Update primary label
|
||||
if (mainBlock != false && mainBlock['is_primary'] == '1') {
|
||||
this_controls.find(".location_primary").text('Primary');
|
||||
}
|
||||
else {
|
||||
this_controls.find(".location_primary").text('');
|
||||
}
|
||||
|
||||
// Update operation description
|
||||
var operation_description = "{/literal}{ts}add{/ts}{literal}";
|
||||
var add_new_check_length = this_controls.find(".location_operation_checkbox input:checked").length;
|
||||
if (mainBlock != false) {
|
||||
if (add_new_check_length > 0) {
|
||||
operation_description = "{/literal}{ts}add new{/ts}{literal}";
|
||||
}
|
||||
else {
|
||||
operation_description = "{/literal}{ts}overwrite{/ts}{literal}";
|
||||
}
|
||||
}
|
||||
this_controls.find(".location_operation_description").text("(" + operation_description + ")");
|
||||
|
||||
// Skip if the 'add new' or 'set primary' checkboxes were clicked
|
||||
if (event.target.id.match(/(operation|set_other_primary)/) === null) {
|
||||
// Display 'Add new' checkbox if there is a main block, and this is an
|
||||
// email or phone type.
|
||||
if (mainBlock != false && (blockName == 'email' || blockName == 'phone')) {
|
||||
var op_id = 'location_blocks[' + blockName + '][' + blockId + '][operation]';
|
||||
this_controls.find(".location_operation_checkbox").html(
|
||||
'<input id="' + op_id + '" name="' + op_id + '" type="checkbox" value="1" class="crm-form-checkbox"><label for="' + op_id + '">{/literal}{ts}Add new{/ts}{literal}</label>'
|
||||
);
|
||||
}
|
||||
else {
|
||||
this_controls.find(".location_operation_checkbox").html('');
|
||||
}
|
||||
}
|
||||
|
||||
// Skip if 'set primary' was clicked
|
||||
if (event.target.id.match(/(set_other_primary)/) === null) {
|
||||
// Display 'Set primary' checkbox if applicable
|
||||
if (blockName != 'website' && (mainBlock == false || mainBlock['is_primary'] != "1" || add_new_check_length > 0)) {
|
||||
var prim_id = 'location_blocks[' + blockName + '][' + blockId + '][set_other_primary]';
|
||||
this_controls.find(".location_set_other_primary").html(
|
||||
'<input id="' + prim_id + '" name="' + prim_id + '" type="checkbox" value="1" class="crm-form-checkbox"><label for="' + prim_id + '">{/literal}{ts}Set as primary{/ts}{literal}</label>'
|
||||
);
|
||||
}
|
||||
else {
|
||||
this_controls.find(".location_set_other_primary").html('');
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Look for a matching 'main' contact location block by entity, location and
|
||||
* type
|
||||
*
|
||||
* @param entName string
|
||||
* The entity name to lookup.
|
||||
* @param locationID int
|
||||
* The location ID to lookup.
|
||||
* @param typeID int
|
||||
* The type ID to lookup.
|
||||
*
|
||||
* @returns boolean|object
|
||||
* Returns false if no match, otherwise an object with the location ID and
|
||||
* display value.
|
||||
*/
|
||||
function findBlock(entName, locationID, typeID) {
|
||||
var entityArray = allBlock[entName];
|
||||
var result = false;
|
||||
for (var i = 0; i < entityArray.length; i++) {
|
||||
// Match based on location and type ID, depending on the entity info
|
||||
if (locationBlockInfo[entName]['hasLocation'] == false || locationID == entityArray[i]['location_type_id']) {
|
||||
if (locationBlockInfo[entName]['hasType'] == false || typeID == entityArray[i][locationBlockInfo[entName]['hasType']]) {
|
||||
result = {
|
||||
display: entityArray[i][locationBlockInfo[entName]['displayField']],
|
||||
id: entityArray[i]['id'],
|
||||
is_primary: entityArray[i]['is_primary']
|
||||
};
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when a 'set primary' checkbox is clicked in order to disable any
|
||||
* other 'set primary' checkboxes for blocks of the same entity. So don't let
|
||||
* users try to set two different phone numbers as primary on the form.
|
||||
*
|
||||
* @param event object
|
||||
* The event that triggered the update
|
||||
*/
|
||||
function updateSetPrimaries(event) {
|
||||
var nameSplit = event.target.name.split('[');
|
||||
var blockName = nameSplit[1].slice(0, -1);
|
||||
var controls = CRM.$('span.location_block_controls[id^="main_' + blockName + '"]');
|
||||
|
||||
// Enable everything
|
||||
controls.find('input[id$="[set_other_primary]"]:not(:checked)').removeAttr("disabled");
|
||||
|
||||
// If one is checked, disable the others
|
||||
if (controls.find('input[id$="[set_other_primary]"]:checked').length > 0) {
|
||||
controls.find('input[id$="[set_other_primary]"]:not(:checked)').attr("disabled", "disabled");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Toggle the location type and the is_primary on & off depending on whether the merge box is ticked.
|
||||
*
|
||||
* @param element
|
||||
*/
|
||||
function toggleRelatedLocationFields(element) {
|
||||
relatedElements = CRM.$(element).parent().siblings('td').find('input,select,label,hidden');
|
||||
if (CRM.$(element).is(':checked')) {
|
||||
relatedElements.removeClass('disabled').attr('disabled', false);
|
||||
|
||||
}
|
||||
else {
|
||||
relatedElements.addClass('disabled').attr('disabled', true);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
CRM.$(function($) {
|
||||
$('input.crm-form-checkbox[data-is_location]').on('click', function(){
|
||||
toggleRelatedLocationFields(this)
|
||||
});
|
||||
|
||||
// Show/hide matching data rows
|
||||
$('.toggle_equal_rows').click(function() {
|
||||
$('tr.merge-row-equal').toggle();
|
||||
});
|
||||
|
||||
// Call mergeBlock whenever a location type is changed
|
||||
// (This is applied to the body because the inputs can be added dynamically
|
||||
// to the form, and we need to catch when they change.)
|
||||
$('body').on('change', 'select[id$="locTypeId"],select[id$="typeTypeId"],input[id$="[operation]"],input[id$="[set_other_primary]"]', function(event){
|
||||
|
||||
// All the information we need is held in the id, separated by underscores
|
||||
var nameSplit = this.name.split('[');
|
||||
|
||||
// Lookup the main value, if any are available
|
||||
if (allBlock[nameSplit[1].slice(0, -1)] != undefined) {
|
||||
updateMainLocationBlock(nameSplit[1].slice(0, -1), nameSplit[2].slice(0, -1), event);
|
||||
}
|
||||
|
||||
// Update all 'set primary' checkboxes
|
||||
updateSetPrimaries(event);
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
{/literal}
|
||||
|
||||
{* process the dupe contacts *}
|
||||
{include file="CRM/common/dedupe.tpl"}
|
|
@ -0,0 +1,229 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{* This file provides the HTML for the on-behalf-of form. Can also be used for related contact edit form. *}
|
||||
<fieldset id="for_organization" class="for_organization-group">
|
||||
<legend>{$fieldSetTitle}</legend>
|
||||
{if $contact_type eq 'Individual'}
|
||||
|
||||
{if $contactEditMode}<fieldset><legend></legend>{/if}
|
||||
<table class="form-layout-compressed">
|
||||
<tr>
|
||||
<td>{$form.prefix_id.label}</td>
|
||||
<td>{$form.first_name.label}</td>
|
||||
<td>{$form.middle_name.label}</td>
|
||||
<td>{$form.last_name.label}</td>
|
||||
<td>{$form.suffix_id.label}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{$form.prefix_id.html}</td>
|
||||
<td>{$form.first_name.html}</td>
|
||||
<td>{$form.middle_name.html|crmAddClass:eight}</td>
|
||||
<td>{$form.last_name.html}</td>
|
||||
<td>{$form.suffix_id.html}</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
{if $contactEditMode}</fieldset>{/if}
|
||||
|
||||
|
||||
{elseif $contact_type eq 'Household'}
|
||||
|
||||
{if $contactEditMode}<fieldset><legend></legend>{/if}
|
||||
<table class="form-layout-compressed">
|
||||
<tr>
|
||||
<td>{$form.household_name.label}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{$form.household_name.html|crmAddClass:big}</td>
|
||||
</tr>
|
||||
</table>
|
||||
{if $contactEditMode}</fieldset>{/if}
|
||||
|
||||
|
||||
{elseif $contact_type eq 'Organization'}
|
||||
|
||||
{if $contactEditMode}
|
||||
<fieldset><legend></legend>
|
||||
{/if}
|
||||
<div class="crm-section organizationName-section">
|
||||
<div id="create_org" class="crm-section create_org-section">
|
||||
<div class="label">{$form.organization_name.label}</div>
|
||||
<div class="content">{$form.organization_name.html|crmAddClass:big}</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
</div>
|
||||
{if $contactEditMode}
|
||||
</fieldset>
|
||||
{/if}
|
||||
|
||||
{/if}
|
||||
|
||||
{* Display the address block *}
|
||||
{assign var=index value=1}
|
||||
|
||||
{if $contactEditMode}
|
||||
<fieldset><legend>{ts}Phone and Email{/ts}</legend>
|
||||
<table class="form-layout-compressed">
|
||||
<tr>
|
||||
<td class='label' width="25%">{$form.phone.$index.phone.label}</td>
|
||||
<td class='value'>{$form.phone.$index.phone.html}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='label'>{$form.email.$index.email.label}</td>
|
||||
<td class='value'>{$form.email.$index.email.html}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
{/if}
|
||||
|
||||
{if $contactEditMode}<fieldset><legend>{ts}Address{/ts}</legend>{/if}
|
||||
<div class="crm-section address-section">
|
||||
{if !$contactEditMode}
|
||||
<div class="crm-section {$form.phone.$index.phone.id}-section">
|
||||
<div class="label">{$form.phone.$index.phone.label}</div>
|
||||
<div class="content">{$form.phone.$index.phone.html}</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
<div class="crm-section {$form.email.$index.email.id}-section">
|
||||
<div class="label">{$form.email.$index.email.label}</div>
|
||||
<div class="content">{$form.email.$index.email.html}</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
{/if}
|
||||
{if $addressSequence.street_address}
|
||||
<div class="crm-section {$form.address.$index.street_address.id}-section">
|
||||
<div class="label">{$form.address.$index.street_address.label}</div>
|
||||
<div class="content">{$form.address.$index.street_address.html}
|
||||
<br class="spacer"/>
|
||||
<span class="description">{ts}Street number, street name, apartment/unit/suite - OR P.O. box{/ts}</span>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
{/if}
|
||||
{if $addressSequence.supplemental_address_1}
|
||||
<div class="crm-section {$form.address.$index.supplemental_address_1.id}-section">
|
||||
<div class="label">{$form.address.$index.supplemental_address_1.label}</div>
|
||||
<div class="content">{$form.address.$index.supplemental_address_1.html}
|
||||
<br class="spacer"/>
|
||||
<span class="description">{ts}Supplemental address info, e.g. c/o, department name, building name, etc.{/ts}</span>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
{/if}
|
||||
{if $addressSequence.supplemental_address_2}
|
||||
<div class="crm-section {$form.address.$index.supplemental_address_2.id}-section">
|
||||
<div class="label">{$form.address.$index.supplemental_address_2.label}</div>
|
||||
<div class="content">{$form.address.$index.supplemental_address_2.html}</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
{/if}
|
||||
{if $addressSequence.supplemental_address_3}
|
||||
<div class="crm-section {$form.address.$index.supplemental_address_3.id}-section">
|
||||
<div class="label">{$form.address.$index.supplemental_address_3.label}</div>
|
||||
<div class="content">{$form.address.$index.supplemental_address_3.html}</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
{/if}
|
||||
{if $addressSequence.city}
|
||||
<div class="crm-section {$form.address.$index.city.id}<-section">
|
||||
<div class="label">{$form.address.$index.city.label}</div>
|
||||
<div class="content">{$form.address.$index.city.html}</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
{/if}
|
||||
{if $addressSequence.postal_code}
|
||||
<div class="crm-section {$form.address.$index.postal_code.id}-section">
|
||||
<div class="label">{$form.address.$index.postal_code.label}</div>
|
||||
<div class="content">{$form.address.$index.postal_code.html}
|
||||
{if $form.address.$index.postal_code_suffix.html}
|
||||
- {$form.address.$index.postal_code_suffix.html}
|
||||
<br class="spacer"/>
|
||||
<span class="description">{ts}Enter optional 'add-on' code after the dash ('plus 4' code for U.S. addresses).{/ts}</span>
|
||||
{/if}
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
{/if}
|
||||
{if $addressSequence.country}
|
||||
<div class="crm-section {$form.address.$index.country_id.id}-section">
|
||||
<div class="label">{$form.address.$index.country_id.label}</div>
|
||||
<div class="content">{$form.address.$index.country_id.html}</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
{/if}
|
||||
{if $addressSequence.state_province}
|
||||
<div class="crm-section {$form.address.$index.state_province_id.id}-section">
|
||||
<div class="label">{$form.address.$index.state_province_id.label}</div>
|
||||
<div class="content">{$form.address.$index.state_province_id.html}</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
{/if}
|
||||
{if $contactEditMode and $form.location.$index.address.geo_code_1.label}
|
||||
<div class="crm-section {$form.address.$index.geo_code_1.id}-{$form.address.$index.geo_code_2.id}-section">
|
||||
<div class="label">{$form.address.$index.geo_code_1.label}, {$form.address.$index.geo_code_2.label}</div>
|
||||
<div class="content">{$form.address.$index.geo_code_1.html}, {$form.address.$index.geo_code_2.html}
|
||||
<br class="spacer"/>
|
||||
<span class="description">
|
||||
{ts}Latitude and longitude may be automatically populated by enabling a Mapping Provider.{/ts} {docURL page="user/initial-set-up/installation-and-basic-setup" text="(Refer to the Mapping and Geocoding section in the Installation and Basic Setup Chapter)"}</span>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
{if $contactEditMode}</fieldset>{/if}
|
||||
|
||||
</fieldset>
|
||||
|
||||
{if $form.is_for_organization}
|
||||
{include file="CRM/common/showHideByFieldValue.tpl"
|
||||
trigger_field_id ="is_for_organization"
|
||||
trigger_value ="true"
|
||||
target_element_id ="for_organization"
|
||||
target_element_type ="block"
|
||||
field_type ="radio"
|
||||
invert = "false"
|
||||
}
|
||||
{/if}
|
||||
|
||||
{if $relatedOrganizationFound}
|
||||
{include file="CRM/common/showHideByFieldValue.tpl"
|
||||
trigger_field_id ="org_option"
|
||||
trigger_value ="true"
|
||||
target_element_id ="select_org"
|
||||
target_element_type ="table-row"
|
||||
field_type ="radio"
|
||||
invert = "true"
|
||||
}
|
||||
{include file="CRM/common/showHideByFieldValue.tpl"
|
||||
trigger_field_id ="org_option"
|
||||
trigger_value ="true"
|
||||
target_element_id ="create_org"
|
||||
target_element_type ="table-row"
|
||||
field_type ="radio"
|
||||
invert = "false"
|
||||
}
|
||||
{/if}
|
|
@ -0,0 +1,32 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{* This file provides the HTML for the edit Related contact form *}
|
||||
|
||||
{include file=CRM/Contact/Form/OnBehalfOf.tpl}
|
||||
|
||||
<div class="crm-submit-buttons">
|
||||
{$form.buttons.html}
|
||||
</div>
|
|
@ -0,0 +1,204 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{* this template is used for adding/editing/viewing relationships *}
|
||||
|
||||
{if $action eq 4 } {* action = view *}
|
||||
<div class="crm-block crm-content-block crm-relationship-view-block">
|
||||
<table class="crm-info-panel">
|
||||
{foreach from=$viewRelationship item="row"}
|
||||
<tr>
|
||||
<td class="label">{$row.relation}</td>
|
||||
<td><a class="no-popup" href="{crmURL p='civicrm/contact/view' q="reset=1&cid=`$row.cid`"}">{$row.name}</a></td>
|
||||
</tr>
|
||||
{if $isCurrentEmployer}
|
||||
<tr><td class="label">{ts}Current Employee?{/ts}</td><td>{ts}Yes{/ts}</td></tr>
|
||||
{/if}
|
||||
{if $row.start_date}
|
||||
<tr><td class="label">{ts}Start Date{/ts}</td><td>{$row.start_date|crmDate}</td></tr>
|
||||
{/if}
|
||||
{if $row.end_date}
|
||||
<tr><td class="label">{ts}End Date{/ts}</td><td>{$row.end_date|crmDate}</td></tr>
|
||||
{/if}
|
||||
{if $row.description}
|
||||
<tr><td class="label">{ts}Description{/ts}</td><td>{$row.description}</td></tr>
|
||||
{/if}
|
||||
{foreach from=$viewNote item="rec"}
|
||||
{if $rec }
|
||||
<tr><td class="label">{ts}Note{/ts}</td><td>{$rec}</td></tr>
|
||||
{/if}
|
||||
{/foreach}
|
||||
<tr>
|
||||
<td class="label"><label>{ts}Permissions{/ts}</label></td>
|
||||
<td>
|
||||
{if $row.is_permission_a_b or $row.is_permission_b_a}
|
||||
{if $row.is_permission_a_b}
|
||||
<div>
|
||||
{if $row.rtype EQ 'a_b' AND $is_contact_id_a}
|
||||
{ts 1=$displayName 2=$row.display_name}<strong>%1</strong> can view and update information about %2.{/ts}
|
||||
{else}
|
||||
{ts 1=$row.display_name 2=$displayName}<strong>%1</strong> can view and update information about %2.{/ts}
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
{if $row.is_permission_b_a}
|
||||
<div>
|
||||
{if $row.rtype EQ 'a_b' AND $is_contact_id_a}
|
||||
{ts 1=$row.display_name 2=$displayName}<strong>%1</strong> can view and update information about %2.{/ts}
|
||||
{else}
|
||||
{ts 1=$displayName 2=$row.display_name}<strong>%1</strong> can view and update information about %2.{/ts}
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
{else}
|
||||
{ts}None{/ts}
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td class="label">{ts}Status{/ts}</td><td>{if $row.is_active}{ts}Enabled{/ts}{else}{ts}Disabled{/ts}{/if}</td></tr>
|
||||
{/foreach}
|
||||
</table>
|
||||
{include file="CRM/Custom/Page/CustomDataView.tpl"}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if $action eq 2 or $action eq 1} {* add and update actions *}
|
||||
<div class="crm-block crm-form-block crm-relationship-form-block">
|
||||
<table class="form-layout-compressed">
|
||||
<tr class="crm-relationship-form-block-relationship_type_id">
|
||||
<td class="label">{$form.relationship_type_id.label}</td>
|
||||
<td>{$form.relationship_type_id.html}</td>
|
||||
</tr>
|
||||
<tr class="crm-relationship-form-block-related_contact_id">
|
||||
<td class="label">{$form.related_contact_id.label}</td>
|
||||
<td>{$form.related_contact_id.html}</td>
|
||||
</tr>
|
||||
<tr class="crm-relationship-form-block-is_current_employer" style="display:none;">
|
||||
<td class="label">{$form.is_current_employer.label}</td>
|
||||
<td>{$form.is_current_employer.html}</td>
|
||||
</tr>
|
||||
<tr class="crm-relationship-form-block-start_date">
|
||||
<td class="label">{$form.start_date.label}</td>
|
||||
<td>{include file="CRM/common/jcalendar.tpl" elementName=start_date}<span>{$form.end_date.label} {include file="CRM/common/jcalendar.tpl" elementName=end_date}</span><br />
|
||||
<span class="description">{ts}If this relationship has start and/or end dates, specify them here.{/ts}</span></td>
|
||||
</tr>
|
||||
<tr class="crm-relationship-form-block-description">
|
||||
<td class="label">{$form.description.label}</td>
|
||||
<td>{$form.description.html}</td>
|
||||
</tr>
|
||||
<tr class="crm-relationship-form-block-note">
|
||||
<td class="label">{$form.note.label}</td>
|
||||
<td>{$form.note.html}</td>
|
||||
</tr>
|
||||
<tr class="crm-relationship-form-block-is_permission_a_b">
|
||||
{capture assign="contact_b"}{if $action eq 1}{ts}selected contact(s){/ts}{else}{$display_name_b}{/if}{/capture}
|
||||
<td class="label"><label>{ts}Permissions{/ts}</label></td>
|
||||
<td>
|
||||
{$form.is_permission_a_b.html}
|
||||
{ts 1=$display_name_a 2=$contact_b}<strong>%1</strong> can view and update information about %2.{/ts}
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="crm-relationship-form-block-is_permission_b_a">
|
||||
<td class="label"></td>
|
||||
<td>
|
||||
{$form.is_permission_b_a.html}
|
||||
{ts 1=$contact_b|ucfirst 2=$display_name_a}<strong>%1</strong> can view and update information about %2.{/ts}
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="crm-relationship-form-block-is_active">
|
||||
<td class="label">{$form.is_active.label}</td>
|
||||
<td>{$form.is_active.html}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div id="customData"></div>
|
||||
<div class="spacer"></div>
|
||||
</div>
|
||||
{/if}
|
||||
{if ($action EQ 1) OR ($action EQ 2) }
|
||||
{*include custom data js file *}
|
||||
{include file="CRM/common/customData.tpl"}
|
||||
<script type="text/javascript">
|
||||
{literal}
|
||||
CRM.$(function($) {
|
||||
var
|
||||
$form = $("form.{/literal}{$form.formClass}{literal}"),
|
||||
relationshipData = {/literal}{$relationshipData|@json_encode}{literal};
|
||||
$('[name=relationship_type_id]', $form).change(function() {
|
||||
var
|
||||
val = $(this).val(),
|
||||
$contactField = $('#related_contact_id[type=text]', $form);
|
||||
if (!val && $contactField.length) {
|
||||
$contactField
|
||||
.prop('disabled', true)
|
||||
.attr('placeholder', {/literal}'{ts escape='js'}- first select relationship type -{/ts}'{literal})
|
||||
.change();
|
||||
}
|
||||
else if (val) {
|
||||
var
|
||||
pieces = val.split('_'),
|
||||
rType = pieces[0],
|
||||
source = pieces[1], // a or b
|
||||
target = pieces[2], // b or a
|
||||
contact_type = relationshipData[rType]['contact_type_' + target],
|
||||
contact_sub_type = relationshipData[rType]['contact_sub_type_' + target];
|
||||
// ContactField only exists for ADD action, not update
|
||||
if ($contactField.length) {
|
||||
var api = {params: {}};
|
||||
if (contact_type) {
|
||||
api.params.contact_type = contact_type;
|
||||
}
|
||||
if (contact_sub_type) {
|
||||
api.params.contact_sub_type = contact_sub_type;
|
||||
}
|
||||
$contactField
|
||||
.val('')
|
||||
.prop('disabled', false)
|
||||
.data('api-params', api)
|
||||
.data('user-filter', {})
|
||||
.attr('placeholder', relationshipData[rType]['placeholder_' + target])
|
||||
.change();
|
||||
}
|
||||
|
||||
// Show/hide employer field
|
||||
$('.crm-relationship-form-block-is_current_employer', $form).toggle(rType === {/literal}'{$employmentRelationship}'{literal});
|
||||
|
||||
// Swap the permission checkboxes to match selected relationship direction
|
||||
$('#is_permission_a_b', $form).attr('name', 'is_permission_' + source + '_' + target);
|
||||
$('#is_permission_b_a', $form).attr('name', 'is_permission_' + target + '_' + source);
|
||||
|
||||
CRM.buildCustomData('Relationship', rType);
|
||||
}
|
||||
}).change();
|
||||
});
|
||||
{/literal}
|
||||
</script>
|
||||
{/if}
|
||||
|
||||
{if $action eq 8}
|
||||
<div class="status">
|
||||
{ts}Are you sure you want to delete this Relationship?{/ts}
|
||||
</div>
|
||||
{/if}
|
||||
<div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="bottom"}</div>
|
|
@ -0,0 +1,113 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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-advanced-intro-title'}
|
||||
{ts}Advanced Search{/ts}
|
||||
{/htxt}
|
||||
{htxt id='id-advanced-intro'}
|
||||
<p>{ts}Use <strong>%</strong> wildcard(s) for partial matches. EXAMPLE: Enter 'Volunteer%' as your Activity Type to match any activity whose type is 'Volunteer' + any other words (e.g. Volunteer for Open House).{/ts}</p>
|
||||
<p>{ts}When multiple options are selected within a search field the selections are combined using <strong>OR</strong> criteria (e.g. selecting both 'Group A' and 'Group B' will find contacts who are either in 'Group A' OR 'Group B' or in both).</p>
|
||||
<p>By default the different search fields are combined using the <strong>AND</strong> Search Operator (e.g. selecting Tag is 'Age' AND Country is 'Canada' returns only those contacts who meet both criteria). You can override the Search Operator default for combining different fields in the Search Settings.{/ts}</p>
|
||||
{/htxt}
|
||||
|
||||
{htxt id='id-advanced-smart-title'}
|
||||
{ts}Smart Group{/ts}
|
||||
{/htxt}
|
||||
{htxt id='id-advanced-smart'}
|
||||
<p>{ts}If you've changed search criteria for this 'smart group' and want to save your changes, select <strong>Group - update smart group</strong> from the '- more actions -' drop-down menu{/ts}</p>
|
||||
{/htxt}
|
||||
|
||||
{htxt id="id-privacy-title"}
|
||||
{ts}Privacy Options{/ts}
|
||||
{/htxt}
|
||||
{htxt id="id-privacy"}
|
||||
<p>{ts}Contacts with any of the checked privacy options are EXCLUDED from your search results by default. EXAMPLE: If you select 'Do not phone', and search for contacts with an address in a specific city - then contacts in that city who have 'Do not phone' selected as a privacy option will be excluded from the search results.{/ts}</p>
|
||||
<p>{ts}If you want to FIND (include) contacts with a particular privacy option set, then click the 'Include' radio button.{/ts}</p>
|
||||
{/htxt}
|
||||
|
||||
{htxt id="privacy-operator-title"}
|
||||
{ts}Multiple Privacy Options{/ts}
|
||||
{/htxt}
|
||||
{htxt id="privacy-operator"}
|
||||
<p>{ts}If you select multiple privacy options, your choices are combined with OR statements by default. EXAMPLE: If you select 'Do not phone' and 'Do not email', results will include contacts who have either or both preferences. If you want to return only contacts with both preferences, select the AND operator.{/ts}</p>
|
||||
{/htxt}
|
||||
|
||||
{htxt id="id-display-results-title"}
|
||||
{ts}Results Display{/ts}
|
||||
{/htxt}
|
||||
{htxt id="id-display-results"}
|
||||
<p>{ts}Advanced Search returns your results as Contact records by default. However, you may want to get another record type instead. For example, you may want to see all the Activity records which match your search criteria.{/ts}</p>
|
||||
{/htxt}
|
||||
|
||||
{htxt id="id-search-views-title"}
|
||||
{ts}Views For Display Contacts{/ts}
|
||||
{/htxt}
|
||||
{htxt id="id-search-views"}
|
||||
<p>{ts}If you are displaying the search results as contacts, you can modify the columns displayed by creating a Profile containing a different set of contact fields and then selecting that Profile here. For example you may want to include columns for Gender and Date of Birth, while eliminating Country.{/ts} {docURL page="user/organising-your-data/profiles"}</p>
|
||||
{/htxt}
|
||||
|
||||
{htxt id="id-search-operator-title"}
|
||||
{ts}Search Operator{/ts}
|
||||
{/htxt}
|
||||
{htxt id="id-search-operator"}
|
||||
<p>{ts}Determines whether your criteria are combined with AND statements, or combined with OR statements. For example, you may want to find all individuals who are in the Volunteers group AND who have a Volunteer Training activity recorded for them. In this case use the AND operator. If you need to find everyone who is in the Volunteers group OR has a Volunteer Training activity recorded, use the OR operator.{/ts}</p>
|
||||
{/htxt}
|
||||
|
||||
{htxt id="id-relationship-target-group-title"}
|
||||
{ts}Target Contact Group{/ts}
|
||||
{/htxt}
|
||||
{htxt id="id-relationship-target-group"}
|
||||
<p>{ts}Use this filter to limit search results to relationships where the related contacts are part of a specific group or groups. For example, you might want to find all individuals who are employees ('Employee of' relationship type) of organizations which are in your 'Corporate Sponsors' group.{/ts}</p>
|
||||
{/htxt}
|
||||
|
||||
{htxt id="id-relationship-active-period-title"}
|
||||
{ts}Active Period{/ts}
|
||||
{/htxt}
|
||||
{htxt id="id-relationship-active-period"}
|
||||
<p>{ts}Use this filter to limit search results to relationships which were active during the specified time period (e.g. this is useful if you need to search all volunteer relationships that were active during 2014).{/ts}</p>
|
||||
<p>{ts}By definition a relationship is active if any of these conditions occurs: (1) Start Date <= Current Date <= End Date (2) Start Date <= Current Date and End Date is not defined (3) Start Date is not defined and Current Date <= End Date{/ts}</p>
|
||||
{/htxt}
|
||||
|
||||
{htxt id="id-all-tags-title"}
|
||||
{ts}Tags{/ts}
|
||||
{/htxt}
|
||||
{htxt id="id-all-tags"}
|
||||
<p>{ts}Find records with tags (regular or tagset tag) which contain a complete or partial word or phrase. EXAMPLE: If you have several tags that contain the word 'Donor', you can find contacts tagged with any of them by entering 'Donor' in this field.{/ts}</p>
|
||||
{/htxt}
|
||||
|
||||
{htxt id="id-all-tag-types-title"}
|
||||
{ts}Include Tags on Other Types of Records{/ts}
|
||||
{/htxt}
|
||||
{htxt id="id-all-tag-types"}
|
||||
<p>{ts}Check this box if you want to search for tagged activities or cases (in addition to contact records).{/ts}</p>
|
||||
{/htxt}
|
||||
|
||||
{htxt id="is-test-title"}
|
||||
{ts}Test Records{/ts}
|
||||
{/htxt}
|
||||
{htxt id="is-test"}
|
||||
<p>{ts}In the process of setting up CiviCRM components or configuring pages and profiles, you might have created test contributions, activities, participants, pledges, etc.{/ts}</p>
|
||||
<p>{ts}Once you have finished your testing, it is a good idea to clean up by finding your test records and deleting them.{/ts}</p>
|
||||
{/htxt}
|
|
@ -0,0 +1,97 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{* Master tpl for Advanced Search *}
|
||||
|
||||
<div class="crm-form-block crm-search-form-block">
|
||||
|
||||
{include file="CRM/Contact/Form/Search/Intro.tpl"}
|
||||
|
||||
<div class="crm-accordion-wrapper crm-advanced_search_form-accordion {if !empty($ssID) or $rows}collapsed{/if}">
|
||||
<div class="crm-accordion-header crm-master-accordion-header">
|
||||
{if !empty($ssID) or $rows}
|
||||
{if $savedSearch}
|
||||
{ts 1=$savedSearch.name}Edit %1 Smart Group Criteria{/ts}
|
||||
{else}
|
||||
{ts}Edit Search Criteria{/ts}
|
||||
{/if}
|
||||
{else}
|
||||
{if $savedSearch}
|
||||
{ts 1=$savedSearch.name}Edit %1 Smart Group Criteria{/ts}
|
||||
{else}
|
||||
{ts}Search Criteria{/ts}
|
||||
{/if}
|
||||
{/if}
|
||||
{help id='id-advanced-intro'}
|
||||
</div>
|
||||
<div class="crm-accordion-body">
|
||||
{include file="CRM/Contact/Form/Search/AdvancedCriteria.tpl"}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{if $rowsEmpty}
|
||||
<div class="crm-content-block">
|
||||
<div class="crm-results-block crm-results-block-empty">
|
||||
{include file="CRM/Contact/Form/Search/EmptyResults.tpl"}
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if $rows}
|
||||
<div class="crm-content-block">
|
||||
<div class="crm-results-block">
|
||||
{* Search request has returned 1 or more matching rows. Display results and collapse the search criteria fieldset. *}
|
||||
|
||||
{* This section handles form elements for action task select and submit *}
|
||||
<div class="crm-search-tasks">
|
||||
{if $taskFile}
|
||||
{if $taskContext}
|
||||
{include file=$taskFile context=$taskContext}
|
||||
{else}
|
||||
{include file=$taskFile}
|
||||
{/if}
|
||||
{else}
|
||||
{include file="CRM/Contact/Form/Search/ResultTasks.tpl"}
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
{* This section displays the rows along and includes the paging controls *}
|
||||
<div class="crm-search-results">
|
||||
{if $resultFile}
|
||||
{if $resultContext}
|
||||
{include file=$resultFile context=$resultContext}
|
||||
{else}
|
||||
{include file=$resultFile}
|
||||
{/if}
|
||||
{else}
|
||||
{include file="CRM/Contact/Form/Selector.tpl"}
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
{* END Actions/Results section *}
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
|
@ -0,0 +1,152 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{* Advanced Search Criteria Fieldset *}
|
||||
{literal}
|
||||
<script type="text/javascript">
|
||||
CRM.$(function($) {
|
||||
// Bind first click of accordion header to load crm-accordion-body with snippet
|
||||
// everything else is taken care of by crmAccordions()
|
||||
$('.crm-search_criteria_basic-accordion .crm-accordion-header').addClass('active');
|
||||
$('.crm-ajax-accordion').on('click', '.crm-accordion-header:not(.active)', function() {
|
||||
loadPanes($(this).attr('id'));
|
||||
});
|
||||
$('.crm-ajax-accordion:not(.collapsed) .crm-accordion-header').each(function() {
|
||||
loadPanes($(this).attr('id'));
|
||||
});
|
||||
$('.crm-ajax-accordion').on('click', '.crm-close-accordion', function() {
|
||||
var header = $(this).parent();
|
||||
header.next().html('');
|
||||
header.removeClass('active');
|
||||
header.parent('.crm-ajax-accordion:not(.collapsed)').crmAccordionToggle();
|
||||
// Reset results-display mode if it depends on this pane
|
||||
var mode = modes[$('#component_mode').val()] || null;
|
||||
if (mode && header.attr('id') == mode) {
|
||||
var oldMode = $('#component_mode :selected').text();
|
||||
$('#component_mode').val('1');
|
||||
{/literal}
|
||||
var msg = '{ts escape="js"}Displaying results as "%1" is not available without search criteria from the pane you just closed.{/ts}';
|
||||
msg = msg.replace('%1', oldMode);
|
||||
CRM.alert(msg, '{ts escape="js"}Display Results have been Reset{/ts}');
|
||||
{literal}
|
||||
}
|
||||
$(this).remove();
|
||||
return false;
|
||||
});
|
||||
// TODO: Why are the modes numeric? If they used the string there would be no need for this map
|
||||
var modes = {
|
||||
'2': 'CiviContribute',
|
||||
'3': 'CiviEvent',
|
||||
'4': 'activity',
|
||||
'5': 'CiviMember',
|
||||
'6': 'CiviCase',
|
||||
'8': 'CiviMail'
|
||||
};
|
||||
// Handle change of results mode
|
||||
$('#component_mode').change(function() {
|
||||
// Reset task dropdown
|
||||
$('#task').val('');
|
||||
var mode = modes[$('#component_mode').val()] || null;
|
||||
if (mode) {
|
||||
$('.crm-' + mode + '-accordion.collapsed').crmAccordionToggle();
|
||||
loadPanes(mode);
|
||||
}
|
||||
if ($('#component_mode').val() == '7') {
|
||||
$('#crm-display_relationship_type').show();
|
||||
}
|
||||
else {
|
||||
$('#display_relationship_type').val('');
|
||||
$('#crm-display_relationship_type').hide();
|
||||
}
|
||||
}).change();
|
||||
/**
|
||||
* Loads snippet based on id of crm-accordion-header
|
||||
*/
|
||||
function loadPanes(id) {
|
||||
var url = "{/literal}{crmURL p='civicrm/contact/search/advanced' q="qfKey=`$qfKey`&searchPane=" h=0}{literal}" + id;
|
||||
var header = $('#' + id);
|
||||
var body = $('.crm-accordion-body.' + id);
|
||||
if (header.length > 0 && body.length > 0 && !body.html()) {
|
||||
body.html('<div class="crm-loading-element"><span class="loading-text">{/literal}{ts escape='js'}Loading{/ts}{literal}...</span></div>');
|
||||
header.append('{/literal}<a href="#" class="crm-close-accordion crm-hover-button css_right" title="{ts escape='js'}Remove from search criteria{/ts}"><i class="crm-i fa-times"></i></a>{literal}');
|
||||
header.addClass('active');
|
||||
CRM.loadPage(url, {target: body, block: false});
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
{/literal}
|
||||
|
||||
{if $context EQ 'smog' || $context EQ 'amtg' || $savedSearch}
|
||||
<h3>
|
||||
{if $context EQ 'smog'}{ts}Find Contacts within this Group{/ts}
|
||||
{elseif $context EQ 'amtg'}{ts}Find Contacts to Add to this Group{/ts}
|
||||
{elseif $savedSearch}{ts 1=$savedSearch.name}%1 Smart Group Criteria{/ts} {help id='id-advanced-smart'}
|
||||
{/if}
|
||||
</h3>
|
||||
{/if}
|
||||
|
||||
{strip}
|
||||
<div class="crm-accordion-wrapper crm-search_criteria_basic-accordion ">
|
||||
<div class="crm-accordion-header">
|
||||
{ts}Display Settings For Results{/ts}
|
||||
</div>
|
||||
<div class="crm-accordion-body">
|
||||
{include file="CRM/Contact/Form/Search/Criteria/DisplaySettings.tpl"}
|
||||
</div>
|
||||
</div>
|
||||
<div class="crm-accordion-wrapper crm-search_criteria_basic-accordion ">
|
||||
<div class="crm-accordion-header">
|
||||
{ts}Search Settings{/ts}
|
||||
</div>
|
||||
<div class="crm-accordion-body">
|
||||
{include file="CRM/Contact/Form/Search/Criteria/SearchSettings.tpl"}
|
||||
</div>
|
||||
</div>
|
||||
<div class="crm-accordion-wrapper crm-search_criteria_basic-accordion ">
|
||||
<div class="crm-accordion-header">
|
||||
{ts}Basic Criteria{/ts}
|
||||
</div>
|
||||
<div class="crm-accordion-body">
|
||||
{include file="CRM/Contact/Form/Search/Criteria/Basic.tpl"}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{foreach from=$allPanes key=paneName item=paneValue}
|
||||
<div class="crm-accordion-wrapper crm-ajax-accordion crm-{$paneValue.id}-accordion {if $paneValue.open eq 'true' and $openedPanes.$paneName} {else}collapsed{/if}">
|
||||
<div class="crm-accordion-header" id="{$paneValue.id}">
|
||||
{$paneName}
|
||||
</div>
|
||||
<div class="crm-accordion-body {$paneValue.id}"></div>
|
||||
</div><!-- Surplus /div is required (not sure why but breakage is obvious when you remove it) -->
|
||||
{/foreach}
|
||||
<div class="spacer"></div>
|
||||
|
||||
<table class="form-layout">
|
||||
<tr>
|
||||
<td>{include file="CRM/common/formButtons.tpl" location="botton"}</td>
|
||||
</tr>
|
||||
</table>
|
||||
{/strip}
|
|
@ -0,0 +1,79 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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-basic-criteria-title"}
|
||||
{ts}Search{/ts}
|
||||
{/htxt}
|
||||
{htxt id="id-basic-criteria"}
|
||||
{capture assign=amt}{500|crmMoney}{/capture}
|
||||
<p>{ts}Find contacts by partial or full name or email, type of contact, group, and/or tag. You can then view or edit contact details, print a contact list, or use the <strong>- more actions -</strong> drop down list to assign tags, add contacts to groups, create smart groups, export contact data to a spreadsheet, and more.{/ts}</p>
|
||||
<p>{ts 1=$amt}Click <strong>Advanced Search</strong> to search by address, demographics, custom fields, notes, and/or relationships. If you are using CiviContribute, CiviEvent or CiviMember - you can also search based on information stored by these components. For example - you can find all contacts who live in a specific city AND have contributed at least %1 within the past 6 months.{/ts}</p>
|
||||
{/htxt}
|
||||
|
||||
{htxt id="id-smog-criteria-title"}
|
||||
{ts}Group Search{/ts}
|
||||
{/htxt}
|
||||
{htxt id="id-smog-criteria"}
|
||||
<p>{ts 1=$params.group_title}Contacts in the <strong>%1</strong> group are listed below.{/ts}
|
||||
<ul>
|
||||
<li>{ts}Use 'Find Contacts within this Group' to search for specific contacts.{/ts}</li>
|
||||
<li>{ts}Use the 'Group Status...' checkboxes to view contacts with 'Pending' status and/or contacts who have been 'Removed' from this group.{/ts}</li>
|
||||
</ul>
|
||||
</p>
|
||||
{if $params.permissionedForGroup}
|
||||
{capture assign=addMembersURL}{crmURL q="context=amtg&amtgID=`$params.group_id`&reset=1"}{/capture}
|
||||
<p>{ts 1=$addMembersURL 2=$params.group_title}Click <a href='%1'>Add Contacts to %2</a> if you want to add contacts to this group.{/ts}
|
||||
{if !empty($params.ssID)}
|
||||
{if $params.ssMappingID}
|
||||
{capture assign=editSmartGroupURL}{crmURL p="civicrm/contact/search/builder" q="reset=1&force=1&ssID=`$params.ssID`"}{/capture}
|
||||
{else}
|
||||
{capture assign=editSmartGroupURL}{crmURL p="civicrm/contact/search/advanced" q="reset=1&force=1&ssID=`$params.ssID`"}{/capture}
|
||||
{/if}
|
||||
{ts 1=$editSmartGroupURL}Click <a href='%1'>Edit Smart Group Search Criteria...</a> to change the search query used for this 'smart' group.{/ts}
|
||||
{/if}
|
||||
</p>
|
||||
{/if}
|
||||
{/htxt}
|
||||
|
||||
{htxt id="id-amtg-criteria-title"}
|
||||
{ts}Add to Group{/ts}
|
||||
{/htxt}
|
||||
{htxt id="id-amtg-criteria"}
|
||||
{ts 1=$params.group_title}Use this Search form to find contacts. Mark the contacts you want to add to this group. Then click 'Add Contacts to %1'.{/ts}
|
||||
{/htxt}
|
||||
|
||||
{htxt id="id-edit-smartGroup-title"}
|
||||
{ts}Edit Smart Group{/ts}
|
||||
{/htxt}
|
||||
{htxt id="id-edit-smartGroup"}
|
||||
{ts}Click this button if you want to view and or modify the search criteria used to define the members of this smart group.{/ts}
|
||||
{/htxt}
|
||||
|
||||
{htxt id="id-add-to-smartGroup-title"}
|
||||
{ts}Add to Smart Group{/ts}
|
||||
{/htxt}
|
||||
{htxt id="id-add-to-smartGroup"}
|
||||
{ts}You can also add contacts to a smart group directly - regardless of whether they meet the smart group search criteria. For example, you might have a smart group for constituents who live in a certain locality, AND might have a few constituents who want to stay informed about events in that locality even though they no longer live there. Click this button to add contacts directly to this smart group.{/ts}
|
||||
{/htxt}
|
|
@ -0,0 +1,75 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
|
||||
{* Main template for basic search (Find Contacts) *}
|
||||
{include file="CRM/Contact/Form/Search/Intro.tpl"}
|
||||
<div class="crm-form-block crm-search-form-block">
|
||||
{* This section handles form elements for search criteria *}
|
||||
<div id="searchForm">
|
||||
{include file="CRM/Contact/Form/Search/BasicCriteria.tpl"}
|
||||
</div>
|
||||
</div>
|
||||
<div class="crm-content-block">
|
||||
{if $rowsEmpty}
|
||||
<div class="crm-results-block crm-results-block-empty">
|
||||
{include file="CRM/Contact/Form/Search/EmptyResults.tpl"}
|
||||
</div>
|
||||
{elseif $rows}
|
||||
<div class="crm-results-block">
|
||||
{* Search request has returned 1 or more matching rows. *}
|
||||
{* This section handles form elements for action task select and submit *}
|
||||
<div class="crm-search-tasks">
|
||||
{if $taskFile}
|
||||
{if $taskContext}
|
||||
{include file=$taskFile context=$taskContext}
|
||||
{else}
|
||||
{include file=$taskFile}
|
||||
{/if}
|
||||
{else}
|
||||
{include file="CRM/Contact/Form/Search/ResultTasks.tpl"}
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
{* This section displays the rows along and includes the paging controls *}
|
||||
<div class="crm-search-results">
|
||||
{if $resultFile}
|
||||
{if $resultContext}
|
||||
{include file=$resultFile context=$resultContext}
|
||||
{else}
|
||||
{include file=$resultFile}
|
||||
{/if}
|
||||
{else}
|
||||
{include file="CRM/Contact/Form/Selector.tpl"}
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
{* END Actions/Results section *}
|
||||
</div>
|
||||
{else}
|
||||
<div class="spacer"> </div>
|
||||
{/if}
|
||||
</div>
|
||||
{*include file="CRM/common/searchJs.tpl"*}
|
|
@ -0,0 +1,101 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{* Search criteria form elements - Find Contacts *}
|
||||
|
||||
{* Set title for search criteria accordion *}
|
||||
{if $context EQ 'smog'}
|
||||
{capture assign=editTitle}{ts}Find Contacts within this Group{/ts}{/capture}
|
||||
{elseif $context EQ 'amtg' AND !$rows}
|
||||
{capture assign=editTitle}{ts}Find Contacts to Add to this Group{/ts}{/capture}
|
||||
{else}
|
||||
{capture assign=editTitle}{ts}Edit Search Criteria{/ts}{/capture}
|
||||
{/if}
|
||||
|
||||
{strip}
|
||||
<div class="crm-block crm-form-block crm-basic-criteria-form-block">
|
||||
<div class="crm-accordion-wrapper crm-case_search-accordion {if $rows}collapsed{/if}">
|
||||
<div class="crm-accordion-header crm-master-accordion-header">
|
||||
{$editTitle}
|
||||
</div><!-- /.crm-accordion-header -->
|
||||
<div class="crm-accordion-body">
|
||||
<div class="crm-section sort_name-section">
|
||||
<div class="label">
|
||||
{$form.sort_name.label}
|
||||
</div>
|
||||
<div class="content">
|
||||
{$form.sort_name.html}
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
|
||||
{if $form.contact_type}
|
||||
<div class="crm-section contact_type-section">
|
||||
<div class="label">
|
||||
{$form.contact_type.label}
|
||||
</div>
|
||||
<div class="content">
|
||||
{$form.contact_type.html}
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if $form.group}
|
||||
<div class="crm-section group_selection-section">
|
||||
<div class="label">
|
||||
{if $context EQ 'smog'}
|
||||
{$form.group_contact_status.label}
|
||||
{else}
|
||||
{ts}in{/ts}
|
||||
{/if}
|
||||
</div>
|
||||
<div class="content">
|
||||
{if $context EQ 'smog'}
|
||||
{$form.group_contact_status.html}
|
||||
{else}
|
||||
{$form.group.html|crmAddClass:big}
|
||||
{/if}
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if $form.tag}
|
||||
<div class="crm-section tag-section">
|
||||
<div class="label">
|
||||
{$form.tag.label}
|
||||
</div>
|
||||
<div class="content">
|
||||
{$form.tag.html|crmAddClass:medium}
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
{/if}
|
||||
<div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl"}</div>
|
||||
</div><!-- /.crm-accordion-body -->
|
||||
</div><!-- /.crm-accordion-wrapper -->
|
||||
</div><!-- /.crm-form-block -->
|
||||
{/strip}
|
|
@ -0,0 +1,34 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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="builder-intro-title"}
|
||||
{ts}Search Builder{/ts}
|
||||
{/htxt}
|
||||
{htxt id="builder-intro"}
|
||||
{capture assign=docLink}{docURL page="user/the-user-interface/searching" text="Search documentation in the User Guide"}{/capture}
|
||||
<p>{ts}Create your search by selecting the criteria (record type and field), the comparison operator, and entering the value you want to search for. You can define one or many criteria as a set: <em>Include contacts where... State IS Washington AND City IS Seattle AND Birth Date is later than (>) Jan 1, 1985</em>{/ts}</p>
|
||||
<p>{ts}You can also create additional sets of criteria: <em>Also include contacts where... State IS California AND City IS Los Angeles AND Birth Date is later than (>) Jan 1, 1985</em>{/ts}</p>
|
||||
<p>{ts 1=$docLink}For more information see %1.{/ts}</p>
|
||||
{/htxt}
|
|
@ -0,0 +1,299 @@
|
|||
// http://civicrm.org/licensing
|
||||
(function($, CRM) {
|
||||
'use strict';
|
||||
|
||||
/* jshint validthis: true */
|
||||
/**
|
||||
* Handle user input - field or operator selection.
|
||||
*
|
||||
* Decide whether to display select drop down, regular text or date
|
||||
* field for the given field and row.
|
||||
*/
|
||||
function handleUserInputField() {
|
||||
var row = $(this).closest('tr');
|
||||
var field = $('select[id^=mapper][id$="_1"]', row).val();
|
||||
var operator = $('select[id^=operator]', row);
|
||||
var op = operator.val();
|
||||
|
||||
var patt = /_1$/; // pattern to check if the change event came from field name
|
||||
if (field !== null && patt.test(this.id)) {
|
||||
if ($.inArray(field, CRM.searchBuilder.stringFields) >= 0) {
|
||||
// string operators
|
||||
buildOperator(operator, CRM.searchBuilder.stringOperators);
|
||||
} else {
|
||||
// general operators
|
||||
buildOperator(operator, CRM.searchBuilder.generalOperators);
|
||||
}
|
||||
}
|
||||
|
||||
// These Ops don't get any input field.
|
||||
var noFieldOps = ['', 'IS EMPTY', 'IS NOT EMPTY', 'IS NULL', 'IS NOT NULL'];
|
||||
|
||||
if ($.inArray(op, noFieldOps) > -1) {
|
||||
// Hide the fields and return.
|
||||
$('.crm-search-value', row).hide().find('input, select').val('');
|
||||
return;
|
||||
}
|
||||
$('.crm-search-value', row).show();
|
||||
|
||||
if (!CRM.searchBuilder.fieldOptions[field]) {
|
||||
removeSelect(row);
|
||||
}
|
||||
else {
|
||||
buildSelect(row, field, op);
|
||||
}
|
||||
|
||||
if ($.inArray(field, CRM.searchBuilder.dateFields) < 0) {
|
||||
removeDate(row);
|
||||
}
|
||||
else {
|
||||
buildDate(row, op);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Add appropriate operator to selected field
|
||||
* @param operator: jQuery object
|
||||
* @param options: array
|
||||
*/
|
||||
function buildOperator(operator, options) {
|
||||
var selected = operator.val();
|
||||
operator.html('');
|
||||
$.each(options, function(value, label) {
|
||||
operator.append('<option value="' + value + '">' + label + '</option>');
|
||||
});
|
||||
operator.val(selected);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add select list if appropriate for this operation
|
||||
* @param row: jQuery object
|
||||
* @param field: string
|
||||
*/
|
||||
function buildSelect(row, field, op) {
|
||||
var multiSelect = '';
|
||||
// Operators that will get a single drop down list of choices.
|
||||
var dropDownSingleOps = ['=', '!='];
|
||||
// Multiple select drop down list.
|
||||
var dropDownMultipleOps = ['IN', 'NOT IN'];
|
||||
|
||||
if ($.inArray(op, dropDownMultipleOps) > -1) {
|
||||
multiSelect = 'multiple="multiple"';
|
||||
}
|
||||
else if ($.inArray(op, dropDownSingleOps) < 0) {
|
||||
// If this op is neither supported by single or multiple selects, then we should not render a select list.
|
||||
removeSelect(row);
|
||||
return;
|
||||
}
|
||||
|
||||
$('.crm-search-value select', row).remove();
|
||||
$('input[id^=value]', row)
|
||||
.hide()
|
||||
.after('<select class="crm-form-' + multiSelect.substr(0, 5) + 'select required" ' + multiSelect + '><option value="">' + ts('Loading') + '...</option></select>');
|
||||
|
||||
fetchOptions(row, field);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve option list for given row
|
||||
* @param row: jQuery object
|
||||
* @param field: string
|
||||
*/
|
||||
function fetchOptions(row, field) {
|
||||
if (CRM.searchBuilder.fieldOptions[field] === 'yesno') {
|
||||
CRM.searchBuilder.fieldOptions[field] = [{key: 1, value: ts('Yes')}, {key: 0, value: ts('No')}];
|
||||
}
|
||||
if (typeof(CRM.searchBuilder.fieldOptions[field]) == 'string') {
|
||||
CRM.api(CRM.searchBuilder.fieldOptions[field], 'getoptions', {field: field, sequential: 1}, {
|
||||
success: function(result, settings) {
|
||||
var field = settings.field;
|
||||
if (result.count) {
|
||||
CRM.searchBuilder.fieldOptions[field] = result.values;
|
||||
buildOptions(settings.row, field);
|
||||
}
|
||||
else {
|
||||
removeSelect(settings.row);
|
||||
}
|
||||
},
|
||||
error: function(result, settings) {
|
||||
removeSelect(settings.row);
|
||||
},
|
||||
row: row,
|
||||
field: field
|
||||
});
|
||||
}
|
||||
else {
|
||||
buildOptions(row, field);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Populate option list for given row
|
||||
* @param row: jQuery object
|
||||
* @param field: string
|
||||
*/
|
||||
function buildOptions(row, field) {
|
||||
var select = $('.crm-search-value select', row);
|
||||
var value = $('input[id^=value]', row).val();
|
||||
if (value.length && value.charAt(0) == '(' && value.charAt(value.length - 1) == ')') {
|
||||
value = value.slice(1, -1);
|
||||
}
|
||||
var options = value.split(',');
|
||||
if (select.attr('multiple') == 'multiple') {
|
||||
select.find('option').remove();
|
||||
}
|
||||
else {
|
||||
select.find('option').text(ts('- select -'));
|
||||
if (options.length > 1) {
|
||||
options = [options[0]];
|
||||
}
|
||||
}
|
||||
$.each(CRM.searchBuilder.fieldOptions[field], function(key, option) {
|
||||
var optionKey = option.key;
|
||||
if ($.inArray(field, CRM.searchBuilder.searchByLabelFields) >= 0) {
|
||||
optionKey = option.value;
|
||||
}
|
||||
var selected = ($.inArray(''+optionKey, options) > -1) ? 'selected="selected"' : '';
|
||||
select.append('<option value="' + optionKey + '"' + selected + '>' + option.value + '</option>');
|
||||
});
|
||||
select.change();
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove select options and restore input to a plain textfield
|
||||
* @param row: jQuery object
|
||||
*/
|
||||
function removeSelect(row) {
|
||||
$('.crm-search-value input', row).show();
|
||||
$('.crm-search-value select', row).remove();
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a datepicker if appropriate for this operation
|
||||
* @param row: jQuery object
|
||||
*/
|
||||
function buildDate(row, op) {
|
||||
var input = $('.crm-search-value input', row);
|
||||
// These are operations that should not get a datepicker
|
||||
var datePickerOp = ($.inArray(op, ['IN', 'NOT IN', 'LIKE', 'RLIKE']) < 0);
|
||||
if (!datePickerOp) {
|
||||
removeDate(row);
|
||||
}
|
||||
else if (!input.hasClass('hasDatepicker')) {
|
||||
input.addClass('dateplugin').datepicker({
|
||||
dateFormat: 'yymmdd',
|
||||
changeMonth: true,
|
||||
changeYear: true,
|
||||
yearRange: '-100:+20'
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove datepicker
|
||||
* @param row: jQuery object
|
||||
*/
|
||||
function removeDate(row) {
|
||||
var input = $('.crm-search-value input', row);
|
||||
if (input.hasClass('hasDatepicker')) {
|
||||
input.removeClass('dateplugin').val('').datepicker('destroy');
|
||||
}
|
||||
}
|
||||
|
||||
// Initialize display: Hide empty blocks & fields
|
||||
var newBlock = CRM.searchBuilder && CRM.searchBuilder.newBlock || 0;
|
||||
function initialize() {
|
||||
$('.crm-search-block', '#Builder').each(function(blockNo) {
|
||||
var block = $(this);
|
||||
var empty = blockNo + 1 > newBlock;
|
||||
var skippedRow = false;
|
||||
$('tr:not(.crm-search-builder-add-row)', block).each(function(rowNo) {
|
||||
var row = $(this);
|
||||
if ($('select:first', row).val() === '') {
|
||||
if (!skippedRow && (rowNo === 0 || blockNo + 1 == newBlock)) {
|
||||
skippedRow = true;
|
||||
}
|
||||
else {
|
||||
row.hide();
|
||||
}
|
||||
}
|
||||
else {
|
||||
empty = false;
|
||||
}
|
||||
});
|
||||
if (empty) {
|
||||
block.hide();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$(function($) {
|
||||
$('#crm-main-content-wrapper')
|
||||
// Reset and hide row
|
||||
.on('click', '.crm-reset-builder-row', function() {
|
||||
var row = $(this).closest('tr');
|
||||
$('input, select', row).val('').change();
|
||||
row.hide();
|
||||
// Hide entire block if this is the only visible row
|
||||
if (row.siblings(':visible').length < 2) {
|
||||
row.closest('.crm-search-block').hide();
|
||||
}
|
||||
return false;
|
||||
})
|
||||
// Add new field - if there's a hidden one, show it
|
||||
// Otherwise allow form to submit and fetch more from the server
|
||||
.on('click', 'input[name^=addMore]', function() {
|
||||
var table = $(this).closest('table');
|
||||
if ($('tr:hidden', table).length) {
|
||||
$('tr:hidden', table).first().show();
|
||||
return false;
|
||||
}
|
||||
})
|
||||
// Add new block - if there's a hidden one, show it
|
||||
// Otherwise allow form to submit and fetch more from the server
|
||||
.on('click', '#addBlock', function() {
|
||||
if ($('.crm-search-block:hidden', '#Builder').length) {
|
||||
var block = $('.crm-search-block:hidden', '#Builder').first();
|
||||
block.show();
|
||||
$('tr:first-child, tr.crm-search-builder-add-row', block).show();
|
||||
return false;
|
||||
}
|
||||
})
|
||||
// Handle field and operator selection
|
||||
.on('change', 'select[id^=mapper][id$="_1"], select[id^=operator]', handleUserInputField)
|
||||
// Handle option selection - update hidden value field
|
||||
.on('change', '.crm-search-value select', function() {
|
||||
var value = $(this).val() || '';
|
||||
if ($(this).attr('multiple') == 'multiple' && value.length) {
|
||||
value = value.join(',');
|
||||
}
|
||||
$(this).siblings('input').val(value);
|
||||
})
|
||||
.on('crmLoad', function() {
|
||||
initialize();
|
||||
$('select[id^=mapper][id$="_1"]', '#Builder').each(handleUserInputField);
|
||||
});
|
||||
|
||||
initialize();
|
||||
|
||||
// Fetch initial options during page refresh - it's more efficient to bundle them in a single ajax request
|
||||
var initialFields = {}, fetchFields = false;
|
||||
$('select[id^=mapper][id$="_1"] option:selected', '#Builder').each(function() {
|
||||
var field = $(this).attr('value');
|
||||
if (typeof(CRM.searchBuilder.fieldOptions[field]) == 'string') {
|
||||
initialFields[field] = [CRM.searchBuilder.fieldOptions[field], 'getoptions', {field: field, sequential: 1}];
|
||||
fetchFields = true;
|
||||
}
|
||||
});
|
||||
if (fetchFields) {
|
||||
CRM.api3(initialFields).done(function(data) {
|
||||
$.each(data, function(field, result) {
|
||||
CRM.searchBuilder.fieldOptions[field] = result.values;
|
||||
});
|
||||
$('select[id^=mapper][id$="_1"]', '#Builder').each(handleUserInputField);
|
||||
});
|
||||
} else {
|
||||
$('select[id^=mapper][id$="_1"]', '#Builder').each(handleUserInputField);
|
||||
}
|
||||
});
|
||||
})(cj, CRM);
|
|
@ -0,0 +1,72 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{* Search Builder *}
|
||||
|
||||
<div class="crm-form-block crm-search-form-block">
|
||||
<div class="crm-accordion-wrapper crm-search_builder-accordion {if $rows and !$showSearchForm}collapsed{/if}">
|
||||
<div class="crm-accordion-header crm-master-accordion-header">
|
||||
{ts}Search Criteria{/ts} {help id='builder-intro'}
|
||||
</div>
|
||||
<div class="crm-accordion-body">
|
||||
<div id="searchForm">
|
||||
{* Table for adding search criteria. *}
|
||||
{include file="CRM/Contact/Form/Search/table.tpl"}
|
||||
<div class="clear"></div>
|
||||
<div id="crm-submit-buttons">
|
||||
{$form.buttons.html}
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- /.crm-accordion-body -->
|
||||
</div><!-- /.crm-accordion-wrapper -->
|
||||
</div><!-- /.crm-form-block -->
|
||||
{if $rowsEmpty || $rows}
|
||||
<div class="crm-content-block">
|
||||
{if $rowsEmpty}
|
||||
<div class="crm-results-block crm-results-block-empty">
|
||||
{include file="CRM/Contact/Form/Search/EmptyResults.tpl"}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if $rows}
|
||||
<div class="crm-results-block">
|
||||
{* This section handles form elements for action task select and submit *}
|
||||
<div class="crm-search-tasks">
|
||||
{include file="CRM/Contact/Form/Search/ResultTasks.tpl"}
|
||||
</div>
|
||||
|
||||
{* This section displays the rows along and includes the paging controls *}
|
||||
<div class="crm-search-results">
|
||||
{include file="CRM/Contact/Form/Selector.tpl"}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
{* END Actions/Results section *}
|
||||
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
{$initHideBoxes}
|
||||
{include file="CRM/Form/validate.tpl"}
|
|
@ -0,0 +1,30 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 id="activity" class="form-item">
|
||||
<table class="form-layout">
|
||||
{include file="CRM/Activity/Form/Search/Common.tpl"}
|
||||
</table>
|
||||
</div>
|
|
@ -0,0 +1,192 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
<table class="form-layout">
|
||||
<tr>
|
||||
<td><label>{ts}Complete OR Partial Name{/ts}</label><br />
|
||||
{$form.sort_name.html}
|
||||
</td>
|
||||
<td>
|
||||
<label>{ts}Complete OR Partial Email{/ts}</label><br />
|
||||
{$form.email.html}
|
||||
</td>
|
||||
{if $form.contact_type}
|
||||
<td><label>{ts}Contact Type(s){/ts}</label><br />
|
||||
{$form.contact_type.html}
|
||||
</td>
|
||||
{else}
|
||||
<td> </td>
|
||||
{/if}
|
||||
</tr>
|
||||
<tr>
|
||||
{if $form.group}
|
||||
<td>
|
||||
<div id='groupselect'><label>{ts}Group(s){/ts} <span class="description">(<a href="#" id='searchbygrouptype'>{ts}search by group type{/ts}</a>)</span></label>
|
||||
<br />
|
||||
{$form.group.html}
|
||||
</div>
|
||||
<div id='grouptypeselect'>
|
||||
<label>{ts}Group Type(s){/ts} <span class="description"> (<a href="#" id='searchbygroup'>{ts}search by group{/ts}</a>)</span></label>
|
||||
<br />
|
||||
{$form.group_type.html}
|
||||
{literal}
|
||||
<script type="text/javascript">
|
||||
CRM.$(function($) {
|
||||
function showGroupSearch() {
|
||||
$('#grouptypeselect').hide();
|
||||
$('#groupselect').show();
|
||||
$('#group_type').select2('val', '');
|
||||
return false;
|
||||
}
|
||||
function showGroupTypeSearch() {
|
||||
$('#groupselect').hide();
|
||||
$('#grouptypeselect').show();
|
||||
$('#group').select2('val', '');
|
||||
return false;
|
||||
}
|
||||
$('#searchbygrouptype').click(showGroupTypeSearch);
|
||||
$('#searchbygroup').click(showGroupSearch);
|
||||
|
||||
if ($('#group_type').val() ) {
|
||||
showGroupTypeSearch();
|
||||
}
|
||||
else {
|
||||
showGroupSearch();
|
||||
}
|
||||
|
||||
});
|
||||
</script>
|
||||
{/literal}
|
||||
</div>
|
||||
</td>
|
||||
{else}
|
||||
<td> </td>
|
||||
{/if}
|
||||
{if $form.contact_tags}
|
||||
<td><label>{ts}Select Tag(s){/ts}</label>
|
||||
{$form.contact_tags.html}
|
||||
</td>
|
||||
{else}
|
||||
<td> </td>
|
||||
{/if}
|
||||
{if $isTagset}
|
||||
<td colspan="2">{include file="CRM/common/Tagset.tpl"}</td>
|
||||
{/if}
|
||||
<td>{$form.tag_search.label} {help id="id-all-tags"}<br />{$form.tag_search.html}</td>
|
||||
{if ! $isTagset}
|
||||
<td colspan="2"> </td>
|
||||
{/if}
|
||||
<td> </td>
|
||||
</tr>
|
||||
{if $form.all_tag_types}
|
||||
<tr>
|
||||
<td colspan="5">
|
||||
{$form.all_tag_types.html} {$form.all_tag_types.label} {help id="id-all-tag-types"}
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
<tr>
|
||||
<td>
|
||||
<div>
|
||||
{$form.phone_numeric.label}<br />{$form.phone_numeric.html}
|
||||
</div>
|
||||
<div class="description font-italic">
|
||||
{ts}Punctuation and spaces are ignored.{/ts}
|
||||
</div>
|
||||
</td>
|
||||
<td>{$form.phone_location_type_id.label}<br />{$form.phone_location_type_id.html}</td>
|
||||
<td>{$form.phone_phone_type_id.label}<br />{$form.phone_phone_type_id.html}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<table class="form-layout-compressed">
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
{$form.privacy_toggle.html} {help id="id-privacy"}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{$form.privacy_options.html}
|
||||
</td>
|
||||
<td style="vertical-align:middle">
|
||||
<div id="privacy-operator-wrapper">{$form.privacy_operator.html} {help id="privacy-operator"}</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
{literal}
|
||||
<script type="text/javascript">
|
||||
cj("select#privacy_options").change(function() {
|
||||
if (cj(this).val() && cj(this).val().length > 1) {
|
||||
cj('#privacy-operator-wrapper').show();
|
||||
} else {
|
||||
cj('#privacy-operator-wrapper').hide();
|
||||
}
|
||||
}).change();
|
||||
</script>
|
||||
{/literal}
|
||||
</td>
|
||||
<td colspan="3">
|
||||
{$form.preferred_communication_method.label}<br />
|
||||
{$form.preferred_communication_method.html}<br />
|
||||
<div class="spacer"></div>
|
||||
{$form.email_on_hold.html} {$form.email_on_hold.label}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{$form.contact_source.label} {help id="id-source" file="CRM/Contact/Form/Contact"}<br />
|
||||
{$form.contact_source.html}
|
||||
</td>
|
||||
<td>
|
||||
{$form.job_title.label}<br />
|
||||
{$form.job_title.html}
|
||||
</td>
|
||||
<td colspan="3">
|
||||
{$form.preferred_language.label}<br />
|
||||
{$form.preferred_language.html}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{$form.contact_id.label} {help id="id-internal-id" file="CRM/Contact/Form/Contact"}<br />
|
||||
{$form.contact_id.html}
|
||||
</td>
|
||||
<td>
|
||||
{$form.external_identifier.label} {help id="id-external-id" file="CRM/Contact/Form/Contact"}<br />
|
||||
{$form.external_identifier.html}
|
||||
</td>
|
||||
<td>
|
||||
{if $form.uf_user}
|
||||
{$form.uf_user.label} {$form.uf_user.html}
|
||||
<div class="description font-italic">
|
||||
{ts 1=$config->userFramework}Does the contact have a %1 Account?{/ts}
|
||||
</div>
|
||||
{else}
|
||||
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
|
@ -0,0 +1,74 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 id="changelog" class="form-item">
|
||||
<table class="form-layout">
|
||||
<tr>
|
||||
<td>
|
||||
<span class="modifiedBy"><label>{ts}Modified By{/ts}</label></span>
|
||||
<span class="hiddenElement addedBy"><label>{ts}Added By{/ts}</label></span>
|
||||
<br/>
|
||||
{$form.changed_by.html}
|
||||
</td>
|
||||
<td width="100%">
|
||||
{$form.log_date.html}
|
||||
<br/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<span class="modifiedBy"><label>{ts}Modified Between{/ts}</label></span>
|
||||
<span class="hiddenElement addedBy"><label>{ts}Added Between{/ts}</label></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
{include file="CRM/Core/DateRange.tpl" fieldName="log_date" from='_low' to='_high'}
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
{literal}
|
||||
<script type="text/javascript">
|
||||
CRM.$(function($) {
|
||||
function updateChangeLogLabels() {
|
||||
var changeType = $('input[name=log_date]:checked').val();
|
||||
if (changeType == 2) {
|
||||
$('.addedBy').hide();
|
||||
$('.modifiedBy').show();
|
||||
}
|
||||
else {
|
||||
if (changeType == 1) {
|
||||
$('.addedBy').show();
|
||||
$('.modifiedBy').hide();
|
||||
}
|
||||
}
|
||||
}
|
||||
$('[name=log_date]:input').change(updateChangeLogLabels);
|
||||
updateChangeLogLabels();
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
{/literal}
|
|
@ -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/Custom/Form/Search.tpl" showHideLinks=false}
|
|
@ -0,0 +1,66 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 id="demographics" class="form-item">
|
||||
<table class="form-layout">
|
||||
<tr>
|
||||
<td>
|
||||
<label>{ts}Birth Dates{/ts}</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
{include file="CRM/Core/DateRange.tpl" fieldName="birth_date" from='_low' to='_high'}
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<label>{ts}Age{/ts}</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
{include file="CRM/Core/AgeRange.tpl" fieldName="age" from='_low' to='_high' date='_asof_date'}
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{$form.is_deceased.label}<br />
|
||||
{$form.is_deceased.html}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<label>{ts}Deceased Dates{/ts}</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
{include file="CRM/Core/DateRange.tpl" fieldName="deceased_date" from='_low' to='_high'}
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{$form.gender_id.label}<br />
|
||||
{$form.gender_id.html}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
<div id="display-settings" class="form-item">
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
{if $form.component_mode}
|
||||
{$form.component_mode.label} {help id="id-display-results"}
|
||||
<br />
|
||||
{$form.component_mode.html}
|
||||
{if $form.display_relationship_type}
|
||||
<div id="crm-display_relationship_type">{$form.display_relationship_type.html}</div>
|
||||
{/if}
|
||||
{else}
|
||||
|
||||
{/if}
|
||||
</td>
|
||||
<td>
|
||||
{$form.uf_group_id.label} {help id="id-search-views"}<br />{$form.uf_group_id.html}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
|
@ -0,0 +1,30 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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="location_type"}
|
||||
<p>{ts}Location search uses the PRIMARY location for each contact by default.{/ts}</p>
|
||||
<p>{ts}To search by specific location types (e.g. Home, Work...), select one or more options.{/ts}</p>
|
||||
{/htxt}
|
|
@ -0,0 +1,172 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 id="location" class="form-item">
|
||||
<table class="form-layout">
|
||||
<tr>
|
||||
<td>
|
||||
<div id="streetAddress" class="crm-field-wrapper">
|
||||
{$form.street_address.label}<br />
|
||||
{$form.street_address.html|crmAddClass:big}
|
||||
{if $parseStreetAddress}
|
||||
<div>
|
||||
<a href="#" title="{ts}Use Address Elements{/ts}" rel="addressElements" class="address-elements-toggle">{ts}Use Address Elements{/ts}</a>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
{if $parseStreetAddress}
|
||||
<div id="addressElements" class="crm-field-wrapper" style="display: none;">
|
||||
<table class="crm-block crm-form-block advanced-search-address-elements">
|
||||
<tr><td>{$form.street_number.label}<br />{$form.street_number.html}<br /><span class="description nowrap">{ts}or ODD / EVEN{/ts}</td>
|
||||
<td>{$form.street_name.label}<br />{$form.street_name.html}</td>
|
||||
<td>{$form.street_unit.label}<br />{$form.street_unit.html|crmAddClass:four}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3"><a href="#" title="{ts}Use Complete Address{/ts}" rel="streetAddress" class="address-elements-toggle">{ts}Use Street Address{/ts}</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
{/if}
|
||||
<div class="crm-field-wrapper">
|
||||
{$form.supplemental_address_1.label}<br />
|
||||
{$form.supplemental_address_1.html}
|
||||
</div>
|
||||
<div class="crm-field-wrapper">
|
||||
{$form.supplemental_address_2.label}<br />
|
||||
{$form.supplemental_address_2.html}
|
||||
</div>
|
||||
<div class="crm-field-wrapper">
|
||||
{$form.supplemental_address_3.label}<br />
|
||||
{$form.supplemental_address_3.html}
|
||||
</div>
|
||||
<div class="crm-field-wrapper">
|
||||
{$form.city.label}<br />
|
||||
{$form.city.html}
|
||||
</div>
|
||||
<div class="crm-field-wrapper">
|
||||
{$form.country.label}<br />
|
||||
{$form.country.html}
|
||||
</div>
|
||||
<div class="crm-field-wrapper">
|
||||
{$form.state_province.label}<br />
|
||||
{$form.state_province.html}
|
||||
</div>
|
||||
<div class="crm-field-wrapper">
|
||||
{$form.county.label}<br />
|
||||
{$form.county.html}
|
||||
</div>
|
||||
<div class="crm-field-wrapper">
|
||||
{$form.world_region.label}<br />
|
||||
{$form.world_region.html}
|
||||
</div>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<div class="crm-field-wrapper">
|
||||
<div>{$form.location_type.label} {help id="location_type" title=$form.location_type.label}</div>
|
||||
{$form.location_type.html}
|
||||
</div>
|
||||
{if $form.address_name.html}
|
||||
<div class="crm-field-wrapper">
|
||||
{$form.address_name.label}<br />
|
||||
{$form.address_name.html}
|
||||
</div>
|
||||
{/if}
|
||||
{if $form.postal_code.html}
|
||||
<div class="crm-field-wrapper">
|
||||
{$form.postal_code.label}
|
||||
<input type="checkbox" id="postal-code-range-toggle" value="1"/>
|
||||
<label for="postal-code-range-toggle">{ts}Range{/ts}</label><br />
|
||||
<div class="postal_code-wrapper">
|
||||
{$form.postal_code.html}
|
||||
</div>
|
||||
<div class="postal_code_range-wrapper" style="display: none;">
|
||||
{$form.postal_code_low.html} - {$form.postal_code_high.html}
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
{literal}
|
||||
CRM.$(function($) {
|
||||
$('#postal-code-range-toggle').change(function() {
|
||||
if ($(this).is(':checked')) {
|
||||
$('.postal_code_range-wrapper').show();
|
||||
$('.postal_code-wrapper').hide().find('input').val('');
|
||||
} else {
|
||||
$('.postal_code-wrapper').show();
|
||||
$('.postal_code_range-wrapper').hide().find('input').val('');
|
||||
}
|
||||
});
|
||||
if ($('#postal_code_low').val() || $('#postal_code_high').val()) {
|
||||
$('#postal-code-range-toggle').prop('checked', true).change();
|
||||
}
|
||||
});
|
||||
{/literal}
|
||||
</script>
|
||||
{/if}
|
||||
{if $form.prox_distance.html}
|
||||
<div class="crm-field-wrapper">
|
||||
{$form.prox_distance.label}<br />
|
||||
{$form.prox_distance.html} {$form.prox_distance_unit.html}
|
||||
</div>
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
{if $addressGroupTree}
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
{include file="CRM/Custom/Form/Search.tpl" groupTree=$addressGroupTree showHideLinks=false}
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
</table>
|
||||
</div>
|
||||
|
||||
{if $parseStreetAddress}
|
||||
{literal}
|
||||
<script type="text/javascript">
|
||||
CRM.$(function($) {
|
||||
function processAddressFields(name) {
|
||||
$('#' + name).show();
|
||||
if (name == 'addressElements') {
|
||||
$('#streetAddress').hide().find('input').val('');
|
||||
} else {
|
||||
$('#addressElements').hide().find('input').val('');
|
||||
}
|
||||
|
||||
}
|
||||
$("a.address-elements-toggle").click(function(e) {
|
||||
e.preventDefault();
|
||||
processAddressFields(this.rel);
|
||||
});
|
||||
if ($('#street_name').val() || $('#street_unit').val() || $('#street_number').val()) {
|
||||
processAddressFields('addressElements');
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
</script>
|
||||
{/literal}
|
||||
{/if}
|
|
@ -0,0 +1,39 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 id="notes-search" class="form-item">
|
||||
<table class="form-layout">
|
||||
<tr>
|
||||
<td>
|
||||
{$form.note.label}<br />
|
||||
{$form.note.html}
|
||||
</td>
|
||||
<td>
|
||||
{$form.note_option.label}<br />
|
||||
{$form.note_option.html}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
|
@ -0,0 +1,82 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 id="relationship" class="form-item">
|
||||
<table class="form-layout">
|
||||
<tr>
|
||||
<td>
|
||||
{$form.relation_type_id.label}<br />
|
||||
{$form.relation_type_id.html}
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
{$form.relation_target_name.label}<br />
|
||||
{$form.relation_target_name.html|crmAddClass:huge}
|
||||
<div class="description font-italic">
|
||||
{ts}Complete OR partial contact name.{/ts}
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{$form.relation_status.label}<br />
|
||||
{$form.relation_status.html}
|
||||
</p>
|
||||
{$form.relation_permission.label}<br />
|
||||
{$form.relation_permission.html}
|
||||
</td>
|
||||
<td>
|
||||
{$form.relation_target_group.label} {help id="id-relationship-target-group" file="CRM/Contact/Form/Search/Advanced.hlp"}<br />
|
||||
{$form.relation_target_group.html|crmAddClass:huge}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2"><label>{ts}Start Date{/ts}</label></td>
|
||||
</tr>
|
||||
<tr>
|
||||
{include file="CRM/Core/DateRange.tpl" fieldName="relation_start_date" from='_low' to='_high'}
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2"><label>{ts}End Date{/ts}</label></td>
|
||||
</tr>
|
||||
<tr>
|
||||
{include file="CRM/Core/DateRange.tpl" fieldName="relation_end_date" from='_low' to='_high'}
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2"><label>{ts}Active Period{/ts}</label> {help id="id-relationship-active-period" file="CRM/Contact/Form/Search/Advanced.hlp"}<br /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
{include file="CRM/Core/DateRange.tpl" fieldName="relation_active_period_date" from='_low' to='_high'}
|
||||
</tr>
|
||||
{if $relationshipGroupTree}
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
{include file="CRM/Custom/Form/Search.tpl" groupTree=$relationshipGroupTree showHideLinks=false}
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
</table>
|
||||
</div>
|
|
@ -0,0 +1,21 @@
|
|||
<div id="search-settings" class="form-item">
|
||||
<table>
|
||||
<tr>
|
||||
<td>{$form.operator.label} {help id="id-search-operator"}<br />{$form.operator.html}</td>
|
||||
<td>
|
||||
{if $form.deleted_contacts}{$form.deleted_contacts.html} {$form.deleted_contacts.label}{/if}
|
||||
</td>
|
||||
<td class="adv-search-top-submit" colspan="2">
|
||||
<div class="crm-submit-buttons">
|
||||
{include file="CRM/common/formButtons.tpl" location="top"}
|
||||
</div>
|
||||
<div class="crm-submit-buttons reset-advanced-search">
|
||||
<a href="{crmURL p='civicrm/contact/search/advanced' q='reset=1'}" id="resetAdvancedSearch" class="crm-hover-button css_right" title="{ts}Clear all search criteria{/ts}">
|
||||
<i class="crm-i fa-undo"></i>
|
||||
{ts}Reset Form{/ts}
|
||||
</a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
|
@ -0,0 +1,45 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 $showTask}
|
||||
<div id="task_block" class="form-item">
|
||||
<table class="form-layout">
|
||||
<tr>
|
||||
<td class="label">
|
||||
{$form.task_id.label}
|
||||
</td>
|
||||
<td>
|
||||
{$form.task_id.html}
|
||||
</td>
|
||||
<td class="label">
|
||||
{$form.task_status_id.label}
|
||||
</td>
|
||||
<td>
|
||||
{$form.task_status_id.html}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
{/if}
|
|
@ -0,0 +1,130 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{* Default template custom searches. This template is used automatically if templateFile() function not defined in
|
||||
custom search .php file. If you want a different layout, clone and customize this file and point to new file using
|
||||
templateFile() function.*}
|
||||
<div class="crm-block crm-form-block crm-contact-custom-search-form-block">
|
||||
<div class="crm-accordion-wrapper crm-custom_search_form-accordion {if $rows}collapsed{/if}">
|
||||
<div class="crm-accordion-header crm-master-accordion-header">
|
||||
{ts}Edit Search Criteria{/ts}
|
||||
</div><!-- /.crm-accordion-header -->
|
||||
<div class="crm-accordion-body">
|
||||
<div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
|
||||
<table class="form-layout-compressed">
|
||||
{* Loop through all defined search criteria fields (defined in the buildForm() function). *}
|
||||
{foreach from=$elements item=element}
|
||||
<tr class="crm-contact-custom-search-form-row-{$element}">
|
||||
<td class="label">{$form.$element.label}</td>
|
||||
{if $element|strstr:'_date'}
|
||||
<td>{include file="CRM/common/jcalendar.tpl" elementName=$element}</td>
|
||||
{else}
|
||||
<td>{$form.$element.html}</td>
|
||||
{/if}
|
||||
</tr>
|
||||
{/foreach}
|
||||
</table>
|
||||
<div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="bottom"}</div>
|
||||
</div><!-- /.crm-accordion-body -->
|
||||
</div><!-- /.crm-accordion-wrapper -->
|
||||
</div><!-- /.crm-form-block -->
|
||||
|
||||
{if $rowsEmpty || $rows}
|
||||
<div class="crm-content-block">
|
||||
{if $rowsEmpty}
|
||||
{include file="CRM/Contact/Form/Search/Custom/EmptyResults.tpl"}
|
||||
{/if}
|
||||
|
||||
{if $summary}
|
||||
{$summary.summary}: {$summary.total}
|
||||
{/if}
|
||||
|
||||
{if $rows}
|
||||
<div class="crm-results-block">
|
||||
{* Search request has returned 1 or more matching rows. Display results and collapse the search criteria fieldset. *}
|
||||
{* This section handles form elements for action task select and submit *}
|
||||
<div class="crm-search-tasks">
|
||||
{include file="CRM/Contact/Form/Search/ResultTasks.tpl"}
|
||||
</div>
|
||||
{* This section displays the rows along and includes the paging controls *}
|
||||
<div class="crm-search-results">
|
||||
|
||||
{include file="CRM/common/pager.tpl" location="top"}
|
||||
|
||||
{* Include alpha pager if defined. *}
|
||||
{if $atoZ}
|
||||
{include file="CRM/common/pagerAToZ.tpl"}
|
||||
{/if}
|
||||
|
||||
{strip}
|
||||
<table class="selector row-highlight" summary="{ts}Search results listings.{/ts}">
|
||||
<thead class="sticky">
|
||||
<tr>
|
||||
<th scope="col" title="Select All Rows">{$form.toggleSelect.html}</th>
|
||||
{foreach from=$columnHeaders item=header}
|
||||
<th scope="col">
|
||||
{if $header.sort}
|
||||
{assign var='key' value=$header.sort}
|
||||
{$sort->_response.$key.link}
|
||||
{else}
|
||||
{$header.name}
|
||||
{/if}
|
||||
</th>
|
||||
{/foreach}
|
||||
<th> </th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
{counter start=0 skip=1 print=false}
|
||||
{foreach from=$rows item=row}
|
||||
<tr id='rowid{$row.contact_id}' class="{cycle values="odd-row,even-row"}">
|
||||
{assign var=cbName value=$row.checkbox}
|
||||
<td>{$form.$cbName.html}</td>
|
||||
{foreach from=$columnHeaders item=header}
|
||||
{assign var=fName value=$header.sort}
|
||||
{if $fName eq 'sort_name'}
|
||||
<td><a href="{crmURL p='civicrm/contact/view' q="reset=1&cid=`$row.contact_id`&key=`$qfKey`&context=custom"}">{$row.sort_name}</a></td>
|
||||
{else}
|
||||
<td>{$row.$fName}</td>
|
||||
{/if}
|
||||
{/foreach}
|
||||
<td>{$row.action}</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</table>
|
||||
{/strip}
|
||||
|
||||
{include file="CRM/common/pager.tpl" location="bottom"}
|
||||
|
||||
</p>
|
||||
{* END Actions/Results section *}
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
{/if}
|
|
@ -0,0 +1,140 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{* Template for "Sample" custom search component. *}
|
||||
<div class="crm-form-block crm-search-form-block">
|
||||
<div class="crm-accordion-wrapper crm-activity_search-accordion {if $rows}collapsed{/if}">
|
||||
<div class="crm-accordion-header crm-master-accordion-header">
|
||||
{ts}Edit Search Criteria{/ts}
|
||||
</div><!-- /.crm-accordion-header -->
|
||||
<div class="crm-accordion-body">
|
||||
<div id="searchForm" class="crm-block crm-form-block crm-contact-custom-search-activity-search-form-block">
|
||||
<div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
|
||||
<table class="form-layout-compressed">
|
||||
{* Loop through all defined search criteria fields (defined in the buildForm() function). *}
|
||||
{foreach from=$elements item=element}
|
||||
<tr class="crm-contact-custom-search-activity-search-form-block-{$element}">
|
||||
<td class="label">{$form.$element.label}</td>
|
||||
<td>
|
||||
{if $element eq 'start_date' OR $element eq 'end_date'}
|
||||
{include file="CRM/common/jcalendar.tpl" elementName=$element}
|
||||
{else}
|
||||
{$form.$element.html}
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</table>
|
||||
<div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="bottom"}</div>
|
||||
</div>
|
||||
</div><!-- /.crm-accordion-body -->
|
||||
</div><!-- /.crm-accordion-wrapper -->
|
||||
</div><!-- /.crm-form-block -->
|
||||
|
||||
{if $rowsEmpty || $rows}
|
||||
|
||||
<div class="crm-content-block">
|
||||
{if $rowsEmpty}
|
||||
<div class="crm-results-block crm-results-block-empty">
|
||||
{include file="CRM/Contact/Form/Search/Custom/EmptyResults.tpl"}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if $rows}
|
||||
<div class="crm-results-block">
|
||||
{* Search request has returned 1 or more matching rows. Display results and collapse the search criteria fieldset. *}
|
||||
|
||||
{* This section handles form elements for action task select and submit *}
|
||||
<div class="crm-search-tasks">
|
||||
{include file="CRM/Contact/Form/Search/ResultTasks.tpl"}
|
||||
</div>
|
||||
{* This section displays the rows along and includes the paging controls *}
|
||||
<div class="crm-search-results">
|
||||
|
||||
{include file="CRM/common/pager.tpl" location="top"}
|
||||
|
||||
{include file="CRM/common/pagerAToZ.tpl"}
|
||||
|
||||
{strip}
|
||||
<table summary="{ts}Search results listings.{/ts}">
|
||||
<thead class="sticky">
|
||||
<th scope="col" title="Select All Rows">{$form.toggleSelect.html}</th>
|
||||
{foreach from=$columnHeaders item=header}
|
||||
{if ($header.sort eq 'activity_id') or ($header.sort eq 'activity_type_id') or ($header.sort eq 'case_id') }
|
||||
{elseif ($header.sort eq 'sort_name') or ($header.sort eq 'activity_status') or ($header.sort eq 'activity_type') or ($header.sort eq 'activity_subject') or ($header.sort eq 'source_contact') or ($header.SORT eq 'activity_date') or ($header.name eq null) }
|
||||
<th scope="col">
|
||||
{if $header.sort}
|
||||
{assign var='key' value=$header.sort}
|
||||
{$sort->_response.$key.link}
|
||||
{else}
|
||||
{$header.name}
|
||||
{/if}
|
||||
</th>
|
||||
{/if}
|
||||
</th>
|
||||
{/foreach}
|
||||
<th> </th>
|
||||
</thead>
|
||||
|
||||
{counter start=0 skip=1 print=false}
|
||||
{foreach from=$rows item=row}
|
||||
<tr id='rowid{counter}' class="{cycle values="odd-row,even-row"}">
|
||||
{assign var=cbName value=$row.checkbox}
|
||||
<td>{$form.$cbName.html}</td>
|
||||
{foreach from=$columnHeaders item=header}
|
||||
{if ($header.sort eq 'sort_name') or ($header.sort eq 'activity_status') or ($header.sort eq 'activity_type') or ($header.sort eq 'activity_subject') or ($header.sort eq 'source_contact') or ($header.SORT eq 'activity_date') or ($header.name eq null) }
|
||||
{assign var=fName value=$header.sort}
|
||||
{if $fName eq 'sort_name'}
|
||||
<td><a href="{crmURL p='civicrm/contact/view' q="reset=1&cid=`$row.contact_id`&key=`$qfKey`"}">{$row.sort_name}</a></td>
|
||||
{elseif $fName eq 'activity_subject'}
|
||||
<td>
|
||||
{if $row.case_id }
|
||||
<a href="{crmURL p='civicrm/case/activity/view' q="reset=1&aid=`$row.activity_id`&cid=`$row.contact_id`&caseID=`$row.case_id`"}" title="{ts}View activity details{/ts}">
|
||||
{else}
|
||||
<a href="{crmURL p='civicrm/contact/view/activity' q="atype=`$row.activity_type_id`&action=view&reset=1&id=`$row.activity_id`&cid=`$row.contact_id`"}" title="{ts}View activity details{/ts}">
|
||||
{/if}
|
||||
{if isset($row.activity_subject) AND $row.activity_subject NEQ 'NULL'}{$row.activity_subject}{else}{ts}(no subject){/ts}{/if}</a>
|
||||
</td>
|
||||
{elseif ($fName eq 'activity_id') or ($fName eq 'activity_type_id') or ($fName eq 'case_id')}
|
||||
{else}
|
||||
<td>{$row.$fName}</td>
|
||||
{/if}
|
||||
{/if}
|
||||
{/foreach}
|
||||
<td>{$row.action}</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</table>
|
||||
{/strip}
|
||||
|
||||
{include file="CRM/common/pager.tpl" location="bottom"}
|
||||
|
||||
|
||||
</div>
|
||||
{* END Actions/Results section *}
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
|
@ -0,0 +1,151 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{* Default template custom searches. This template is used automatically if templateFile() function not defined in
|
||||
custom search .php file. If you want a different layout, clone and customize this file and point to new file using
|
||||
templateFile() function.*}
|
||||
<div class="crm-block crm-form-block crm-contact-custom-search-form-block">
|
||||
<div class="crm-accordion-wrapper crm-custom_search_form-accordion {if $rows}collapsed{/if}">
|
||||
<div class="crm-accordion-header crm-master-accordion-header">
|
||||
{ts}Edit Search Criteria{/ts}
|
||||
</div><!-- /.crm-accordion-header -->
|
||||
<div class="crm-accordion-body">
|
||||
<div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
|
||||
<table class="form-layout-compressed">
|
||||
<tr class="crm-contact-custom-search-contribSYBNT-form-block-min_amount_1">
|
||||
<td><label>{ts}Amount One: Min/Max{/ts}</label></td>
|
||||
<td>{$form.min_amount_1.html}</td>
|
||||
<td>{$form.max_amount_1.html}</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr class="crm-contact-custom-search-contribSYBNT-form-block-inclusion_date_one">
|
||||
<td><label>Inclusion Date One: Start/End</label></td>
|
||||
<td>{$form.start_date_1.html}</td>
|
||||
<td>{$form.end_date_1.html}</td>
|
||||
<td>{$form.is_first_amount.html} {ts}First time donor only?{/ts}</td>
|
||||
</tr>
|
||||
<tr class="crm-contact-custom-search-contribSYBNT-form-block-min_amount_2">
|
||||
<td><label>{ts}Amount Two: Min/Max{/ts}</label></td>
|
||||
<td>{$form.min_amount_2.html}</td>
|
||||
<td>{$form.max_amount_2.html}</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr class="crm-contact-custom-search-contribSYBNT-form-block-inclusion_date_two">
|
||||
<td><label>Inclusion Date Two: Start/End</label></td>
|
||||
<td>{$form.start_date_2.html}</td>
|
||||
<td>{$form.end_date_2.html}</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr class="crm-contact-custom-search-contribSYBNT-form-block-exclude_min_amount">
|
||||
<td><label>Exclusion Amount: Min/Max</label></td>
|
||||
<td>{$form.exclude_min_amount.html}</td>
|
||||
<td>{$form.exclude_max_amount.html}</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr class="crm-contact-custom-search-contribSYBNT-form-block-exclusion_date">
|
||||
<td><label>Exclusion Date: Start/End</label></td>
|
||||
<td>{$form.exclude_start_date.html}</td>
|
||||
<td>{$form.exclude_end_date.html}</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="bottom"}</div>
|
||||
</div><!-- /.crm-accordion-body -->
|
||||
</div><!-- /.crm-accordion-wrapper -->
|
||||
</div><!-- /.crm-form-block -->
|
||||
|
||||
{if $rowsEmpty || $rows}
|
||||
<div class="crm-content-block">
|
||||
{if $rowsEmpty}
|
||||
{include file="CRM/Contact/Form/Search/Custom/EmptyResults.tpl"}
|
||||
{/if}
|
||||
|
||||
{if $summary}
|
||||
{$summary.summary}: {$summary.total}
|
||||
{/if}
|
||||
|
||||
{if $rows}
|
||||
<div class="crm-results-block">
|
||||
{* Search request has returned 1 or more matching rows. Display results and collapse the search criteria fieldset. *}
|
||||
{* This section handles form elements for action task select and submit *}
|
||||
<div class="crm-search-tasks">
|
||||
{include file="CRM/Contact/Form/Search/ResultTasks.tpl"}
|
||||
</div>
|
||||
{* This section displays the rows along and includes the paging controls *}
|
||||
<div class="crm-search-results">
|
||||
|
||||
{include file="CRM/common/pager.tpl" location="top"}
|
||||
|
||||
{* Include alpha pager if defined. *}
|
||||
{if $atoZ}
|
||||
{include file="CRM/common/pagerAToZ.tpl"}
|
||||
{/if}
|
||||
|
||||
{strip}
|
||||
<table class="selector row-highlight" summary="{ts}Search results listings.{/ts}">
|
||||
<thead class="sticky">
|
||||
<th scope="col" title="Select All Rows">{$form.toggleSelect.html}</th>
|
||||
{foreach from=$columnHeaders item=header}
|
||||
<th scope="col">
|
||||
{if $header.sort}
|
||||
{assign var='key' value=$header.sort}
|
||||
{$sort->_response.$key.link}
|
||||
{else}
|
||||
{$header.name}
|
||||
{/if}
|
||||
</th>
|
||||
{/foreach}
|
||||
<th> </th>
|
||||
</thead>
|
||||
|
||||
{counter start=0 skip=1 print=false}
|
||||
{foreach from=$rows item=row}
|
||||
<tr id='rowid{$row.contact_id}' class="{cycle values="odd-row,even-row"}">
|
||||
{assign var=cbName value=$row.checkbox}
|
||||
<td>{$form.$cbName.html}</td>
|
||||
{foreach from=$columnHeaders item=header}
|
||||
{assign var=fName value=$header.sort}
|
||||
{if $fName eq 'sort_name'}
|
||||
<td><a href="{crmURL p='civicrm/contact/view' q="reset=1&cid=`$row.contact_id`&key=`$qfKey`"}">{$row.sort_name}</a></td>
|
||||
{else}
|
||||
<td>{$row.$fName}</td>
|
||||
{/if}
|
||||
{/foreach}
|
||||
<td>{$row.action}</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</table>
|
||||
{/strip}
|
||||
|
||||
{include file="CRM/common/pager.tpl" location="bottom"}
|
||||
|
||||
</p>
|
||||
{* END Actions/Results section *}
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
</div>
|
||||
{/if}
|
|
@ -0,0 +1,132 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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-contact-custom-search-form-block">
|
||||
<div class="crm-accordion-wrapper crm-custom_search_form-accordion {if $rows}collapsed{/if}">
|
||||
<div class="crm-accordion-header crm-master-accordion-header">
|
||||
{ts}Edit Search Criteria{/ts}
|
||||
</div><!-- /.crm-accordion-header -->
|
||||
<div class="crm-accordion-body">
|
||||
<div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
|
||||
<table class="form-layout-compressed">
|
||||
{* Loop through all defined search criteria fields (defined in the buildForm() function). *}
|
||||
{foreach from=$elements item=element}
|
||||
<tr class="crm-contact-custom-search-form-row-{$element}">
|
||||
<td class="label">{$form.$element.label}</td>
|
||||
<td>{$form.$element.html}</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
<tr class="crm-contact-custom-search-contributionDetails-form-block-receive_date">
|
||||
<td class="label">{ts}Contribution Dates{/ts}</td>
|
||||
{include file="CRM/Core/DateRange.tpl" fieldName="contribution_date" from='_low' to='_high'}
|
||||
</tr>
|
||||
<tr class="crm-contact-custom-search-contributionDetails-form-block-financial_type">
|
||||
<td class="label">{ts}Financial Type{/ts}</td>
|
||||
<td>{$form.financial_type_id.html|crmAddClass:twenty}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="bottom"}</div>
|
||||
</div><!-- /.crm-accordion-body -->
|
||||
</div><!-- /.crm-accordion-wrapper -->
|
||||
</div><!-- /.crm-form-block -->
|
||||
|
||||
{if $rowsEmpty || $rows}
|
||||
<div class="crm-content-block">
|
||||
{if $rowsEmpty}
|
||||
{include file="CRM/Contact/Form/Search/Custom/EmptyResults.tpl"}
|
||||
{/if}
|
||||
|
||||
{if $summary}
|
||||
{$summary.summary}: {$summary.total}
|
||||
{/if}
|
||||
|
||||
{if $rows}
|
||||
<div class="crm-results-block">
|
||||
{* Search request has returned 1 or more matching rows. Display results and collapse the search criteria fieldset. *}
|
||||
{* This section handles form elements for action task select and submit *}
|
||||
<div class="crm-search-tasks">
|
||||
{include file="CRM/Contact/Form/Search/ResultTasks.tpl"}
|
||||
</div>
|
||||
{* This section displays the rows along and includes the paging controls *}
|
||||
<div class="crm-search-results">
|
||||
|
||||
{include file="CRM/common/pager.tpl" location="top"}
|
||||
|
||||
{* Include alpha pager if defined. *}
|
||||
{if $atoZ}
|
||||
{include file="CRM/common/pagerAToZ.tpl"}
|
||||
{/if}
|
||||
|
||||
{strip}
|
||||
<table class="selector row-highlight" summary="{ts}Search results listings.{/ts}">
|
||||
<thead class="sticky">
|
||||
<tr>
|
||||
<th scope="col" title="Select All Rows">{$form.toggleSelect.html}</th>
|
||||
{foreach from=$columnHeaders item=header}
|
||||
<th scope="col">
|
||||
{if $header.sort}
|
||||
{assign var='key' value=$header.sort}
|
||||
{$sort->_response.$key.link}
|
||||
{else}
|
||||
{$header.name}
|
||||
{/if}
|
||||
</th>
|
||||
{/foreach}
|
||||
<th> </th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
{counter start=0 skip=1 print=false}
|
||||
{foreach from=$rows item=row}
|
||||
<tr id='rowid{$row.contact_id}' class="{cycle values="odd-row,even-row"}">
|
||||
{assign var=cbName value=$row.checkbox}
|
||||
<td>{$form.$cbName.html}</td>
|
||||
{foreach from=$columnHeaders item=header}
|
||||
{assign var=fName value=$header.sort}
|
||||
{if $fName eq 'sort_name'}
|
||||
<td><a href="{crmURL p='civicrm/contact/view' q="reset=1&cid=`$row.contact_id`&key=`$qfKey`"}">{$row.sort_name}</a></td>
|
||||
{else}
|
||||
<td>{$row.$fName}</td>
|
||||
{/if}
|
||||
{/foreach}
|
||||
<td>{$row.action}</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</table>
|
||||
{/strip}
|
||||
|
||||
|
||||
{include file="CRM/common/pager.tpl" location="bottom"}
|
||||
|
||||
</p>
|
||||
{* END Actions/Results section *}
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
{/if}
|
|
@ -0,0 +1,43 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{* Custom searches. Default template for NO MATCHES on submitted search request. *}
|
||||
<div class="messages status no-popup">
|
||||
<div class="icon inform-icon"></div>
|
||||
{if $qill}
|
||||
{ts}No matches found for:{/ts}
|
||||
{include file="CRM/common/displaySearchCriteria.tpl"}
|
||||
<br />
|
||||
{else}
|
||||
{ts}None found.{/ts}
|
||||
<br />
|
||||
{/if}
|
||||
{ts}Suggestions:{/ts}
|
||||
<ul>
|
||||
<li>{ts}check your spelling{/ts}</li>
|
||||
<li>{ts}try a different spelling or use fewer letters{/ts}</li>
|
||||
<li>{ts}make sure you have enough privileges in the access control system{/ts}</li>
|
||||
</ul>
|
||||
</div>
|
|
@ -0,0 +1,151 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{* Template for "EventAggregate" custom search component. *}
|
||||
{assign var="showBlock" value="'searchForm'"}
|
||||
{assign var="hideBlock" value="'searchForm_show','searchForm_hide'"}
|
||||
<div class="crm-block crm-form-block crm-search-form-block">
|
||||
<div id="searchForm_show" class="form-item">
|
||||
<a href="#" onclick="cj('#searchForm_show').hide(); cj('#searchForm').show(); return false;"><img src="{$config->resourceBase}i/TreePlus.gif" class="action-icon" alt="{ts}open section{/ts}" /></a>
|
||||
<label>{ts}Edit Search Criteria{/ts}</label>
|
||||
</div>
|
||||
|
||||
<div id="searchForm" class="crm-block crm-form-block crm-contact-custom-search-eventDetails-form-block">
|
||||
<fieldset>
|
||||
<legend><span id="searchForm_hide"><a href="#" onclick="cj('#searchForm').hide(); cj('#searchForm_show').show(); return false;"><img src="{$config->resourceBase}i/TreeMinus.gif" class="action-icon" alt="{ts}close section{/ts}" /></a></span>{ts}Search Criteria{/ts}</legend>
|
||||
<div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
|
||||
<table class="form-layout-compressed">
|
||||
{* Loop through all defined search criteria fields (defined in the buildForm() function). *}
|
||||
{foreach from=$elements item=element}
|
||||
<tr class="crm-contact-custom-search-eventDetails-form-block-{$element}">
|
||||
<td class="label">{$form.$element.label}</td>
|
||||
{if $element eq 'start_date'}
|
||||
<td>{include file="CRM/common/jcalendar.tpl" elementName=start_date}</td>
|
||||
{elseif $element eq 'end_date'}
|
||||
<td>{include file="CRM/common/jcalendar.tpl" elementName=end_date}</td>
|
||||
{else}
|
||||
<td>{$form.$element.html}</td>
|
||||
{/if}
|
||||
</tr>
|
||||
{/foreach}
|
||||
<tr class="crm-contact-custom-search-eventDetails-form-block-event_type">
|
||||
<td class="label">{ts}Event Type{/ts}</td>
|
||||
<td>
|
||||
<div class="listing-box">
|
||||
{foreach from=$form.event_type_id item="event_val"}
|
||||
<div class="{cycle values="odd-row,even-row"}">
|
||||
{$event_val.html}
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
<div class="spacer"></div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="bottom"}</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
{if $rowsEmpty}
|
||||
{include file="CRM/Contact/Form/Search/Custom/EmptyResults.tpl"}
|
||||
{/if}
|
||||
|
||||
{if $rows}
|
||||
{* Search request has returned 1 or more matching rows. Display results and collapse the search criteria fieldset. *}
|
||||
{assign var="showBlock" value="'searchForm_show'"}
|
||||
{assign var="hideBlock" value="'searchForm'"}
|
||||
|
||||
<fieldset>
|
||||
{* The action task select and submit has been removed from this custom search because we're not dealing with contact records (so it won't work). *}
|
||||
|
||||
{* This section displays the rows along and includes the paging controls *}
|
||||
<p>
|
||||
|
||||
{include file="CRM/common/pager.tpl" location="top"}
|
||||
|
||||
{include file="CRM/common/pagerAToZ.tpl"}
|
||||
|
||||
{strip}
|
||||
<table summary="{ts}Search results listings.{/ts}">
|
||||
<thead class="sticky">
|
||||
{foreach from=$columnHeaders item=header}
|
||||
<th scope="col">
|
||||
{if $header.sort}
|
||||
{assign var='key' value=$header.sort}
|
||||
{$sort->_response.$key.link}
|
||||
{else}
|
||||
{$header.name}
|
||||
{/if}
|
||||
</th>
|
||||
{/foreach}
|
||||
</thead>
|
||||
|
||||
{counter start=0 skip=1 print=false}
|
||||
{foreach from=$rows item=row}
|
||||
<tr id='rowid{$row.contact_id}' class="{cycle values="odd-row,even-row"}">
|
||||
|
||||
{foreach from=$columnHeaders item=header}
|
||||
{assign var=fName value=$header.sort}
|
||||
{if $fName eq 'sort_name'}
|
||||
<td>{$row.sort_name}</a></td>
|
||||
{elseif $fName eq 'payment_amount' || $fName eq 'fee' || $fName eq 'net_payment'}
|
||||
<td>{$row.$fName|crmMoney}</td>
|
||||
{elseif $fName eq 'participant_count'}
|
||||
<td>{$row.$fName}</td>
|
||||
{else}
|
||||
<td>{$row.$fName}</td>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</tr>
|
||||
{/foreach}
|
||||
|
||||
{if $summary}
|
||||
<tr class="columnheader">
|
||||
<td> </td>
|
||||
<td>Totals </td>
|
||||
<td>{$summary.participant_count}</td>
|
||||
<td>{$summary.payment_amount|crmMoney}</td>
|
||||
<td>{$summary.fee|crmMoney}</td>
|
||||
<td colspan=2>{$summary.net_payment|crmMoney}</td>
|
||||
</tr>
|
||||
{/if}
|
||||
</table>
|
||||
{/strip}
|
||||
|
||||
{include file="CRM/common/pager.tpl" location="bottom"}
|
||||
|
||||
</p>
|
||||
</fieldset>
|
||||
{* END Actions/Results section *}
|
||||
{/if}
|
||||
|
||||
<script type="text/javascript">
|
||||
var showBlock = new Array({$showBlock});
|
||||
var hideBlock = new Array({$hideBlock});
|
||||
|
||||
{* hide and display the appropriate blocks *}
|
||||
on_load_init_blocks( showBlock, hideBlock );
|
||||
</script>
|
||||
</div>
|
|
@ -0,0 +1,34 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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-fullText-title"}
|
||||
Full Text Search
|
||||
{/htxt}
|
||||
{htxt id="id-fullText"}
|
||||
<p>
|
||||
{ts}You can search for records containing a word or phrase in any text field - including name and email fields, notes, activity subject and descriptions, as well as any searchable custom text and note fields. Narrow your search by selecting a specific table / type of record. Wildcards are automatically added to your search term. Searches are NOT case-sensitive.{/ts}
|
||||
</p>
|
||||
<p>{ts}EXAMPLE: You can enter <em>fiesta</em>, and get a match on a contact with a note containing <em>Fall Fiesta</em>{/ts}</p>
|
||||
{/htxt}
|
|
@ -0,0 +1,422 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{* Template for Full-text search component. *}
|
||||
<div class="crm-block crm-form-block crm-search-form-block">
|
||||
<div id="searchForm">
|
||||
<div class="form-item">
|
||||
<table class="form-layout-compressed">
|
||||
<tr>
|
||||
<td class="label">{$form.text.label}</td>
|
||||
<td>{$form.text.html}</td>
|
||||
<td class="label">{ts}in...{/ts}</td>
|
||||
<td>{$form.table.html}</td>
|
||||
<td>{$form.buttons.html} {help id="id-fullText"}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="crm-block crm-content-block">
|
||||
{if !$table}{include file="CRM/common/pager.tpl" location="top"}{/if}
|
||||
{include file="CRM/common/jsortable.tpl"}
|
||||
{if $rowsEmpty}
|
||||
{include file="CRM/Contact/Form/Search/Custom/EmptyResults.tpl"}
|
||||
{/if}
|
||||
|
||||
{assign var=table value=$form.table.value.0}
|
||||
{assign var=text value=$form.text.value}
|
||||
{if !empty($summary.Contact) }
|
||||
<div class="section">
|
||||
{* Search request has returned 1 or more matching rows. Display results. *}
|
||||
<h3>{ts}Contacts{/ts}
|
||||
: {if !$table}{if $summary.Count.Contact <= $limit}{$summary.Count.Contact}{else}{ts 1=$limit}%1 or more{/ts}{/if}{else}{$summary.Count.Contact}{/if}</h3>
|
||||
{if $table}{include file="CRM/common/pager.tpl" location="top"}{/if}
|
||||
{* This section displays the rows along and includes the paging controls *}
|
||||
<table id="contact_listing" class="display" class="selector" summary="{ts}Contact listings.{/ts}">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class='link'>{ts}Name{/ts}</th>
|
||||
{if $allowFileSearch}<th>{ts}File{/ts}</th>{/if}
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
{foreach from=$summary.Contact item=row}
|
||||
<tr class="{cycle values="odd-row,even-row"}">
|
||||
<td><a
|
||||
href="{crmURL p='civicrm/contact/view' q="reset=1&cid=`$row.contact_id`&context=fulltext&key=`$qfKey`"}"
|
||||
title="{ts}View Contact Details{/ts}">{$row.sort_name}</a></td>
|
||||
{if $allowFileSearch}<td>{$row.fileHtml}</td>{/if}
|
||||
<td><a
|
||||
href="{crmURL p='civicrm/contact/view' q="reset=1&cid=`$row.contact_id`&context=fulltext&key=`$qfKey`"}">{ts}View{/ts}</a>
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</table>
|
||||
{if !$table and $summary.addShowAllLink.Contact}
|
||||
<div class="crm-section full-text-view-all-section">
|
||||
<a href="{crmURL p='civicrm/contact/search/custom' q="csid=`$csID`&reset=1&force=1&table=Contact&text=$text"}"
|
||||
title="{ts}View all results for contacts{/ts}">» {ts}View all results for contacts{/ts}</a>
|
||||
</div>{/if}
|
||||
{* note we using location="below" because we don't want to use rows per page for now. And therefore don't put location="bottom" for now. *}
|
||||
{if $table}{include file="CRM/common/pager.tpl" location="below"}{/if}
|
||||
{* END Actions/Results section *}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if !empty($summary.Activity) }
|
||||
<div class="section">
|
||||
{* Search request has returned 1 or more matching rows. Display results. *}
|
||||
|
||||
<h3>{ts}Activities{/ts}
|
||||
: {if !$table}{if $summary.Count.Activity <= $limit}{$summary.Count.Activity}{else}{ts 1=$limit}%1 or more{/ts}{/if}{else}{$summary.Count.Activity}{/if}</h3>
|
||||
{if $table}{include file="CRM/common/pager.tpl" location="top"}{/if}
|
||||
{* This section displays the rows along and includes the paging controls *}
|
||||
<table id="activity_listing" class="display" summary="{ts}Activity listings.{/ts}">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{ts}Type{/ts}</th>
|
||||
<th>{ts}Subject{/ts}</th>
|
||||
<th>{ts}Details{/ts}</th>
|
||||
<th class='link'>{ts}Added By{/ts}</th>
|
||||
<th class='link'>{ts}With{/ts}</th>
|
||||
<th class='link'>{ts}Assignee{/ts}</th>
|
||||
{if $allowFileSearch}<th>{ts}File{/ts}</th>{/if}
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
{foreach from=$summary.Activity item=row}
|
||||
<tr class="{cycle values="odd-row,even-row"}">
|
||||
<td>{$row.activity_type}</td>
|
||||
<td>{$row.subject|mb_truncate:40}</td>
|
||||
<td>{$row.details|escape}</td>
|
||||
<td>
|
||||
<a href="{crmURL p='civicrm/contact/view' q="reset=1&cid=`$row.contact_id`&context=fulltext&key=`$qfKey`"}"
|
||||
title="{ts}View Contact Details{/ts}">{$row.sort_name}</a>
|
||||
</td>
|
||||
<td>
|
||||
<a href="{crmURL p='civicrm/contact/view' q="reset=1&cid=`$row.target_contact_id`&context=fulltext&key=`$qfKey`"}"
|
||||
title="{ts}View Contact Details{/ts}">{$row.target_sort_name}</a>
|
||||
</td>
|
||||
<td>
|
||||
<a href="{crmURL p='civicrm/contact/view' q="reset=1&cid=`$row.assignee_contact_id`&context=fulltext&key=`$qfKey`"}"
|
||||
title="{ts}View Contact Details{/ts}">{$row.assignee_sort_name}</a>
|
||||
</td>
|
||||
{if $allowFileSearch}<td>{$row.fileHtml}</td>{/if}
|
||||
<td>
|
||||
{if $row.case_id }
|
||||
<a href="{crmURL p='civicrm/case/activity/view'
|
||||
q="reset=1&aid=`$row.activity_id`&cid=`$row.client_id`&caseID=`$row.case_id`&context=fulltext&key=`$qfKey`"}">
|
||||
{else}
|
||||
<a href="{crmURL p='civicrm/contact/view/activity'
|
||||
q="atype=`$row.activity_type_id`&action=view&reset=1&id=`$row.activity_id`&cid=`$row.contact_id`&context=fulltext&key=`$qfKey`"}">
|
||||
{/if}
|
||||
{ts}View{/ts}</a>
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</table>
|
||||
{if !$table and $summary.addShowAllLink.Activity}
|
||||
<div class="crm-section full-text-view-all-section">
|
||||
<a href="{crmURL p='civicrm/contact/search/custom' q="csid=`$csID`&reset=1&force=1&table=Activity&text=$text"}"
|
||||
title="{ts}View all results for activities{/ts}">» {ts}View all results for activities{/ts}</a>
|
||||
</div>
|
||||
{/if}
|
||||
{if $table}{include file="CRM/common/pager.tpl" location="below"}{/if}
|
||||
{* END Actions/Results section *}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if !empty($summary.Case) }
|
||||
<div class="section">
|
||||
{* Search request has returned 1 or more matching rows. Display results. *}
|
||||
<h3>{ts}Cases{/ts}
|
||||
: {if !$table}{if $summary.Count.Case <= $limit}{$summary.Count.Case}{else}{ts 1=$limit}%1 or more{/ts}{/if}{else}{$summary.Count.Case}{/if}</h3>
|
||||
{if $table}{include file="CRM/common/pager.tpl" location="top"}{/if}
|
||||
{* This section displays the rows along and includes the paging controls *}
|
||||
<table id="case_listing" class="display" summary="{ts}Case listings.{/ts}">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class='link'>{ts}Client Name{/ts}</th>
|
||||
<th class="start_date">{ts}Start Date{/ts}</th>
|
||||
<th class="end_date">{ts}End Date{/ts}</th>
|
||||
<th>{ts}Case ID{/ts}</th>
|
||||
{if $allowFileSearch}<th>{ts}File{/ts}</th>{/if}
|
||||
<th></th>
|
||||
<th class="hiddenElement"></th>
|
||||
<th class="hiddenElement"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
{foreach from=$summary.Case item=row}
|
||||
<tr class="{cycle values="odd-row,even-row"}">
|
||||
<td>
|
||||
<a href="{crmURL p='civicrm/contact/view' q="reset=1&cid=`$row.contact_id`&context=fulltext&key=`$qfKey`"}"
|
||||
title="{ts}View Contact Details{/ts}">{$row.sort_name}</a>
|
||||
</td>
|
||||
<td>{$row.case_start_date|crmDate:"%b %d, %Y %l:%M %P"}</td>
|
||||
<td>{$row.case_end_date|crmDate:"%b %d, %Y %l:%M %P"}</td>
|
||||
<td>{$row.case_id}</td>
|
||||
{if $allowFileSearch}<td>{$row.fileHtml}</td>{/if}
|
||||
{if $row.case_is_deleted}
|
||||
<td>
|
||||
<a href="{crmURL p='civicrm/contact/view/case'
|
||||
q="reset=1&id=`$row.case_id`&cid=`$row.contact_id`&action=renew&context=fulltext&key=`$qfKey`"}">{ts}Restore Case{/ts}</a>
|
||||
</td>
|
||||
{else}
|
||||
<td>
|
||||
<a href="{crmURL p='civicrm/contact/view/case'
|
||||
q="reset=1&id=`$row.case_id`&cid=`$row.contact_id`&action=view&context=fulltext&key=`$qfKey`"}">{ts}Manage{/ts}</a>
|
||||
</td>
|
||||
{/if}
|
||||
<td class="start_date hiddenElement">{$row.case_start_date|crmDate}</td>
|
||||
<td class="end_date hiddenElement">{$row.case_end_date|crmDate}</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</table>
|
||||
{if !$table and $summary.addShowAllLink.Case}
|
||||
<div class="crm-section full-text-view-all-section">
|
||||
<a href="{crmURL p='civicrm/contact/search/custom' q="csid=`$csID`&reset=1&force=1&table=Case&text=$text"}"
|
||||
title="{ts}View all results for cases{/ts}">» {ts}View all results for cases{/ts}</a>
|
||||
</div>
|
||||
{/if}
|
||||
{if $table}{include file="CRM/common/pager.tpl" location="below"}{/if}
|
||||
{* END Actions/Results section *}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if !empty($summary.Contribution) }
|
||||
<div class="section">
|
||||
{* Search request has returned 1 or more matching rows. Display results. *}
|
||||
|
||||
<h3>{ts}Contributions{/ts}
|
||||
: {if !$table}{if $summary.Count.Contribution <= $limit}{$summary.Count.Contribution}{else}{ts 1=$limit}%1 or more{/ts}{/if}{else}{$summary.Count.Contribution}{/if}</h3>
|
||||
{if $table}{include file="CRM/common/pager.tpl" location="top"}{/if}
|
||||
{* This section displays the rows along and includes the paging controls *}
|
||||
<table id="contribute_listing" class="display" summary="{ts}Contribution listings.{/ts}">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class='link'>{ts}Contributor's Name{/ts}</th>
|
||||
<th class="currency">{ts}Amount{/ts}</th>
|
||||
<th>{ts}Financial Type{/ts}</th>
|
||||
<th>{ts}Source{/ts}</th>
|
||||
<th class="received_date">{ts}Received{/ts}</th>
|
||||
<th>{ts}Status{/ts}</th>
|
||||
{if $allowFileSearch}<th>{ts}File{/ts}</th>{/if}
|
||||
<th></th>
|
||||
<th class="hiddenElement"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
{foreach from=$summary.Contribution item=row}
|
||||
<tr class="{cycle values="odd-row,even-row"}">
|
||||
<td>
|
||||
<a href="{crmURL p='civicrm/contact/view'
|
||||
q="reset=1&cid=`$row.contact_id`&context=fulltext&key=`$qfKey`"}"
|
||||
title="{ts}View Contact Details{/ts}">{$row.sort_name}</a>
|
||||
</td>
|
||||
<td>{$row.contribution_total_amount|crmMoney}</td>
|
||||
<td>{$row.financial_type}</td>
|
||||
<td>{$row.contribution_source}</td>
|
||||
<td>{$row.contribution_receive_date|crmDate:"%b %d, %Y %l:%M %P"}</td>
|
||||
<td>{$row.contribution_status}</td>
|
||||
{if $allowFileSearch}<td>{$row.fileHtml}</td>{/if}
|
||||
<td>
|
||||
<a href="{crmURL p='civicrm/contact/view/contribution'
|
||||
q="reset=1&id=`$row.contribution_id`&cid=`$row.contact_id`&action=view&context=fulltext&key=`$qfKey`"}">{ts}View{/ts}</a>
|
||||
</td>
|
||||
<td class="received_date hiddenElement">{$row.contribution_receive_date|crmDate}</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</table>
|
||||
{if !$table and $summary.addShowAllLink.Contribution}
|
||||
<div class="crm-section full-text-view-all-section">
|
||||
<a href="{crmURL p='civicrm/contact/search/custom' q="csid=`$csID`&reset=1&force=1&table=Contribution&text=$text"}"
|
||||
title="{ts}View all results for contributions{/ts}">» {ts}View all results for contributions{/ts}</a>
|
||||
</div>
|
||||
{/if}
|
||||
{if $table}{include file="CRM/common/pager.tpl" location="below"}{/if}
|
||||
{* END Actions/Results section *}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if !empty($summary.Participant) }
|
||||
<div class="section">
|
||||
{* Search request has returned 1 or more matching rows. *}
|
||||
|
||||
<h3>{ts}Event Participants{/ts}
|
||||
: {if !$table}{if $summary.Count.Participant <= $limit}{$summary.Count.Participant}{else}{ts 1=$limit}%1 or more{/ts}{/if}{else}{$summary.Count.Participant}{/if}</h3>
|
||||
{if $table}{include file="CRM/common/pager.tpl" location="top"}{/if}
|
||||
{* This section displays the rows along and includes the paging controls *}
|
||||
<table id="participant_listing" class="display" summary="{ts}Participant listings.{/ts}">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class='link'>{ts}Participant's Name{/ts}</th>
|
||||
<th>{ts}Event{/ts}</th>
|
||||
<th>{ts}Fee Level{/ts}</th>
|
||||
<th class="currency">{ts}Fee Amount{/ts}</th>
|
||||
<th class="register_date">{ts}Register Date{/ts}</th>
|
||||
<th>{ts}Source{/ts}</th>
|
||||
<th>{ts}Status{/ts}</th>
|
||||
<th>{ts}Role{/ts}</th>
|
||||
{if $allowFileSearch}<th>{ts}File{/ts}</th>{/if}
|
||||
<th></th>
|
||||
<th class="hiddenElement"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
{foreach from=$summary.Participant item=row}
|
||||
<tr class="{cycle values="odd-row,even-row"}">
|
||||
<td>
|
||||
<a href="{crmURL p='civicrm/contact/view' q="reset=1&cid=`$row.contact_id`&context=fulltext&key=`$qfKey`"}"
|
||||
title="{ts}View Contact Details{/ts}">{$row.sort_name}</a>
|
||||
</td>
|
||||
<td>{$row.event_title}</td>
|
||||
<td>{$row.participant_fee_level}</td>
|
||||
<td>{$row.participant_fee_amount|crmMoney}</td>
|
||||
<td>{$row.participant_register_date|crmDate:"%b %d, %Y %l:%M %P"}</td>
|
||||
<td>{$row.participant_source}</td>
|
||||
<td>{$row.participant_status}</td>
|
||||
<td>{$row.participant_role}</td>
|
||||
{if $allowFileSearch}<td>{$row.fileHtml}</td>{/if}
|
||||
<td>
|
||||
<a href="{crmURL p='civicrm/contact/view/participant'
|
||||
q="reset=1&id=`$row.participant_id`&cid=`$row.contact_id`&action=view&context=fulltext&key=`$qfKey`"}">{ts}View{/ts}</a>
|
||||
</td>
|
||||
<td class="register_date hiddenElement">{$row.participant_register_date|crmDate}</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</table>
|
||||
{if !$table and $summary.addShowAllLink.Participant}
|
||||
<div class="crm-section full-text-view-all-section"><a
|
||||
href="{crmURL p='civicrm/contact/search/custom' q="csid=`$csID`&reset=1&force=1&table=Participant&text=$text"}"
|
||||
title="{ts}View all results for participants{/ts}">» {ts}View all results for participants{/ts}</a>
|
||||
</div>{/if}
|
||||
{if $table}{include file="CRM/common/pager.tpl" location="below"}{/if}
|
||||
{* END Actions/Results section *}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if !empty($summary.Membership) }
|
||||
<div class="section">
|
||||
{* Search request has returned 1 or more matching rows. *}
|
||||
|
||||
<h3>{ts}Memberships{/ts}
|
||||
: {if !$table}{if $summary.Count.Membership <= $limit}{$summary.Count.Membership}{else}{ts 1=$limit}%1 or more{/ts}{/if}{else}{$summary.Count.Membership}{/if}</h3>
|
||||
{if $table}{include file="CRM/common/pager.tpl" location="top"}{/if}
|
||||
{* This section displays the rows along and includes the paging controls *}
|
||||
<table id="membership_listing" class="display" summary="{ts}Membership listings.{/ts}">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class='link'>{ts}Member's Name{/ts}</th>
|
||||
<th>{ts}Membership Type{/ts}</th>
|
||||
<th class="currency">{ts}Membership Fee{/ts}</th>
|
||||
<th class="start_date">{ts}Membership Start Date{/ts}</th>
|
||||
<th class="end_date">{ts}Membership End Date{/ts}</th>
|
||||
<th>{ts}Source{/ts}</th>
|
||||
<th>{ts}Status{/ts}</th>
|
||||
{if $allowFileSearch}<th>{ts}File{/ts}</th>{/if}
|
||||
<th></th>
|
||||
<th class="hiddenElement"></th>
|
||||
<th class="hiddenElement"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
{foreach from=$summary.Membership item=row}
|
||||
<tr class="{cycle values="odd-row,even-row"}">
|
||||
<td>
|
||||
<a href="{crmURL p='civicrm/contact/view' q="reset=1&cid=`$row.contact_id`&context=fulltext&key=`$qfKey`"}"
|
||||
title="{ts}View Contact Details{/ts}">{$row.sort_name}</a>
|
||||
</td>
|
||||
<td>{$row.membership_type}</td>
|
||||
<td>{$row.membership_fee|crmMoney}</td>
|
||||
<td>{$row.membership_start_date|crmDate:"%b %d, %Y %l:%M %P"}</td>
|
||||
<td>{$row.membership_end_date|crmDate:"%b %d, %Y %l:%M %P"}</td>
|
||||
<td>{$row.membership_source}</td>
|
||||
<td>{$row.membership_status}</td>
|
||||
{if $allowFileSearch}<td>{$row.fileHtml}</td>{/if}
|
||||
<td>
|
||||
<a href="{crmURL p='civicrm/contact/view/membership'
|
||||
q="reset=1&id=`$row.membership_id`&cid=`$row.contact_id`&action=view&context=fulltext&key=`$qfKey`"}">{ts}View{/ts}</a>
|
||||
</td>
|
||||
<td class="start_date hiddenElement">{$row.membership_start_date|crmDate}</td>
|
||||
<td class="end_date hiddenElement">{$row.membership_end_date|crmDate}</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</table>
|
||||
{if !$table and $summary.addShowAllLink.Membership}
|
||||
<div class="crm-section full-text-view-all-section">
|
||||
<a href="{crmURL p='civicrm/contact/search/custom' q="csid=`$csID`&reset=1&force=1&table=Membership&text=$text"}"
|
||||
title="{ts}View all results for memberships{/ts}">» {ts}View all results for memberships{/ts}</a>
|
||||
</div>
|
||||
{/if}
|
||||
{if $table}{include file="CRM/common/pager.tpl" location="below"}{/if}
|
||||
{* END Actions/Results section *}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if !empty($summary.File) }
|
||||
<div class="section">
|
||||
{* Search request has returned 1 or more matching rows. *}
|
||||
|
||||
<h3>{ts}Files{/ts}:
|
||||
{if !$table}
|
||||
{if $summary.Count.File <= $limit}{$summary.Count.File}{else}{ts 1=$limit}%1 or more{/ts}{/if}
|
||||
{else}
|
||||
{$summary.Count.File}
|
||||
{/if}</h3>
|
||||
{if $table}{include file="CRM/common/pager.tpl" location="top"}{/if}
|
||||
|
||||
{* This section displays the rows along and includes the paging controls *}
|
||||
<table id="file_listing" class="display" summary="{ts}File listings.{/ts}">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class='link'>{ts}File Name{/ts}</th>
|
||||
<th>{ts}Type{/ts}</th>
|
||||
<th>{ts}Attached To{/ts}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{foreach from=$summary.File item=row}
|
||||
<tr class="{cycle values="odd-row,even-row"}">
|
||||
<td><a href="{$row.file_url}">{$row.file_name}</a></td>
|
||||
<td>{$row.file_mime_type}</td>
|
||||
<td>{crmCrudLink action=VIEW table=$row.file_entity_table id=$row.file_entity_id}</td>
|
||||
<td>
|
||||
<a href="{$row.file_url}">{ts}View{/ts}</a>
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
{if !$table and $summary.addShowAllLink.File}
|
||||
<div class="crm-section full-text-view-all-section">
|
||||
<a href="{crmURL p='civicrm/contact/search/custom' q="csid=`$csID`&reset=1&force=1&table=File&text=$text"}"
|
||||
title="{ts}View all results for files{/ts}">» {ts}View all results for files{/ts}</a>
|
||||
</div>{/if}
|
||||
{if $table}{include file="CRM/common/pager.tpl" location="below"}{/if}
|
||||
{* END Actions/Results section *}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if !$table}{include file="CRM/common/pager.tpl" location="bottom"}{/if}
|
||||
</div>
|
|
@ -0,0 +1,105 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{* Template for "Sample" custom search component. *}
|
||||
{assign var="showBlock" value="'searchForm'"}
|
||||
{assign var="hideBlock" value="'searchForm_show','searchForm_hide'"}
|
||||
|
||||
<div class="crm-form-block crm-search-form-block">
|
||||
<div id="searchForm">
|
||||
{include file="CRM/Contact/Form/Search/Custom/MultipleValuesCriteria.tpl"}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{if $rowsEmpty}
|
||||
{include file="CRM/Contact/Form/Search/Custom/EmptyResults.tpl"}
|
||||
{/if}
|
||||
|
||||
{if $summary}
|
||||
{$summary.summary}: {$summary.total}
|
||||
{/if}
|
||||
|
||||
{if $rows}
|
||||
{* Search request has returned 1 or more matching rows. Display results and collapse the search criteria fieldset. *}
|
||||
{assign var="showBlock" value="'searchForm_show'"}
|
||||
{assign var="hideBlock" value="'searchForm'"}
|
||||
|
||||
<fieldset>
|
||||
|
||||
{* This section handles form elements for action task select and submit *}
|
||||
{include file="CRM/Contact/Form/Search/ResultTasks.tpl"}
|
||||
|
||||
{* This section displays the rows along and includes the paging controls *}
|
||||
<p>
|
||||
|
||||
{include file="CRM/common/pager.tpl" location="top"}
|
||||
|
||||
{include file="CRM/common/pagerAToZ.tpl"}
|
||||
|
||||
{strip}
|
||||
<table class="selector row-highlight" summary="{ts}Search results listings.{/ts}">
|
||||
<thead class="sticky">
|
||||
<th scope="col" title="Select All Rows">{$form.toggleSelect.html}</th>
|
||||
{foreach from=$columnHeaders item=header}
|
||||
<th scope="col">
|
||||
{if $header.sort}
|
||||
{assign var='key' value=$header.sort}
|
||||
{$sort->_response.$key.link}
|
||||
{else}
|
||||
{$header.name}
|
||||
{/if}
|
||||
</th>
|
||||
{/foreach}
|
||||
<th> </th>
|
||||
</thead>
|
||||
|
||||
{counter start=0 skip=1 print=false}
|
||||
{foreach from=$rows item=row}
|
||||
<tr id='rowid{$row.contact_id}' class="{cycle values="odd-row,even-row"}">
|
||||
{assign var=cbName value=$row.checkbox}
|
||||
<td>{$form.$cbName.html}</td>
|
||||
{foreach from=$columnHeaders item=header}
|
||||
{assign var=fName value=$header.sort}
|
||||
{if $fName eq 'sort_name'}
|
||||
<td><a href="{crmURL p='civicrm/contact/view' q="reset=1&cid=`$row.contact_id`&key=`$qfKey`"}">{$row.sort_name}</a></td>
|
||||
{else}
|
||||
<td>{$row.$fName}</td>
|
||||
{/if}
|
||||
{/foreach}
|
||||
<td>{$row.action}</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</table>
|
||||
{/strip}
|
||||
|
||||
{include file="CRM/common/pager.tpl" location="bottom"}
|
||||
|
||||
</p>
|
||||
</fieldset>
|
||||
{* END Actions/Results section *}
|
||||
{/if}
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,109 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{* Search criteria form elements - Find Contacts *}
|
||||
|
||||
{* Set title for search criteria accordion *}
|
||||
{capture assign=editTitle}{ts}Edit Search Criteria{/ts}{/capture}
|
||||
|
||||
{strip}
|
||||
<div class="crm-block crm-form-block crm-basic-criteria-form-block">
|
||||
<div class="crm-accordion-wrapper crm-case_search-accordion {if $rows}collapsed{/if}">
|
||||
<div class="crm-accordion-header crm-master-accordion-header">
|
||||
{$editTitle}
|
||||
</div><!-- /.crm-accordion-header -->
|
||||
<div class="crm-accordion-body">
|
||||
<div class="crm-section sort_name-section">
|
||||
<div class="label">
|
||||
{$form.sort_name.label}
|
||||
</div>
|
||||
<div class="content">
|
||||
{$form.sort_name.html}
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
|
||||
{if $form.contact_type}
|
||||
<div class="crm-section contact_type-section">
|
||||
<div class="label">
|
||||
{$form.contact_type.label}
|
||||
</div>
|
||||
<div class="content">
|
||||
{$form.contact_type.html}
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if $form.group}
|
||||
<div class="crm-section group_selection-section">
|
||||
<div class="label">
|
||||
{$form.group.label}
|
||||
</div>
|
||||
<div class="content">
|
||||
{$form.group.html|crmAddClass:big}
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if $form.tag}
|
||||
<div class="crm-section tag-section">
|
||||
<div class="label">
|
||||
{$form.tag.label}
|
||||
</div>
|
||||
<div class="content">
|
||||
{$form.tag.html|crmAddClass:medium}
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{* Choose regular or 'tall' listing-box class for Group select box based on # of groups. *}
|
||||
{if $form.custom_group|@count GT 8}
|
||||
{assign var="boxClass" value="listing-box-tall"}
|
||||
{else}
|
||||
{assign var="boxClass" value="listing-box"}
|
||||
{/if}
|
||||
<div class="crm-section crm-contact-custom-search-multipleValues-form-block-custom_group">
|
||||
<div class="label">
|
||||
{ts}Custom Group(s){/ts}
|
||||
</div>
|
||||
<div class="content">
|
||||
<div class="{$boxClass}">
|
||||
{foreach from=$form.custom_group item="group_val"}
|
||||
<div class="{cycle values="even-row,odd-row"}">
|
||||
{$group_val.html}
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl"}</div>
|
||||
</div><!-- /.crm-accordion-body -->
|
||||
</div><!-- /.crm-accordion-wrapper -->
|
||||
</div><!-- /.crm-form-block -->
|
||||
{/strip}
|
|
@ -0,0 +1,128 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{* Default template custom searches. This template is used automatically if templateFile() function not defined in
|
||||
custom search .php file. If you want a different layout, clone and customize this file and point to new file using
|
||||
templateFile() function.*}
|
||||
<div class="crm-block crm-form-block crm-contact-custom-search-form-block">
|
||||
<div class="crm-accordion-wrapper crm-custom_search_form-accordion {if $rows}collapsed{/if}">
|
||||
<div class="crm-accordion-header crm-master-accordion-header">
|
||||
{ts}Edit Search Criteria{/ts}
|
||||
</div><!-- /.crm-accordion-header -->
|
||||
<div class="crm-accordion-body">
|
||||
<div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
|
||||
<table class="form-layout-compressed">
|
||||
<tr><td class="label">{$form.distance.label}</td><td>{$form.distance.html|crmAddClass:four} {$form.prox_distance_unit.html}</td></tr>
|
||||
<tr><td class="label">FROM...</td><td></td></tr>
|
||||
<tr><td class="label">{$form.street_address.label}</td><td>{$form.street_address.html}</td></tr>
|
||||
<tr><td class="label">{$form.city.label}</td><td>{$form.city.html}</td></tr>
|
||||
<tr><td class="label">{$form.postal_code.label}</td><td>{$form.postal_code.html}</td></tr>
|
||||
<tr><td class="label">{$form.country_id.label}</td><td>{$form.country_id.html}</td></tr>
|
||||
<tr><td class="label" style="white-space: nowrap;">{$form.state_province_id.label}</td><td>{$form.state_province_id.html}</td></tr>
|
||||
<tr><td class="label">AND ...</td><td></td></tr>
|
||||
<tr><td class="label">{$form.group.label}</td><td>{$form.group.html}</td></tr>
|
||||
<tr><td class="label">{$form.tag.label}</td><td>{$form.tag.html}</td></tr>
|
||||
</table>
|
||||
<div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="bottom"}</div>
|
||||
</div><!-- /.crm-accordion-body -->
|
||||
</div><!-- /.crm-accordion-wrapper -->
|
||||
</div><!-- /.crm-form-block -->
|
||||
|
||||
{if $rowsEmpty || $rows}
|
||||
<div class="crm-content-block">
|
||||
{if $rowsEmpty}
|
||||
{include file="CRM/Contact/Form/Search/Custom/EmptyResults.tpl"}
|
||||
{/if}
|
||||
|
||||
{if $summary}
|
||||
{$summary.summary}: {$summary.total}
|
||||
{/if}
|
||||
|
||||
{if $rows}
|
||||
<div class="crm-results-block">
|
||||
{* Search request has returned 1 or more matching rows. Display results and collapse the search criteria fieldset. *}
|
||||
{* This section handles form elements for action task select and submit *}
|
||||
<div class="crm-search-tasks">
|
||||
{include file="CRM/Contact/Form/Search/ResultTasks.tpl"}
|
||||
</div>
|
||||
{* This section displays the rows along and includes the paging controls *}
|
||||
<div class="crm-search-results">
|
||||
|
||||
{include file="CRM/common/pager.tpl" location="top"}
|
||||
|
||||
{* Include alpha pager if defined. *}
|
||||
{if $atoZ}
|
||||
{include file="CRM/common/pagerAToZ.tpl"}
|
||||
{/if}
|
||||
|
||||
{strip}
|
||||
<table class="selector row-highlight" summary="{ts}Search results listings.{/ts}">
|
||||
<thead class="sticky">
|
||||
<th scope="col" title="Select All Rows">{$form.toggleSelect.html}</th>
|
||||
{foreach from=$columnHeaders item=header}
|
||||
<th scope="col">
|
||||
{if $header.sort}
|
||||
{assign var='key' value=$header.sort}
|
||||
{$sort->_response.$key.link}
|
||||
{else}
|
||||
{$header.name}
|
||||
{/if}
|
||||
</th>
|
||||
{/foreach}
|
||||
<th> </th>
|
||||
</thead>
|
||||
|
||||
{counter start=0 skip=1 print=false}
|
||||
{foreach from=$rows item=row}
|
||||
<tr id='rowid{$row.contact_id}' class="{cycle values="odd-row,even-row"}">
|
||||
{assign var=cbName value=$row.checkbox}
|
||||
<td>{$form.$cbName.html}</td>
|
||||
{foreach from=$columnHeaders item=header}
|
||||
{assign var=fName value=$header.sort}
|
||||
{if $fName eq 'sort_name'}
|
||||
<td><a href="{crmURL p='civicrm/contact/view' q="reset=1&cid=`$row.contact_id`&key=`$qfKey`&context=custom"}">{$row.sort_name}</a></td>
|
||||
{else}
|
||||
<td>{$row.$fName}</td>
|
||||
{/if}
|
||||
{/foreach}
|
||||
<td>{$row.action}</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</table>
|
||||
{/strip}
|
||||
|
||||
|
||||
{include file="CRM/common/pager.tpl" location="bottom"}
|
||||
|
||||
</p>
|
||||
{* END Actions/Results section *}
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
{/if}
|
|
@ -0,0 +1,29 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{* Points to default template for custom searches. This file will be obsoleted in a future release. If building a new
|
||||
custom search, point directly to templates/CRM/Contact/Form/Search/Custom.tpl *}
|
||||
|
||||
{include file="CRM/Contact/Form/Search/Custom.tpl"}
|
|
@ -0,0 +1,52 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{* No matches for submitted search request or viewing an empty group. *}
|
||||
<div class="messages status no-popup">
|
||||
<div class="icon inform-icon"></div>
|
||||
{if $context EQ 'smog'}
|
||||
{capture assign=crmURL}{crmURL q="context=amtg&amtgID=`$group.id`&reset=1"}{/capture}{ts 1=$group.title 2=$crmURL}%1 has no contacts which match your search criteria. You can <a href='%2'>add contacts here.</a>{/ts}
|
||||
{else}
|
||||
{if $qill}{ts}No matches found for:{/ts}
|
||||
{include file="CRM/common/displaySearchCriteria.tpl"}
|
||||
<br />
|
||||
{else}
|
||||
{ts}None found.{/ts}
|
||||
{/if}
|
||||
{ts}Suggestions:{/ts}
|
||||
<ul>
|
||||
<li>{ts}check your spelling{/ts}</li>
|
||||
<li>{ts}try a different spelling or use fewer letters{/ts}</li>
|
||||
<li>{ts}if you are searching within a Group or for Tagged contacts, try 'any group' or 'any tag'{/ts}</li>
|
||||
{if $context NEQ 'Profile'}
|
||||
{capture assign=crmURLI}{crmURL p='civicrm/contact/add' q='ct=Individual&reset=1'}{/capture}
|
||||
{capture assign=crmURLO}{crmURL p='civicrm/contact/add' q='ct=Organization&reset=1'}{/capture}
|
||||
{capture assign=crmURLH}{crmURL p='civicrm/contact/add' q='ct=Household&reset=1'}{/capture}
|
||||
<li>{ts 1=$crmURLI 2=$crmURLO 3=$crmURLH}add a <a href='%1'>New Individual</a>, <a href='%2'>Organization</a> or <a href='%3'>Household</a>{/ts}</li>
|
||||
<li>{ts}make sure you have enough privileges in the access control system{/ts}</li>
|
||||
{/if}
|
||||
</ul>
|
||||
{/if}
|
||||
</div>
|
|
@ -0,0 +1,51 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{* $context indicates where we are searching, values = "search,advanced,smog,amtg" *}
|
||||
{* smog = 'show members of group'; amtg = 'add members to group' *}
|
||||
{if $context EQ 'smog'}
|
||||
{* Provide link to modify smart group search criteria if we are viewing a smart group (ssID = saved search ID) *}
|
||||
{if !empty($ssID)}
|
||||
{if $ssMappingID}
|
||||
{capture assign=editSmartGroupURL}{crmURL p="civicrm/contact/search/builder" q="reset=1&force=1&ssID=`$ssID`"}{/capture}
|
||||
{elseif $savedSearch.search_custom_id}
|
||||
{capture assign=editSmartGroupURL}{crmURL p="civicrm/contact/search/custom" q="reset=1&force=1&ssID=`$ssID`"}{/capture}
|
||||
{else}
|
||||
{capture assign=editSmartGroupURL}{crmURL p="civicrm/contact/search/advanced" q="reset=1&force=1&ssID=`$ssID`"}{/capture}
|
||||
{/if}
|
||||
<div class="crm-submit-buttons">
|
||||
<a href="{$editSmartGroupURL}" class="button no-popup"><span><i class="crm-i fa-pencil"></i> {ts 1=$group.title}Edit Smart Group Search Criteria for %1{/ts}</span></a>
|
||||
{help id="id-edit-smartGroup"}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if $permissionedForGroup}
|
||||
{capture assign=addMembersURL}{crmURL q="context=amtg&amtgID=`$group.id`&reset=1"}{/capture}
|
||||
<div class="crm-submit-buttons">
|
||||
<a href="{$addMembersURL}" class="button no-popup"><span><i class="crm-i fa-user-plus"></i> {ts 1=$group.title}Add Contacts to %1{/ts}</span></a>
|
||||
{if $ssID}{help id="id-add-to-smartGroup"}{/if}
|
||||
</div>
|
||||
{/if}
|
||||
{/if}
|
|
@ -0,0 +1,97 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{* Form elements for displaying and running action tasks on search results *}
|
||||
{capture assign=advSearchURL}
|
||||
{if $context EQ 'smog'}{crmURL p='civicrm/group/search/advanced' q="gid=`$group.id`&reset=1&force=1"}
|
||||
{elseif $context EQ 'amtg'}{crmURL p='civicrm/contact/search/advanced' q="context=amtg&amtgID=`$group.id`&reset=1&force=1"}
|
||||
{else}{crmURL p='civicrm/contact/search/advanced' q="reset=1"}
|
||||
{/if}{/capture}
|
||||
{capture assign=searchBuilderURL}{crmURL p='civicrm/contact/search/builder' q="reset=1"}{/capture}
|
||||
|
||||
<div id="search-status">
|
||||
<div class="float-right right">
|
||||
{if $action eq 256}
|
||||
<a href="{$advSearchURL}">» {ts}Advanced Search{/ts}</a><br />
|
||||
{if $context eq 'search'} {* Only show Search Builder link for basic search. *}
|
||||
<a href="{$searchBuilderURL}">» {ts}Search Builder{/ts}</a><br />
|
||||
{/if}
|
||||
{if $context eq 'smog'}
|
||||
{help id="id-smog-criteria" group_id=$group.id group_title=$group.title ssID=$ssID ssMappingID=$ssMappingID permissionedForGroup=$permissionedForGroup}
|
||||
{elseif $context eq 'amtg'}
|
||||
{help id="id-amtg-criteria" group_title=$group.title}
|
||||
{else}
|
||||
{help id="id-basic-criteria"}
|
||||
{/if}
|
||||
{elseif $action eq 512}
|
||||
<a href="{$searchBuilderURL}">» {ts}Search Builder{/ts}</a><br />
|
||||
{elseif $action eq 8192}
|
||||
<a href="{$advSearchURL}">» {ts}Advanced Search{/ts}</a><br />
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
<table class="form-layout-compressed">
|
||||
<tr>
|
||||
<td class="font-size12pt" style="width: 30%;">
|
||||
{if $savedSearch.name}{$savedSearch.name} ({ts}smart group{/ts}) - {/if}
|
||||
{ts count=$pager->_totalItems plural='%count Contacts'}%count Contact{/ts}
|
||||
</td>
|
||||
|
||||
{* Search criteria are passed to tpl in the $qill array *}
|
||||
<td class="nowrap">
|
||||
{if $qill}
|
||||
{include file="CRM/common/displaySearchCriteria.tpl"}
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="font-size11pt"> {ts}Select Records{/ts}:</td>
|
||||
<td class="nowrap">
|
||||
{assign var="checked" value=$selectedContactIds|@count}
|
||||
{$form.radio_ts.ts_all.html} <label for="{$ts_all_id}">{ts count=$pager->_totalItems plural='All %count records'}The found record{/ts}</label>
|
||||
{if $pager->_totalItems > 1}
|
||||
{$form.radio_ts.ts_sel.html} <label for="{$ts_sel_id}">{ts 1="<span>$checked</span>"}%1 Selected records only{/ts}</label>
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
{* Hide export button in 'Add Members to Group' context. *}
|
||||
{if $context NEQ 'amtg'}
|
||||
{$form.task.html}
|
||||
{/if}
|
||||
{if $action eq 512}
|
||||
{$form._qf_Advanced_next_action.html}
|
||||
{elseif $action eq 8192}
|
||||
{$form._qf_Builder_next_action.html}
|
||||
{elseif $action eq 16384}
|
||||
{$form._qf_Custom_next_action.html}
|
||||
{else}
|
||||
{$form._qf_Basic_next_action.html}
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
|
@ -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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{* template for search builder *}
|
||||
<div id="map-field">
|
||||
{strip}
|
||||
{section start=1 name=blocks loop=$blockCount}
|
||||
{assign var="x" value=$smarty.section.blocks.index}
|
||||
<div class="crm-search-block">
|
||||
<h3>{if $x eq 1}{ts}Include contacts where{/ts}{else}{ts}Also include contacts where{/ts}{/if}</h3>
|
||||
<table>
|
||||
{section name=cols loop=$columnCount[$x]}
|
||||
{assign var="i" value=$smarty.section.cols.index}
|
||||
<tr>
|
||||
<td class="form-item even-row">
|
||||
{$form.mapper[$x][$i].html}
|
||||
{$form.operator[$x][$i].html|crmAddClass:'required'}
|
||||
<span class="crm-search-value" id="crm_search_value_{$x}_{$i}">
|
||||
{$form.value[$x][$i].html|crmAddClass:'required'}
|
||||
</span>
|
||||
{if $i gt 0 or $x gt 1}
|
||||
<a href="#" class="crm-reset-builder-row crm-hover-button" title="{ts}Remove this row{/ts}"><i class="crm-i fa-times"></i></a>
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
{/section}
|
||||
|
||||
<tr class="crm-search-builder-add-row">
|
||||
<td class="form-item even-row underline-effect">
|
||||
{$form.addMore[$x].html}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
{/section}
|
||||
<h3 class="crm-search-builder-add-block underline-effect">{$form.addBlock.html}</h3>
|
||||
{/strip}
|
||||
</div>
|
|
@ -0,0 +1,160 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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/common/pager.tpl" location="top"}
|
||||
|
||||
{include file="CRM/common/pagerAToZ.tpl"}
|
||||
<a href="#" class="crm-selection-reset crm-hover-button"><i class="crm-i fa-times-circle-o"></i> {ts}Reset all selections{/ts}</a>
|
||||
|
||||
<table summary="{ts}Search results listings.{/ts}" class="selector row-highlight">
|
||||
<thead class="sticky">
|
||||
<tr>
|
||||
<th scope="col" title="Select All Rows">{$form.toggleSelect.html}</th>
|
||||
{if $context eq 'smog'}
|
||||
<th scope="col">
|
||||
{ts}Status{/ts}
|
||||
</th>
|
||||
{/if}
|
||||
{foreach from=$columnHeaders item=header}
|
||||
<th scope="col">
|
||||
{if $header.sort}
|
||||
{assign var='key' value=$header.sort}
|
||||
{$sort->_response.$key.link}
|
||||
{else}
|
||||
{$header.name}
|
||||
{/if}
|
||||
</th>
|
||||
{/foreach}
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
{counter start=0 skip=1 print=false}
|
||||
|
||||
{ if $id }
|
||||
{foreach from=$rows item=row}
|
||||
<tr id='rowid{$row.contact_id}' class="{cycle values='odd-row,even-row'}">
|
||||
{assign var=cbName value=$row.checkbox}
|
||||
<td>{$form.$cbName.html}</td>
|
||||
{if $context eq 'smog'}
|
||||
{if $row.status eq 'Pending'}<td class="status-pending"}>
|
||||
{elseif $row.status eq 'Removed'}<td class="status-removed">
|
||||
{else}<td>{/if}
|
||||
{$row.status}</td>
|
||||
{/if}
|
||||
<td>{$row.contact_type}</td>
|
||||
<td><a href="{crmURL p='civicrm/contact/view' q="reset=1&cid=`$row.contact_id`&key=`$qfKey`&context=`$context`"}">{$row.sort_name}</a></td>
|
||||
{foreach from=$row item=value key=key}
|
||||
{if ($key neq "checkbox") and ($key neq "action") and ($key neq "contact_type") and ($key neq "contact_type_orig") and ($key neq "status") and ($key neq "sort_name") and ($key neq "contact_id")and ($key neq "contact_sub_type")}
|
||||
<td>
|
||||
{if $key EQ "household_income_total" }
|
||||
{$value|crmMoney}
|
||||
{elseif strpos( $key, '_date' ) !== false }
|
||||
{$value|crmDate}
|
||||
{else}
|
||||
{$value}
|
||||
{/if}
|
||||
|
||||
</td>
|
||||
{/if}
|
||||
{/foreach}
|
||||
<td>{$row.action|replace:'xx':$row.contact_id}</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
{else}
|
||||
{foreach from=$rows item=row}
|
||||
<tr id="rowid{$row.contact_id}" class="{cycle values='odd-row,even-row'}">
|
||||
{assign var=cbName value=$row.checkbox}
|
||||
<td>{$form.$cbName.html}</td>
|
||||
{if $context eq 'smog'}
|
||||
{if $row.status eq 'Pending'}<td class="status-pending"}>
|
||||
{elseif $row.status eq 'Removed'}<td class="status-removed">
|
||||
{else}<td>{/if}
|
||||
{$row.status}</td>
|
||||
{/if}
|
||||
<td>{$row.contact_type}</td>
|
||||
<td><a href="{crmURL p='civicrm/contact/view' q="reset=1&cid=`$row.contact_id`&key=`$qfKey`&context=`$context`"}">{if $row.is_deleted}<del>{/if}{$row.sort_name}{if $row.is_deleted}</del>{/if}</a></td>
|
||||
{if $action eq 512 or $action eq 256}
|
||||
{if !empty($columnHeaders.street_address)}
|
||||
<td><span title="{$row.street_address|escape}">{$row.street_address|mb_truncate:22:"...":true}{if $row.do_not_mail} <span class="icon privacy-flag do-not-mail"></span>{/if}</span></td>
|
||||
{/if}
|
||||
{if !empty($columnHeaders.city)}
|
||||
<td>{$row.city}</td>
|
||||
{/if}
|
||||
{if !empty($columnHeaders.state_province)}
|
||||
<td>{$row.state_province}</td>
|
||||
{/if}
|
||||
{if !empty($columnHeaders.postal_code)}
|
||||
<td>{$row.postal_code}</td>
|
||||
{/if}
|
||||
{if !empty($columnHeaders.country)}
|
||||
<td>{$row.country}</td>
|
||||
{/if}
|
||||
<td>
|
||||
{if $row.email}
|
||||
<span title="{$row.email|escape}">
|
||||
{$row.email|mb_truncate:17:"...":true}
|
||||
{if $row.on_hold}
|
||||
(On Hold)<span class="status-hold" title="{ts}This email is on hold (probably due to bouncing).{/ts}"></span>
|
||||
{elseif $row.do_not_email}
|
||||
<span class="icon privacy-flag do-not-email" title="{ts}Do Not Email{/ts}"></span>
|
||||
{/if}
|
||||
</span>
|
||||
{/if}
|
||||
</td>
|
||||
<td>
|
||||
{if $row.phone}
|
||||
{$row.phone}
|
||||
{if $row.do_not_phone}
|
||||
<span class="icon privacy-flag do-not-phone" title="{ts}Do Not Phone{/ts}" ></span>
|
||||
{/if}
|
||||
{/if}
|
||||
</td>
|
||||
{else}
|
||||
{foreach from=$row item=value key=key}
|
||||
{if ($key neq "checkbox") and ($key neq "action") and ($key neq "contact_type") and ($key neq "contact_sub_type") and ($key neq "status") and ($key neq "sort_name") and ($key neq "contact_id") and ($key neq "contact_type_orig")}
|
||||
<td>{$value} </td>
|
||||
{/if}
|
||||
{/foreach}
|
||||
{/if}
|
||||
<td style='width:125px;'>{$row.action|replace:'xx':$row.contact_id}</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
{/if}
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
{literal}
|
||||
CRM.$(function($) {
|
||||
// Clear any old selection that may be lingering in quickform
|
||||
$("input.select-row, input.select-rows", 'form.crm-search-form').prop('checked', false).closest('tr').removeClass('crm-row-selected');
|
||||
// Retrieve stored checkboxes
|
||||
var cids = {/literal}{$selectedContactIds|@json_encode}{literal};
|
||||
if (cids.length > 0) {
|
||||
$('#mark_x_' + cids.join(',#mark_x_') + ',input[name=radio_ts][value=ts_sel]').prop('checked', true);
|
||||
}
|
||||
});
|
||||
{/literal}
|
||||
</script>
|
||||
{include file="CRM/common/pager.tpl" location="bottom"}
|
|
@ -0,0 +1,117 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{* template for handling share address functionality*}
|
||||
<tr>
|
||||
<td>
|
||||
{$form.address.$blockId.use_shared_address.html}{$form.address.$blockId.use_shared_address.label} {help id="id-sharedAddress" file="CRM/Contact/Form/Contact.hlp"}
|
||||
<div id="shared-address-{$blockId}" class="form-layout-compressed">
|
||||
{$form.address.$blockId.master_contact_id.label}
|
||||
{$form.address.$blockId.master_contact_id.html}
|
||||
<div class="shared-address-list">
|
||||
{if !empty($sharedAddresses.$blockId.shared_address_display)}
|
||||
{foreach item='sa' from=$sharedAddresses.$blockId.shared_address_display.options}
|
||||
{assign var="sa_name" value="selected_shared_address-`$blockId`"}
|
||||
{assign var="sa_id" value="`$sa_name`-`$sa.id`"}
|
||||
<input type="radio" name="{$sa_name}" id="{$sa_id}" value="{$sa.id}" {if $sa.id eq $sharedAddresses.$blockId.shared_address_display.master_id}checked="checked"{/if}>
|
||||
<label for="{$sa_id}">{$sa.display_text}</label>{if $sa.location_type}({$sa.location_type}){/if}<br/>
|
||||
{/foreach}
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
{literal}
|
||||
<script type="text/javascript">
|
||||
CRM.$(function($) {
|
||||
var blockNo = {/literal}{$blockId}{literal},
|
||||
$contentArea = $('#shared-address-' + blockNo + ' .shared-address-list'),
|
||||
$masterElement = $('input[name="address[' + blockNo + '][master_id]"]');
|
||||
|
||||
function showHideSharedAddress() {
|
||||
// based on checkbox, show or hide
|
||||
var share = $(this).prop('checked');
|
||||
$('#shared-address-' + blockNo).toggle(!!share);
|
||||
$('table#address_table_' + blockNo +', .crm-address-custom-set-block-' + blockNo).toggle(!share);
|
||||
}
|
||||
|
||||
// "Use another contact's address" checkbox
|
||||
$('#address\\[' + blockNo + '\\]\\[use_shared_address\\]').each(showHideSharedAddress).click(showHideSharedAddress);
|
||||
|
||||
// When an address is selected
|
||||
$contentArea.off().on('click', 'input', function() {
|
||||
$masterElement.val($(this).val());
|
||||
});
|
||||
|
||||
// When shared contact is selected/unselected
|
||||
$('input[name="address[' + blockNo +'][master_contact_id]"]').change(function() {
|
||||
var $el = $(this),
|
||||
sharedContactId = $el.val();
|
||||
|
||||
$contentArea.html('');
|
||||
$masterElement.val('');
|
||||
|
||||
if (!sharedContactId || isNaN(sharedContactId)) {
|
||||
return;
|
||||
}
|
||||
|
||||
$.post(CRM.url('civicrm/ajax/inline'), {
|
||||
'contact_id': sharedContactId,
|
||||
'type': 'method',
|
||||
'class_name': 'CRM_Contact_Page_AJAX',
|
||||
'fn_name': 'getAddressDisplay'
|
||||
},
|
||||
function(response) {
|
||||
// Avoid race conditions - check that value hasn't been changed by the user while we were waiting for response
|
||||
if (response && $el.val() === sharedContactId) {
|
||||
var selected = ' checked="checked"',
|
||||
addressHTML = '';
|
||||
|
||||
$.each(response, function(i, val) {
|
||||
if (addressHTML) {
|
||||
selected = '';
|
||||
} else {
|
||||
$('input[name="address[' + blockNo + '][master_id]"]').val(val.id);
|
||||
}
|
||||
var name = 'selected_shared_address-'+ blockNo,
|
||||
id = name + '-' + val.id;
|
||||
addressHTML += '<input type="radio" name="' + name + '" id="' + id + '" value="' + val.id + '"' + selected +'><label for="' + id + '">' + val.display_text + '</label>('+val.location_type+')<br/>';
|
||||
});
|
||||
|
||||
if (!addressHTML) {
|
||||
addressHTML = {/literal}"{ts escape='js'}Selected contact does not have an address. Please edit that contact to add an address, or select a different contact.{/ts}"{literal};
|
||||
}
|
||||
|
||||
$contentArea.html(addressHTML);
|
||||
}
|
||||
},'json');
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{/literal}
|
||||
|
||||
|
104
sites/all/modules/civicrm/templates/CRM/Contact/Form/Task.tpl
Normal file
104
sites/all/modules/civicrm/templates/CRM/Contact/Form/Task.tpl
Normal 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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{ts 1=$totalSelectedContacts}Number of selected contacts: %1{/ts}
|
||||
|
||||
{if $searchtype eq 'ts_sel'}
|
||||
<div id="popupContainer">
|
||||
<table id="selectedRecords-{$group.id}" class="display crm-copy-fields crm-sortable">
|
||||
<thead>
|
||||
<tr class="columnheader">
|
||||
<th class="contact_details">{ts}Name{/ts}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
{foreach from=$value item='row'}
|
||||
<tr class="{cycle values="odd-row,even-row"}">
|
||||
<td class="name">{$row}</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div><br />
|
||||
<a href="#" id="popup-button" title="{ts}View Selected Contacts{/ts}">{ts}View Selected Contacts{/ts}</a>
|
||||
{/if}
|
||||
|
||||
{if $searchtype eq 'ts_sel'}
|
||||
{literal}
|
||||
<script type="text/javascript">
|
||||
CRM.$(function($) {
|
||||
$("#popupContainer").css({
|
||||
"background-color":"#E0E0E0",
|
||||
'display':'none'
|
||||
});
|
||||
|
||||
$("#popup-button").click(function() {
|
||||
$("#popupContainer").dialog({
|
||||
title: {/literal}"{ts escape='js'}Selected Contacts{/ts}"{literal},
|
||||
width:700,
|
||||
height:500,
|
||||
modal: true,
|
||||
overlay: {
|
||||
opacity: 0.5,
|
||||
background: "black"
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
|
||||
var count = 0; var columns = ''; var sortColumn = '';
|
||||
$('#selectedRecords-{/literal}{$group.id}{literal} th').each(function() {
|
||||
if ($(this).attr('class') == 'contact_details') {
|
||||
sortColumn += '[' + count + ', "asc" ],';
|
||||
columns += '{"sClass": "contact_details"},';
|
||||
}
|
||||
else {
|
||||
columns += '{ "bSortable": false },';
|
||||
}
|
||||
count++;
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
{/literal}
|
||||
{/if}
|
||||
|
||||
{if $rows}
|
||||
<div class="form-item">
|
||||
<table width="30%">
|
||||
<tr class="columnheader">
|
||||
<th>{ts}Name{/ts}</th>
|
||||
</tr>
|
||||
{foreach from=$rows item=row}
|
||||
<tr class="{cycle values="odd-row,even-row"}">
|
||||
<td>{$row.displayName}</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</table>
|
||||
</div>
|
||||
{/if}
|
|
@ -0,0 +1,85 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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-contact-task-addtogroup-form-block">
|
||||
<table class="form-layout">
|
||||
{if $group.id}
|
||||
<tr class="crm-contact-task-addtogroup-form-block-group_id">
|
||||
<td class="label">{ts}Group{/ts}</td>
|
||||
<td>{$form.group_id.html}</td>
|
||||
</tr>
|
||||
{else}
|
||||
<tr><td>{$form.group_option.html}</td></tr>
|
||||
<tr id="id_existing_group">
|
||||
<td>
|
||||
<table class="form-layout">
|
||||
<tr><td class="label">{$form.group_id.label}<span class="crm-marker">*</span></td><td>{$form.group_id.html}</td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="id_new_group" class="html-adjust">
|
||||
<td>
|
||||
<table class="form-layout">
|
||||
<tr class="crm-contact-task-addtogroup-form-block-title">
|
||||
<td class="label">{$form.title.label}<span class="crm-marker">*</span></td>
|
||||
<td>{$form.title.html}</td>
|
||||
<tr>
|
||||
<tr class="crm-contact-task-addtogroup-form-block-description">
|
||||
<td class="label">{$form.description.label}</td>
|
||||
<td>{$form.description.html}</td></tr>
|
||||
{if $form.group_type}
|
||||
<tr class="crm-contact-task-addtogroup-form-block-group_type">
|
||||
<td class="label">{$form.group_type.label}</td>
|
||||
<td>{$form.group_type.html}</td>
|
||||
</tr>
|
||||
{/if}
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
</table>
|
||||
<table class="form-layout">
|
||||
<tr><td>{include file="CRM/Contact/Form/Task.tpl"}</td></tr>
|
||||
</table>
|
||||
<div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="bottom"}</div>
|
||||
</div>
|
||||
{include file="CRM/common/showHide.tpl"}
|
||||
|
||||
{if !$group.id}
|
||||
{literal}
|
||||
<script type="text/javascript">
|
||||
showElements();
|
||||
function showElements() {
|
||||
if ( document.getElementsByName('group_option')[0].checked ) {
|
||||
cj('#id_existing_group').show();
|
||||
cj('#id_new_group').hide();
|
||||
} else {
|
||||
cj('#id_new_group').show();
|
||||
cj('#id_existing_group').hide();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
{/literal}
|
||||
{/if}
|
|
@ -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/Contact/Form/Task/AddToParentClass.tpl"}
|
|
@ -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/Contact/Form/Task/AddToParentClass.tpl"}
|
|
@ -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/Contact/Form/Task/AddToParentClass.tpl"}
|
|
@ -0,0 +1,111 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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="class" value="_qf_AddTo"|cat:$contactType}
|
||||
{assign var="refresh" value="$class"|cat:"_refresh"}
|
||||
{assign var="cancel" value="$class"|cat:"_cancel"}
|
||||
<div class="crm-block crm-form-block crm-contact-task-addto{$contactType}-form-block">
|
||||
<div class="help">
|
||||
{ts 1=$contactType}Choose Relationship Type and Target %1{/ts}
|
||||
</div>
|
||||
<table class="form-layout-compressed">
|
||||
<tr><td></td><td>{include file="CRM/Contact/Form/Task.tpl"}</td></tr>
|
||||
{if $action EQ 2} {* action = update *}
|
||||
<tr><td><label>{$sort_name}</label></td></tr>
|
||||
{else} {* action = add *}
|
||||
<tr class="crm-contact-task-addto{$contactType}-form-block-relationship_type_id">
|
||||
<td>{$form.relationship_type_id.label}</td>
|
||||
<td>{$form.relationship_type_id.html}</td>
|
||||
</tr>
|
||||
<tr><td></td></tr>
|
||||
<tr class="crm-contact-task-addto{$contactType}-form-block-name">
|
||||
<td>{$form.name.label}</td>
|
||||
<td>{$form.name.html}</td>
|
||||
</tr>
|
||||
<tr><td></td><td>{$form.$refresh.html} {$form.$cancel.html}</td></tr>
|
||||
</table>
|
||||
{if $searchDone } {* Search button clicked *}
|
||||
{if $searchCount}
|
||||
{if $searchRows} {* we've got rows to display *}
|
||||
<fieldset><legend>{ts}Mark Target Contact(s) for this Relationship{/ts}</legend>
|
||||
<div class="description">
|
||||
{ts}Mark the target contact(s) for this relationship if it appears below. Otherwise you may modify the search name above and click Search again.{/ts}
|
||||
</div>
|
||||
{strip}
|
||||
<table>
|
||||
<tr class="columnheader">
|
||||
<td> </td>
|
||||
<td>{ts}Name{/ts}</td>
|
||||
<td>{ts}City{/ts}</td>
|
||||
<td>{ts}State{/ts}</td>
|
||||
<td>{ts}Email{/ts}</td>
|
||||
<td>{ts}Phone{/ts}</td>
|
||||
</tr>
|
||||
{foreach from=$searchRows item=row}
|
||||
<tr class="{cycle values="odd-row,even-row"}">
|
||||
<td>{$form.contact_check[$row.id].html}</td>
|
||||
<td>{$row.type} {$row.name}</td>
|
||||
<td>{$row.city}</td>
|
||||
<td>{$row.state}</td>
|
||||
<td>{$row.email}</td>
|
||||
<td>{$row.phone}</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</table>
|
||||
{/strip}
|
||||
</fieldset>
|
||||
{else} {* too many results - we're only displaying 50 *}
|
||||
</div></fieldset>
|
||||
{capture assign=infoTitle}{ts}Too many matching results{/ts}{/capture}
|
||||
{capture assign=infoMessage}{ts}Please narrow your search by entering a more complete target contact name.{/ts}{/capture}
|
||||
{include file="CRM/common/info.tpl"}
|
||||
{/if}
|
||||
{else} {* no valid matches for name + contact_type *}
|
||||
</div></fieldset>
|
||||
{capture assign=infoTitle}{ts}No matching results for{/ts}{/capture}
|
||||
{capture assign=infoMessage}<ul><li>{ts 1=$form.name.value}Name like: %1{/ts}</li><li>{ts 1=$contact_type_display}Contact Type: %1{/ts}</li></ul>{ts}Check your spelling, or try fewer letters for the target contact name.{/ts}{/capture}
|
||||
{include file="CRM/common/info.tpl"}
|
||||
{/if} {* end if searchCount *}
|
||||
{else}
|
||||
</div></fieldset>
|
||||
{/if} {* end if searchDone *}
|
||||
{/if} {* end action = add *}
|
||||
|
||||
{* Only show buttons if action=update, OR if we have $contacts (results)*}
|
||||
{if $searchRows OR $action EQ 2}
|
||||
<div class="form-item">
|
||||
|
||||
<div class="description">
|
||||
|
||||
</div>
|
||||
<div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl"}</div>
|
||||
</div>
|
||||
<div class="form-item">
|
||||
{$form.status.label} {$form.status.html}
|
||||
</div>
|
||||
|
||||
|
||||
</div></fieldset>
|
||||
{/if}
|
|
@ -0,0 +1,52 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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-form-block crm-block crm-contact-task-addtotag-form-block">
|
||||
<h3>
|
||||
{ts}Tag Contact(s){/ts}
|
||||
</h3>
|
||||
<div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
|
||||
<table class="form-layout-compressed">
|
||||
<tr class="crm-contact-task-addtotag-form-block-tag">
|
||||
<td>
|
||||
<div class="listing-box">
|
||||
{foreach from=$form.tag item="tag_val"}
|
||||
<div class="{cycle values="odd-row,even-row"}">
|
||||
{$tag_val.html}
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{include file="CRM/common/Tagset.tpl"}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td>{include file="CRM/Contact/Form/Task.tpl"}</td></tr>
|
||||
</table>
|
||||
<div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="bottom"}</div>
|
||||
</div>
|
|
@ -0,0 +1,48 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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-form-block crm-block crm-contact-task-addtodonot-form-block">
|
||||
<h3>
|
||||
{ts}Add 'Do Not...' Contact(s) Preferences{/ts}
|
||||
</h3>
|
||||
<div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
|
||||
<table class="form-layout-compressed">
|
||||
<tr><td>{$form.actionTypeOption.html}</td></tr>
|
||||
<tr class="crm-contact-task-addtodonot-form-block-pref">
|
||||
<td>
|
||||
<div class="listing-box">
|
||||
{foreach from=$form.pref item="pref_val"}
|
||||
<div class="{cycle values="odd-row,even-row"}">
|
||||
{$pref_val.html}
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td>{include file="CRM/Contact/Form/Task.tpl"}</td></tr>
|
||||
</table>
|
||||
<div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="bottom"}</div>
|
||||
</div>
|
|
@ -0,0 +1,97 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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="batch-update crm-form-block crm-contact-task-batch-form-block">
|
||||
<div class="help">
|
||||
{ts}Update field values for each contact as needed. Click <strong>Update Contacts</strong> below to save all your changes. To set a field to the same value for ALL rows, enter that value for the first contact and then click the <strong>Copy icon</strong> (next to the column title).{/ts}
|
||||
</div>
|
||||
<table class="crm-copy-fields">
|
||||
<thead class="sticky">
|
||||
<tr class="columnheader">
|
||||
<td>{ts}Name{/ts}</td>
|
||||
{foreach from=$fields item=field key=fieldName}
|
||||
{if $field.skipDisplay}
|
||||
{continue}
|
||||
{/if}
|
||||
<td><img src="{$config->resourceBase}i/copy.png" alt="{ts 1=$field.title}Click to copy %1 from row one to all rows.{/ts}" fname="{$field.name}" class="action-icon" title="{ts}Click here to copy the value in row one to ALL rows.{/ts}" />{$field.title}</td>
|
||||
{/foreach}
|
||||
</tr>
|
||||
</thead>
|
||||
{foreach from=$componentIds item=cid}
|
||||
<tr class="{cycle values="odd-row,even-row"}" entity_id="{$cid}">
|
||||
<td>{$sortName.$cid}</td>
|
||||
{foreach from=$fields item=field key=fieldName}
|
||||
{if $field.skipDisplay}
|
||||
{continue}
|
||||
{/if}
|
||||
{assign var=n value=$field.name}
|
||||
{if $field.options_per_line}
|
||||
<td class="compressed">
|
||||
{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=optionOuter key=optionKey item=optionItem from=$form.field.$cid.$n}
|
||||
{if $index < 10}
|
||||
{assign var="index" value=`$index+1`}
|
||||
{else}
|
||||
<td class="labels font-light">{$form.field.$cid.$n.$optionKey.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}
|
||||
</td>
|
||||
{elseif $n|substr:0:5 eq 'phone'}
|
||||
<td class="compressed">
|
||||
{assign var="phone_ext_field" value=$n|replace:'phone':'phone_ext'}
|
||||
{$form.field.$cid.$n.html}
|
||||
{if $form.field.$cid.$phone_ext_field.html}
|
||||
{$form.field.$cid.$phone_ext_field.html}
|
||||
{/if}
|
||||
</td>
|
||||
{else}
|
||||
<td class="compressed">{$form.field.$cid.$n.html}</td>
|
||||
{/if}
|
||||
{/foreach}
|
||||
{/foreach}
|
||||
</tr>
|
||||
</table>
|
||||
{if $fields}{$form._qf_BatchUpdateProfile_refresh.html}{/if} <div class="crm-submit-buttons">{$form.buttons.html}</div>
|
||||
|
||||
</div>
|
||||
|
||||
{*include batch copy js js file*}
|
||||
{include file="CRM/common/batchCopy.tpl"}
|
||||
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue