Commit | Line | Data |
---|---|---|
6a488035 TO |
1 | {* |
2 | +--------------------------------------------------------------------+ | |
fee14197 | 3 | | CiviCRM version 5 | |
6a488035 | 4 | +--------------------------------------------------------------------+ |
8c9251b3 | 5 | | Copyright CiviCRM LLC (c) 2004-2018 | |
6a488035 TO |
6 | +--------------------------------------------------------------------+ |
7 | | This file is a part of CiviCRM. | | |
8 | | | | |
9 | | CiviCRM is free software; you can copy, modify, and distribute it | | |
10 | | under the terms of the GNU Affero General Public License | | |
11 | | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. | | |
12 | | | | |
13 | | CiviCRM is distributed in the hope that it will be useful, but | | |
14 | | WITHOUT ANY WARRANTY; without even the implied warranty of | | |
15 | | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | | |
16 | | See the GNU Affero General Public License for more details. | | |
17 | | | | |
18 | | You should have received a copy of the GNU Affero General Public | | |
19 | | License and the CiviCRM Licensing Exception along | | |
20 | | with this program; if not, contact CiviCRM LLC | | |
21 | | at info[AT]civicrm[DOT]org. If you have questions about the | | |
22 | | GNU Affero General Public License or the licensing of CiviCRM, | | |
23 | | see the CiviCRM license FAQ at http://civicrm.org/licensing | | |
24 | +--------------------------------------------------------------------+ | |
25 | *} | |
26 | {* Search form and results for Activities *} | |
27 | <div class="crm-form-block crm-search-form-block"> | |
79d954ae | 28 | <div class="crm-accordion-wrapper crm-advanced_search_form-accordion {if $rows}collapsed{/if}"> |
29 | <div class="crm-accordion-header crm-master-accordion-header"> | |
30 | {ts}Edit Search Criteria{/ts} | |
31 | </div> | |
32 | <!-- /.crm-accordion-header --> | |
33 | <div class="crm-accordion-body"> | |
34 | <div id="searchForm" class="form-item"> | |
35 | {strip} | |
36 | <table class="form-layout"> | |
37 | <tr> | |
f212d37d | 38 | <td class="font-size12pt" colspan="2"> |
79d954ae | 39 | {$form.sort_name.label} {$form.sort_name.html|crmAddClass:'twenty'} |
79d954ae | 40 | <div> |
adb76693 | 41 | <div class="description font-italic">{ts}Complete OR Partial Name{/ts} |
79d954ae | 42 | <span class="contact-name-option option-1">{ts} of the Source Contact{/ts}</span> |
43 | <span class="contact-name-option option-2">{ts} of the Assignee Contact{/ts}</span> | |
44 | <span class="contact-name-option option-3">{ts} of the Target Contact{/ts}</span> | |
45 | </div> | |
46 | </div> | |
47 | </td> | |
f212d37d | 48 | <td>{include file="CRM/common/formButtons.tpl" location="top"}</td> |
79d954ae | 49 | </tr> |
6a488035 | 50 | |
79d954ae | 51 | {include file="CRM/Activity/Form/Search/Common.tpl"} |
6a488035 | 52 | |
79d954ae | 53 | <tr> |
f212d37d | 54 | <td colspan="3">{include file="CRM/common/formButtons.tpl" location="botton"}</td> |
79d954ae | 55 | </tr> |
56 | </table> | |
57 | {/strip} | |
58 | </div> | |
59 | </div> | |
6a488035 TO |
60 | </div> |
61 | </div> | |
6a488035 TO |
62 | |
63 | {if $rowsEmpty || $rows } | |
637ca83b | 64 | <div class="crm-content-block"> |
65 | {if $rowsEmpty} | |
66 | <div class="crm-results-block crm-results-block-empty"> | |
67 | {include file="CRM/Activity/Form/Search/EmptyResults.tpl"} | |
68 | </div> | |
69 | {/if} | |
6a488035 | 70 | |
637ca83b | 71 | {if $rows} |
72 | <div class="crm-results-block"> | |
73 | {* Search request has returned 1 or more matching rows. *} | |
6a488035 | 74 | |
637ca83b | 75 | {* This section handles form elements for action task select and submit *} |
76 | <div class="crm-search-tasks"> | |
77 | {include file="CRM/common/searchResultTasks.tpl"} | |
78 | </div> | |
79 | {* This section displays the rows along and includes the paging controls *} | |
80 | <div class="crm-search-results"> | |
81 | {include file="CRM/Activity/Form/Selector.tpl" context="Search"} | |
82 | </div> | |
83 | {* END Actions/Results section *} | |
84 | </div> | |
85 | {/if} | |
86 | </div> | |
6a488035 TO |
87 | {/if} |
88 | {literal} | |
637ca83b | 89 | <script type="text/javascript"> |
3cc60a06 | 90 | CRM.$(function($) { |
b50fdacc CW |
91 | var $form = $('form.{/literal}{$form.formClass}{literal}'), |
92 | roleId = $('input[name=activity_role]:checked', $form).val(); | |
6645771e | 93 | if (roleId) { |
ae8f569f | 94 | $('.description .option-' + roleId).show(); |
6645771e | 95 | } |
96 | ||
ae8f569f CW |
97 | $('[name=activity_role]:input').change(function() { |
98 | $('.description .contact-name-option').hide(); | |
99 | if ($(this).is(':checked')) { | |
100 | $('.description .option-' + $(this).val()).show(); | |
101 | } | |
102 | }).change(); | |
637ca83b | 103 | }); |
104 | ||
637ca83b | 105 | |
637ca83b | 106 | </script> |
6a488035 | 107 | {/literal} |