From 18ddc127933c250ee18d913a03ff8ba1968601db Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Mon, 18 Nov 2013 16:31:43 -0800 Subject: [PATCH] CRM-10693 - Ajax - Add id to std response --- CRM/Core/Form.php | 3 +++ 1 file changed, 3 insertions(+) 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); } } -- 2.25.1