From: Mathieu Lutfy Date: Thu, 25 Jul 2013 18:45:16 +0000 (-0400) Subject: Semi-fix {ts} usage: the mix of js/smarty here isn't very practical. Will be fixed... X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=1ec6f372120f5f6370bcdf9bc0d855282d40b2c1;p=civicrm-core.git Semi-fix {ts} usage: the mix of js/smarty here isn't very practical. Will be fixed when the js is split out in a separate file eventually. --- diff --git a/templates/CRM/Case/Form/CaseView.tpl b/templates/CRM/Case/Form/CaseView.tpl index c6694293bc..cddaec64ab 100644 --- a/templates/CRM/Case/Form/CaseView.tpl +++ b/templates/CRM/Case/Form/CaseView.tpl @@ -415,8 +415,12 @@ oTable.fnDraw(); } else { - var relTypeAdminLink = {/literal}"{crmURL p='civicrm/admin/reltype' q='reset=1' h=0 }"{literal}; - var errorMsg = '{/literal}{ts escape="js" 1="' + relTypeName + '" 2="' + relTypeAdminLink + '"}The relationship type definition for the %1 case role is not valid for the client and / or staff contact types. You can review and edit relationship types at Administer >> Option Lists >> Relationship Types{/ts}{literal}.'; + // This is an awkward mix of smarty and javascript: the relTypeName variable is + // not available in smarty, could not find an i18n-correct way of doing this. + {/literal} + {capture assign=relTypeAdminLink}{crmURL p='civicrm/admin/reltype' q='reset=1' h=0 }{/capture} + {literal} + var errorMsg = relTypeName + ': ' + '{/literal}{ts escape="js" 1="$relTypeAdminLink"}The relationship type definition for the case role is not valid for the client and / or staff contact types. You can review and edit relationship types at Administer >> Option Lists >> Relationship Types.{/ts}{literal}'; //display error message. cj().crmError(errorMsg);