From: Jagadedes Date: Mon, 10 Nov 2014 04:33:30 +0000 (+0530) Subject: #31102, #31060 combibed 2 script tags in embed code and added referalId X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=7f5d2a78e772079baf89d6f724ba0e803257f849;p=com.zyxware.civiwci.git #31102, #31060 combibed 2 script tags in embed code and added referalId --- 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.
-