From: Coleman Watts Date: Mon, 26 Jan 2015 18:38:31 +0000 (-0500) Subject: CRM-15759 - Use crmEditable for changing case activity status X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=e96d5fa3b3b73b9854c9082ac73701965ed314d3;p=civicrm-core.git CRM-15759 - Use crmEditable for changing case activity status Also cleanup js in ActivityTab.tpl --- diff --git a/CRM/Case/BAO/Case.php b/CRM/Case/BAO/Case.php index a714634a0c..7df56b3dc3 100644 --- a/CRM/Case/BAO/Case.php +++ b/CRM/Case/BAO/Case.php @@ -1349,7 +1349,7 @@ SELECT case_status.label AS case_status, status_id, civicrm_case_type.title AS c } if ($allowEdit) { - $values[$dao->id]['status'] = '' . $values[$dao->id]['status'] . ''; + $values[$dao->id]['status'] = '
' . $values[$dao->id]['status'] . '
'; } } $dao->free(); diff --git a/CRM/Case/Form/ActivityChangeStatus.php b/CRM/Case/Form/ActivityChangeStatus.php deleted file mode 100644 index 8c51e5f322..0000000000 --- a/CRM/Case/Form/ActivityChangeStatus.php +++ /dev/null @@ -1,52 +0,0 @@ -add('select', 'activity_change_status', ts('New Status'), $activityStatus); - } - -} diff --git a/CRM/Case/xml/Menu/Case.xml b/CRM/Case/xml/Menu/Case.xml index 2fe5462c10..61bd8f2851 100644 --- a/CRM/Case/xml/Menu/Case.xml +++ b/CRM/Case/xml/Menu/Case.xml @@ -132,9 +132,4 @@ civicrm/ajax/delcaserole CRM_Case_Page_AJAX::deleteCaseRoles - - civicrm/case/changeactivitystatus - Change Activity Status - CRM_Case_Form_ActivityChangeStatus - diff --git a/api/v3/Activity.php b/api/v3/Activity.php index 9ebad65d5a..2d006ce781 100644 --- a/api/v3/Activity.php +++ b/api/v3/Activity.php @@ -97,6 +97,10 @@ function civicrm_api3_activity_create($params) { $case_id = ''; $createRevision = FALSE; $oldActivityValues = array(); + // Lookup case id if not supplied + if (!isset($params['case_id']) && !empty($params['id'])) { + $params['case_id'] = CRM_Core_DAO::singleValueQuery("SELECT case_id FROM civicrm_case_activity WHERE activity_id = " . (int) $params['id']); + } if (!empty($params['case_id'])) { $case_id = $params['case_id']; if (!empty($params['id'])) { diff --git a/templates/CRM/Case/Form/ActivityChangeStatus.tpl b/templates/CRM/Case/Form/ActivityChangeStatus.tpl deleted file mode 100644 index b129b1f043..0000000000 --- a/templates/CRM/Case/Form/ActivityChangeStatus.tpl +++ /dev/null @@ -1,34 +0,0 @@ -{* - +--------------------------------------------------------------------+ - | CiviCRM version 4.6 | - +--------------------------------------------------------------------+ - | Copyright CiviCRM LLC (c) 2004-2014 | - +--------------------------------------------------------------------+ - | This file is a part of CiviCRM. | - | | - | CiviCRM is free software; you can copy, modify, and distribute it | - | under the terms of the GNU Affero General Public License | - | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. | - | | - | CiviCRM is distributed in the hope that it will be useful, but | - | WITHOUT ANY WARRANTY; without even the implied warranty of | - | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | - | See the GNU Affero General Public License for more details. | - | | - | You should have received a copy of the GNU Affero General Public | - | License and the CiviCRM Licensing Exception along | - | with this program; if not, contact CiviCRM LLC | - | at info[AT]civicrm[DOT]org. If you have questions about the | - | GNU Affero General Public License or the licensing of CiviCRM, | - | see the CiviCRM license FAQ at http://civicrm.org/licensing | - +--------------------------------------------------------------------+ -*} -{* CiviCase - change activity status inline *} -
- - - - - -
{$form.activity_change_status.label}{$form.activity_change_status.html}
-
diff --git a/templates/CRM/Case/Form/ActivityChangeStatusJs.tpl b/templates/CRM/Case/Form/ActivityChangeStatusJs.tpl deleted file mode 100644 index d1d57d9846..0000000000 --- a/templates/CRM/Case/Form/ActivityChangeStatusJs.tpl +++ /dev/null @@ -1,86 +0,0 @@ -{* - +--------------------------------------------------------------------+ - | CiviCRM version 4.6 | - +--------------------------------------------------------------------+ - | Copyright CiviCRM LLC (c) 2004-2014 | - +--------------------------------------------------------------------+ - | This file is a part of CiviCRM. | - | | - | CiviCRM is free software; you can copy, modify, and distribute it | - | under the terms of the GNU Affero General Public License | - | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. | - | | - | CiviCRM is distributed in the hope that it will be useful, but | - | WITHOUT ANY WARRANTY; without even the implied warranty of | - | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | - | See the GNU Affero General Public License for more details. | - | | - | You should have received a copy of the GNU Affero General Public | - | License and the CiviCRM Licensing Exception along | - | with this program; if not, contact CiviCRM LLC | - | at info[AT]civicrm[DOT]org. If you have questions about the | - | GNU Affero General Public License or the licensing of CiviCRM, | - | see the CiviCRM license FAQ at http://civicrm.org/licensing | - +--------------------------------------------------------------------+ -*} -{* CiviCase - change activity status inline *} -{literal} - -{/literal} diff --git a/templates/CRM/Case/Form/ActivityTab.tpl b/templates/CRM/Case/Form/ActivityTab.tpl index 90c8089b65..c77fc37177 100644 --- a/templates/CRM/Case/Form/ActivityTab.tpl +++ b/templates/CRM/Case/Form/ActivityTab.tpl @@ -31,7 +31,7 @@