Resolved merge conflict.
authorManoj K <manoj.k@zyxware.com>
Tue, 21 Oct 2014 11:23:47 +0000 (16:53 +0530)
committerManoj K <manoj.k@zyxware.com>
Tue, 21 Oct 2014 11:23:47 +0000 (16:53 +0530)
1  2 
CRM/Wci/Form/CreateWidget.php
extern/wciwidget.php
templates/CRM/Wci/Page/wciwidget.tpl

Simple merge
index 3f89330d30bdeafa0a87327fd43430d3e7cdc8e8,bf5500e6d669e7128c828facb71d0d0cfd3259d4..d86822833e02cf746681ff693f8915773d7b0b88
@@@ -51,17 -51,27 +51,22 @@@ $embed = CRM_Utils_Request::retrieve('e
  
  if (isset($format)) {
    $jsonvar .= $cpageId;
--}
 -
 -$data = "";
 -if (isset($embed) && (true == $embed)) {
 -
+ } else {
+   $data = CRM_Wci_BAO_Widget::getWidgetData($widgetId);
+   $template->assign('wciform', $data);
+   $template->assign('cpageId', $data['button_link_to']);
  
- $data = "";
- $data = CRM_Wci_BAO_Widget::getWidgetData($widgetId);
- $template->assign('wciform', $data);
- $template->assign('cpageId', $data['button_link_to']);
- $template->assign('embed', $embed);
+   if ($data["override"] == '0') {
+     $template->template_dir[] = getWciWidgetTemplatePath();
+     $wcidata = $template->fetch('wciwidget.tpl');
+   } else {
  
- $template->template_dir[] = getWciWidgetTemplatePath();
- $wcidata = $template->fetch('wciwidget.tpl');
- $output = 'var wciwidgetcode =  ' . json_encode($wcidata) . ';';
- echo $output;
+         $wcidata = $template->fetch('string:' . base64_decode($data['custom_template']));
+   }
+   $output = 'var wciwidgetcode =  ' . json_encode($wcidata) . ';';
+   echo $output;
+ }
  
  CRM_Utils_System::civiExit();
index 6dad7da4b4fd959e0e922271f004cfa0c537dab5,7c3afebed6ee75c3b04acbc2f55f1f4cf859c46c..6609555ab44e2a035553e8941499b64ed98a790f
        {$wciform.title}
      </h5>
      <div class="crm-amounts">
-         <div id="crm_wid_{$widgetId}_amt_hi" class="crm-amount-high"></div>
-         <div id="crm_wid_{$widgetId}_amt_low" class="crm-amount-low"></div>
-         <div id="crm_wid_{$widgetId}_percentage" class="crm-percentage"></div>
+         <div id="crm_wid_{$wciform.widgetId}_amt_hi" class="crm-amount-high"></div>
+         <div id="crm_wid_{$wciform.widgetId}_amt_low" class="crm-amount-low"></div>
+         <div id="crm_wid_{$wciform.widgetId}_percentage" class="crm-percentage"></div>
      </div>
      <div class="crm-amount-bar">
-         <div class="crm-amount-fill" id="crm_wid_{$widgetId}_amt_fill"></div>
+         <div class="crm-amount-fill" id="crm_wid_{$wciform.widgetId}_amt_fill"></div>
      </div>
-     <div id="crm_wid_{$widgetId}_donors" class="crm-donors">
+     <div id="crm_wid_{$wciform.widgetId}_donors" class="crm-donors">
      </div>
-     <div id="crm_wid_{$widgetId}_comments" class="crm-comments">
+     <div id="crm_wid_{$wciform.widgetId}_comments" class="crm-comments">
        {$wciform.description}
      </div>
-     <div id="crm_wid_{$widgetId}_campaign" class="crm-campaign">
+     <div id="crm_wid_{$wciform.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=$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 class="crm-wci-button-wrapper" id="crm_wid_{$wciform.widgetId}_button">
+         <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_{$wciform.widgetId}_btn_txt">{$wciform.button_title}</span></a>
      </div>
 +    {$wciform.embed}
 +    {if $wciform.email_signup_group_id}
 +      {if $wciform.embed == 1}
 +        <form method="get" action="http://{php}echo $_SERVER['SERVER_NAME'];{/php}/civicrm/mailing/subscribe"
 +      {/if}
 +        <p style="text-align:center;">
 +          <input type="text" id="frmEmail" name="email-Primary" size="10">
 +        </p>
 +        <p style="text-align: center; margin-top: 10px;">
 +          <input type="submit" name="_qf_Edit_next" value="Subscribe Me">
 +        </p>
 +      {if $wciform.embed == 1}
 +        </form>
 +      {/if}
 +    {/if}
  </div>