2 +--------------------------------------------------------------------+
3 | Copyright CiviCRM LLC. All rights reserved. |
5 | This work is published under the GNU AGPLv3 license with some |
6 | permitted exceptions and without any warranty. For full license |
7 | and copyright information, see https://civicrm.org/licensing |
8 +--------------------------------------------------------------------+
10 {* Search form and results for Activities *}
11 <div class="crm-form-block crm-search-form-block">
12 <div class="crm-accordion-wrapper crm-advanced_search_form-accordion {if $rows}collapsed{/if}">
13 <div class="crm-accordion-header crm-master-accordion-header">
14 {ts}Edit Search Criteria{/ts}
16 <!-- /.crm-accordion-header -->
17 <div class="crm-accordion-body">
18 <div id="searchForm" class="form-item">
20 <table class="form-layout">
22 <td class="font-size12pt" colspan="2">
23 {$form.sort_name.label} {$form.sort_name.html|crmAddClass:'twenty'}
25 <div class="description font-italic">{ts}Complete OR Partial Name{/ts}
26 <span class="contact-name-option option-1">{ts} of the Source Contact{/ts}</span>
27 <span class="contact-name-option option-2">{ts} of the Assignee Contact{/ts}</span>
28 <span class="contact-name-option option-3">{ts} of the Target Contact{/ts}</span>
32 <td>{include file="CRM/common/formButtons.tpl" location="top"}</td>
35 {include file="CRM/Activity/Form/Search/Common.tpl"}
38 <td colspan="3">{include file="CRM/common/formButtons.tpl" location="botton"}</td>
47 {if $rowsEmpty || $rows }
48 <div class="crm-content-block">
50 <div class="crm-results-block crm-results-block-empty">
51 {include file="CRM/Activity/Form/Search/EmptyResults.tpl"}
56 <div class="crm-results-block">
57 {* Search request has returned 1 or more matching rows. *}
59 {* This section handles form elements for action task select and submit *}
60 <div class="crm-search-tasks">
61 {include file="CRM/common/searchResultTasks.tpl"}
63 {* This section displays the rows along and includes the paging controls *}
64 <div class="crm-search-results">
65 {include file="CRM/Activity/Form/Selector.tpl" context="Search"}
67 {* END Actions/Results section *}
73 <script type="text/javascript">
75 var $form = $('form.{/literal}{$form.formClass}{literal}'),
76 roleId = $('input[name=activity_role]:checked', $form).val();
78 $('.description .option-' + roleId).show();
81 $('[name=activity_role]:input').change(function() {
82 $('.description .contact-name-option').hide();
83 if ($(this).is(':checked')) {
84 $('.description .option-' + $(this).val()).show();