From: Coleman Watts Date: Tue, 19 Nov 2013 00:31:43 +0000 (-0800) Subject: CRM-10693 - Ajax - Add id to std response X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=18ddc127933c250ee18d913a03ff8ba1968601db;p=civicrm-core.git CRM-10693 - Ajax - Add id to std response --- diff --git a/CRM/Core/Form.php b/CRM/Core/Form.php index 46f69b9d2c..a4a38ff557 100644 --- a/CRM/Core/Form.php +++ b/CRM/Core/Form.php @@ -274,6 +274,9 @@ class CRM_Core_Form extends HTML_QuickForm_Page { if (!empty($_REQUEST['snippet']) && $_REQUEST['snippet'] == CRM_Core_Smarty::PRINT_JSON) { $this->ajaxResponse['buttonName'] = str_replace('_qf_' . $this->getAttribute('id') . '_', '', $this->controller->getButtonName()); $this->ajaxResponse['action'] = $this->_action; + if (isset($this->_id) || isset($this->id)) { + $this->ajaxResponse['id'] = isset($this->id) ? $this->id : $this->_id; + } CRM_Core_Page_AJAX::returnJsonResponse($this->ajaxResponse); } }