From 7f5d2a78e772079baf89d6f724ba0e803257f849 Mon Sep 17 00:00:00 2001 From: Jagadedes Date: Mon, 10 Nov 2014 10:03:30 +0530 Subject: [PATCH] #31102, #31060 combibed 2 script tags in embed code and added referalId --- CRM/Wci/Form/CreateWidget.php | 1 - extern/wciwidget.php | 3 +++ templates/CRM/Wci/Form/CreateWidget.tpl | 6 ++---- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CRM/Wci/Form/CreateWidget.php b/CRM/Wci/Form/CreateWidget.php index 585a149..5517583 100644 --- a/CRM/Wci/Form/CreateWidget.php +++ b/CRM/Wci/Form/CreateWidget.php @@ -228,7 +228,6 @@ where w.id=" . $this->_id;*/ } else { CRM_Utils_System::setTitle(ts('Create Widget')); - /** Keep template in civicrm-wci/templates folder*/ $output = file_get_contents('templates/CRM/Wci/Page/wciwidget.tpl',FILE_USE_INCLUDE_PATH); $elem = $this->getElement('custom_template'); $elem->setValue($output); diff --git a/extern/wciwidget.php b/extern/wciwidget.php index 0437366..e5b6b69 100644 --- a/extern/wciwidget.php +++ b/extern/wciwidget.php @@ -70,6 +70,9 @@ if (isset($format)) { $wcidata = $template->fetch('string:' . html_entity_decode($data['custom_template'])); } $output = 'var wciwidgetcode = ' . json_encode($wcidata) . ';'; + + $wciembed = file_get_contents('wciembed.js',FILE_USE_INCLUDE_PATH); + $output = $output . $wciembed; echo $output; } diff --git a/templates/CRM/Wci/Form/CreateWidget.tpl b/templates/CRM/Wci/Form/CreateWidget.tpl index 5fe77ce..ebce801 100644 --- a/templates/CRM/Wci/Form/CreateWidget.tpl +++ b/templates/CRM/Wci/Form/CreateWidget.tpl @@ -41,16 +41,14 @@
Click Save & Preview to save any changes to your settings, and preview the widget again on this page.
- - +
Add this widget to any web page by copying and pasting the code below.
-
-- 2.25.1