CRM-16614 Fix-Email Invoice: 500 Error in AJAX response
authorpratikshad <pratiksha.dubey@webaccess.co.in>
Tue, 9 Jun 2015 07:34:05 +0000 (13:04 +0530)
committerpratikshad <pratiksha.dubey@webaccess.co.in>
Tue, 9 Jun 2015 07:34:05 +0000 (13:04 +0530)
----------------------------------------
* CRM-16614: Email Invoice: 500 Error in AJAX response
  https://issues.civicrm.org/jira/browse/CRM-16614

CRM/Contribute/Form/Task/Invoice.php

index 6b004586eec815013e0a348852c296b1246ec1cb..9c35bd71b661c004bebed7ad403ae27f1142895e 100644 (file)
@@ -145,6 +145,7 @@ class CRM_Contribute_Form_Task_Invoice extends CRM_Contribute_Form_Task {
    */
   public function buildQuickForm() {
     $session = CRM_Core_Session::singleton();
+    $this->preventAjaxSubmit();
     if (CRM_Core_Permission::check('administer CiviCRM')) {
       $this->assign('isAdmin', 1);
     }
@@ -634,8 +635,7 @@ class CRM_Contribute_Form_Task_Invoice extends CRM_Contribute_Form_Task {
    *   Name of file which is in pdf format
    */
   static public function putFile($html) {
-    require_once "packages/dompdf/dompdf_config.inc.php";
-    spl_autoload_register('DOMPDF_autoload');
+    require_once "vendor/dompdf/dompdf/dompdf_config.inc.php";
     $doc = new DOMPDF();
     $doc->load_html($html);
     $doc->render();