#29801 - Fix for donate button link issue.
authorManoj K <manoj.k@zyxware.com>
Fri, 17 Oct 2014 06:05:03 +0000 (11:35 +0530)
committerManoj K <manoj.k@zyxware.com>
Fri, 17 Oct 2014 06:05:03 +0000 (11:35 +0530)
CRM/Wci/BAO/Widget.php
extern/wciwidget.php
templates/CRM/Wci/Page/wciwidget.tpl

index bc84161d35bf7ff1ceeee56fa097bc1c3bd465a6..ea9559c899fcf16644ec955d7a35fedebd6fd07d 100644 (file)
@@ -139,7 +139,8 @@ class CRM_Wci_BAO_Widget extends CRM_Wci_DAO_Widget {
       $data["logo_image"] = $dao->logo_image;
       $data["image"] = $dao->image;
       $data["button_title"] = $dao->button_title;
-      $data["progress_bar_id"] = $dao->button_link_to;
+      $data["button_link_to"] = $dao->button_link_to;
+      $data["progress_bar_id"] = $dao->progress_bar_id;
       $data["description"] = strip_tags(base64_decode($dao->description));
       $data["size_variant"] = $dao->size_variant;
       $data["color_title"] = $dao->color_title;
index 50b820dd50f63f46f1f4a2ff1ad935eb0dc315e3..a44ea7184e8ef568208210e8a4ac961a46fd07ce 100644 (file)
@@ -59,6 +59,7 @@ if (isset($embed) && (true == $embed)) {
 } else {
   $data = CRM_Wci_BAO_Widget::getWidgetData($widgetId);
   $template->assign('wciform', $data);
+  $template->assign('cpageId', $data['button_link_to']);
 
   $template->template_dir[] = getWciWidgetTemplatePath();
   $wcidata = $template->fetch('wciwidget.tpl');
index 9bae71665b66e236b614e90d463d57b0ab774997..84e63c6e64e8ac221ea9e4558acc7fb0d77ea7e8 100644 (file)
     <div id="crm_wid_{$widgetId}_campaign" class="crm-campaign">
     </div>
     <div class="crm-wci-button-wrapper" id="crm_wid_{$widgetId}_button">
-        <a href='{crmURL p="civicrm/contribute/transact" q="reset=1&id=$wciform.button_link_to" h=0 a=1 fe=1}' class="crm-wci-button"><span class="crm-wci-button-inner" id="crm_wid_{$widgetId}_btn_txt">{$wciform.button_title}</span></a>
+        <a href='{crmURL p="civicrm/contribute/transact" q="reset=1&id=$cpageId" h=0 a=1 fe=1}' class="crm-wci-button"><span class="crm-wci-button-inner" id="crm_wid_{$widgetId}_btn_txt">{$wciform.button_title}</span></a>
     </div>
 </div>