From: Coleman Watts Date: Sat, 28 Dec 2013 19:14:04 +0000 (-0800) Subject: CRM-13997 CRM-13863 - Fix form snippet to still work with non-json calls (fix for... X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=cc4f28122ea653a6d0ce9fa9e3e449fa444c41af;p=civicrm-core.git CRM-13997 CRM-13863 - Fix form snippet to still work with non-json calls (fix for custom data ajax) --- diff --git a/CRM/Campaign/Form/Survey.php b/CRM/Campaign/Form/Survey.php index 86a09d82c7..e9567c6a38 100644 --- a/CRM/Campaign/Form/Survey.php +++ b/CRM/Campaign/Form/Survey.php @@ -172,8 +172,7 @@ class CRM_Campaign_Form_Survey extends CRM_Core_Form { } function getTemplateFileName() { - if ($this->controller->getPrint() === CRM_Core_Smarty::PRINT_JSON || - $this->getVar('_surveyId') <= 0 ) { + if ($this->controller->getPrint() || $this->getVar('_surveyId') <= 0 ) { return parent::getTemplateFileName(); } else { diff --git a/CRM/Contribute/Form/ContributionPage.php b/CRM/Contribute/Form/ContributionPage.php index 1706197232..9fa9d093ef 100644 --- a/CRM/Contribute/Form/ContributionPage.php +++ b/CRM/Contribute/Form/ContributionPage.php @@ -436,8 +436,7 @@ class CRM_Contribute_Form_ContributionPage extends CRM_Core_Form { } function getTemplateFileName() { - if ($this->controller->getPrint() === CRM_Core_Smarty::PRINT_JSON || - $this->getVar('_id') <= 0 || + if ($this->controller->getPrint() || $this->getVar('_id') <= 0 || ($this->_action & CRM_Core_Action::DELETE) || (CRM_Utils_String::getClassName($this->_name) == 'AddProduct') ) { diff --git a/CRM/Event/Form/ManageEvent.php b/CRM/Event/Form/ManageEvent.php index 5fbd7050fe..32c0651b5d 100644 --- a/CRM/Event/Form/ManageEvent.php +++ b/CRM/Event/Form/ManageEvent.php @@ -372,10 +372,7 @@ class CRM_Event_Form_ManageEvent extends CRM_Core_Form { } function getTemplateFileName() { - if ($this->controller->getPrint() === CRM_Core_Smarty::PRINT_JSON || - $this->getVar('_id') <= 0 || - ($this->_action & CRM_Core_Action::DELETE) - ) { + if ($this->controller->getPrint() || $this->getVar('_id') <= 0 || $this->_action & CRM_Core_Action::DELETE) { return parent::getTemplateFileName(); } else {