projects
/
civicrm-core.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
CRM-15153 - Give forms a unique css class based on full class name
[civicrm-core.git]
/
templates
/
CRM
/
Case
/
Form
/
Activity
/
LinkCases.tpl
diff --git
a/templates/CRM/Case/Form/Activity/LinkCases.tpl
b/templates/CRM/Case/Form/Activity/LinkCases.tpl
index 67e8ac8c44221259d2fdfb201847777a5ec1908b..3ba4dbeeae9baf50f22cd38e4ebd11e310e77694 100644
(file)
--- a/
templates/CRM/Case/Form/Activity/LinkCases.tpl
+++ b/
templates/CRM/Case/Form/Activity/LinkCases.tpl
@@
-1,8
+1,8
@@
{*
+--------------------------------------------------------------------+
{*
+--------------------------------------------------------------------+
- | CiviCRM version 4.
4
|
+ | CiviCRM version 4.
5
|
+--------------------------------------------------------------------+
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-201
3
|
+ | Copyright CiviCRM LLC (c) 2004-201
4
|
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
@@
-32,11
+32,15
@@
{literal}
<script type="text/javascript">
{literal}
<script type="text/javascript">
-
cj
(function($) {
- var $form = $("
#{/literal}{$form.formName
}{literal}");
- $('input[name=link_to_case_id]', $form).
s
elect2({
+
CRM.$
(function($) {
+ var $form = $("
form.{/literal}{$form.formClass
}{literal}");
+ $('input[name=link_to_case_id]', $form).
crmS
elect2({
placeholder: {/literal}'{ts escape="js"}- select case -{/ts}'{literal},
minimumInputLength: 1,
placeholder: {/literal}'{ts escape="js"}- select case -{/ts}'{literal},
minimumInputLength: 1,
+ formatResult: CRM.utils.formatSelect2Result,
+ formatSelection: function(row) {
+ return row.label;
+ },
ajax: {
url: {/literal}"{crmURL p='civicrm/case/ajax/unclosed' h=0}"{literal},
data: function(term) {
ajax: {
url: {/literal}"{crmURL p='civicrm/case/ajax/unclosed' h=0}"{literal},
data: function(term) {
@@
-50,7
+54,7
@@
if ($(this).val()) {
var info = $(this).select2('data').extra;
{/literal}{* Mix in variables and placeholders for clientside substitution *}
if ($(this).val()) {
var info = $(this).select2('data').extra;
{/literal}{* Mix in variables and placeholders for clientside substitution *}
- var subject = "{ts escape=js 1="%1" 2="%2" 3="%3" 4=$client.sort_name 5=$caseTypeLabel 6=$caseI
d
}Create link between %1 - %2 (CaseID: %3) and %4 - %5 (CaseID: %6){/ts}";
+ var subject = "{ts escape=js 1="%1" 2="%2" 3="%3" 4=$client.sort_name 5=$caseTypeLabel 6=$caseI
D
}Create link between %1 - %2 (CaseID: %3) and %4 - %5 (CaseID: %6){/ts}";
{literal}
$('#subject', $form).val(ts(subject, {1: info.sort_name, 2: info.case_type, 3: $(this).val()}));
}
{literal}
$('#subject', $form).val(ts(subject, {1: info.sort_name, 2: info.case_type, 3: $(this).val()}));
}