'' => ts('- select -'),
);
- $result = civicrm_api3('group', 'get');
+ $result = civicrm_api3('group', 'get', array(
+ 'group_type' => '2'
+ ));
+
foreach ($result['values'] as $group) {
$options[$group['id']] = $group['title'];
}
}
$data = "";
-if (isset($embed) && (true == $embed)) {
+$data = CRM_Wci_BAO_Widget::getWidgetData($widgetId);
+$template->assign('wciform', $data);
+$template->assign('cpageId', $data['button_link_to']);
+$template->assign('embed', $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');
- $output = 'var wciwidgetcode = ' . json_encode($wcidata) . ';';
- echo $output;
-
-}
+$template->template_dir[] = getWciWidgetTemplatePath();
+$wcidata = $template->fetch('wciwidget.tpl');
+$output = 'var wciwidgetcode = ' . json_encode($wcidata) . ';';
+echo $output;
CRM_Utils_System::civiExit();
<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>
+ {$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>