fix year in headers
[civicrm-core.git] / templates / CRM / Case / Form / Activity / LinkCases.tpl
CommitLineData
6a488035
TO
1{*
2 +--------------------------------------------------------------------+
2c4c49ca 3 | CiviCRM version 4.7 |
6a488035 4 +--------------------------------------------------------------------+
2a73d3b0 5 | Copyright CiviCRM LLC (c) 2004-2017 |
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*}
53532066 26{* Template for to create a link between two cases. *}
6a488035 27 <div class="crm-block crm-form-block crm-case-linkcases-form-block">
f72119d9
CW
28 <tr class="crm-case-linkcases-form-block-link_to_case_id">
29 <td class="label">{$form.link_to_case_id.label}</td>
30 <td>{$form.link_to_case_id.html}</td>
6a488035
TO
31 </tr>
32
33{literal}
34<script type="text/javascript">
3cc60a06 35 CRM.$(function($) {
b50fdacc 36 var $form = $("form.{/literal}{$form.formClass}{literal}");
abd06efc 37 $('input[name=link_to_case_id]', $form).change(function() {
f72119d9
CW
38 if ($(this).val()) {
39 var info = $(this).select2('data').extra;
40 {/literal}{* Mix in variables and placeholders for clientside substitution *}
abd06efc 41 var subject = "{ts escape=js 1="%1" 2="%2" 3="%3" 4=$sortName 5=$caseTypeLabel 6=$caseID}Create link between %1 - %2 (CaseID: %3) and %4 - %5 (CaseID: %6){/ts}";
f72119d9 42 {literal}
abd06efc 43 $('#subject', $form).val(ts(subject, {1: info['contact_id.sort_name'], 2: info['case_id.case_type_id.title'], 3: $(this).val()}));
f72119d9
CW
44 }
45 });
46 });
6a488035
TO
47</script>
48{/literal}
232624b1 49 </div>