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();
{$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>