Set title properly on Move/Copy/File on Case popup
authorMatthew Wire (MJW Consulting) <mjw@mjwconsult.co.uk>
Sun, 26 May 2019 19:12:35 +0000 (20:12 +0100)
committerMatthew Wire (MJW Consulting) <mjw@mjwconsult.co.uk>
Sat, 1 Jun 2019 17:32:07 +0000 (18:32 +0100)
CRM/Case/Form/ActivityToCase.php
templates/CRM/Case/Form/ActivityToCase.tpl

index d165d4c07984d06810e9ba221959471dfab62dea..547a7ae208ab26653c2df2f3762dab1925464e0a 100644 (file)
@@ -48,6 +48,17 @@ class CRM_Case_Form_ActivityToCase extends CRM_Core_Form {
     $this->_currentCaseId = CRM_Utils_Request::retrieve('caseId', 'Positive');
     $this->assign('currentCaseId', $this->_currentCaseId);
     $this->assign('buildCaseActivityForm', TRUE);
+
+    switch (CRM_Utils_Request::retrieve('fileOnCaseAction', 'String')) {
+      case 'move':
+        CRM_Utils_System::setTitle(ts('Move to Case'));
+        break;
+
+      case 'copy':
+        CRM_Utils_System::setTitle(ts('Copy to Case'));
+        break;
+
+    }
   }
 
   /**
index 524fe7045f97dbb18177552f7b97d0165ca61c66..83cb386b356cb4e7bc876db8eb5e6631ee53ad59 100644 (file)
@@ -60,7 +60,7 @@
     }
 
     var dataUrl = {/literal}"{crmURL p='civicrm/case/addToCase' q='reset=1' h=0}"{literal};
-    dataUrl += '&activityId=' + activityID + '&caseId=' + currentCaseId + '&cid=' + {/literal}"{$contactID}"{literal};
+    dataUrl += '&activityId=' + activityID + '&caseId=' + currentCaseId + '&cid=' + {/literal}"{$contactID}"{literal} + '&fileOnCaseAction=' + action;
 
     function save() {
       if (!$("#file_on_case_unclosed_case_id").val()) {