$data = array();
while ($dao->fetch()) {
- $data["title"] = base64_decode($dao->title);
+ $data["title"] = $dao->title;
$data["logo_image"] = $dao->logo_image;
$data["image"] = $dao->image;
$data["button_title"] = $dao->button_title;
CRM_Core_DAO::storeValues($dao, $wid_page[$dao->id]);
$this->setDefaults(array(
- 'title' => base64_decode($wid_page[$dao->id]['title'])));
+ 'title' => $wid_page[$dao->id]['title']));
$this->setDefaults(array(
'logo_image' => $wid_page[$dao->id]['logo_image']));
$this->setDefaults(array(
--- /dev/null
+// Cleanup functions for the document ready method
+if ( document.addEventListener ) {
+ DOMContentLoaded = function() {
+ document.removeEventListener( "DOMContentLoaded", DOMContentLoaded, false );
+ onReady();
+ };
+} else if ( document.attachEvent ) {
+ DOMContentLoaded = function() {
+ // Make sure body exists, at least, in case IE gets a little overzealous
+ if ( document.readyState === "complete" ) {
+ document.detachEvent( "onreadystatechange", DOMContentLoaded );
+ onReady();
+ }
+ };
+}
+if ( document.readyState === "complete" ) {
+ // Handle it asynchronously to allow scripts the opportunity to delay ready
+ setTimeout( onReady, 1 );
+}
+
+// Mozilla, Opera and webkit support this event
+if ( document.addEventListener ) {
+ // Use the handy event callback
+ document.addEventListener( "DOMContentLoaded", DOMContentLoaded, false );
+ // A fallback to window.onload, that will always work
+ window.addEventListener( "load", onReady, false );
+ // If IE event model is used
+} else if ( document.attachEvent ) {
+ // ensure firing before onload,
+ // maybe late but safe also for iframes
+ document.attachEvent("onreadystatechange", DOMContentLoaded);
+
+ // A fallback to window.onload, that will always work
+ window.attachEvent( "onload", onReady );
+}
+
+function onReady( ) {
+ document.getElementById('widgetwci').innerHTML = wciwidgetcode;
+}
\ No newline at end of file
$wcidata = $template->fetch('string:' . base64_decode($wid_page[$dao->id]['custom_template']));
}
$widget_controller_path = getWciWidgetControllerPath();
+ $extension_root_path = getExtensionRootPath();
}
{/php}
<span>{literal}
<textarea rows="5" name="embd_code" id="embd_code" class="form-textarea textarea-processed">
<script type="text/javascript" src="{/literal}{php}echo $widget_controller_path;{/php}{literal}?widgetId={/literal}{php}echo $wid_id;{/php}{literal}&embed=1"></script>
-<script type="text/javascript">
-// Cleanup functions for the document ready method
-if ( document.addEventListener ) {
- DOMContentLoaded = function() {
- document.removeEventListener( "DOMContentLoaded", DOMContentLoaded, false );
- onReady();
- };
-} else if ( document.attachEvent ) {
- DOMContentLoaded = function() {
- // Make sure body exists, at least, in case IE gets a little overzealous
- if ( document.readyState === "complete" ) {
- document.detachEvent( "onreadystatechange", DOMContentLoaded );
- onReady();
- }
- };
-}
-if ( document.readyState === "complete" ) {
- // Handle it asynchronously to allow scripts the opportunity to delay ready
- setTimeout( onReady, 1 );
-}
-
-// Mozilla, Opera and webkit support this event
-if ( document.addEventListener ) {
- // Use the handy event callback
- document.addEventListener( "DOMContentLoaded", DOMContentLoaded, false );
- // A fallback to window.onload, that will always work
- window.addEventListener( "load", onReady, false );
- // If IE event model is used
-} else if ( document.attachEvent ) {
- // ensure firing before onload,
- // maybe late but safe also for iframes
- document.attachEvent("onreadystatechange", DOMContentLoaded);
-
- // A fallback to window.onload, that will always work
- window.attachEvent( "onload", onReady );
-}
-
-function onReady( ) {
- document.getElementById('widgetwci').innerHTML = wciwidgetcode;
-}
-</script>
+<script type="text/javascript" src="{/literal}{php}echo $extension_root_path;{/php}{literal}/extern/wciembed.js"></script>
<div id='widgetwci'></div></textarea>{/literal}
<div class="grippie" style="margin-right: 18px;"></div>
</span>
<div class="content">
{* {include file="CRM/Wci/Page/wciwidget.tpl"} *}
-<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="{php}echo $widget_controller_path;{/php}?widgetId={php}echo $wid_id;{/php}&embed=0"></script>
-<script>
- $( document ).ready(function() {ldelim}
- $('#widgetwci').html(wciwidgetcode);
- {rdelim} );
-</script>
+<script type="text/javascript" src="{/literal}{php}echo $extension_root_path;{/php}{literal}/extern/wciembed.js"></script>
<div id='widgetwci'></div>
</div>
<p style="text-align:center; margin: 0;">
Get the monthly newsletter
</p>
- <p style="text-align:left;">email id:
- <input type="text" id="frmEmail" name="email" size="10">
- </p>
+ <input type="text" id="frmEmail" name="email" size="10" placeholder="Email id" style="margin: 0 11%; width: 75%;">
<p style="text-align: center; margin-top: 10px;">
{if $embed eq 1 }
<input type="submit" name="_qf_Subscribe_next" value="Subscribe Me">