2 <div class="crm-block crm-form-block">
3 <div class="crm-submit-buttons">
4 {include file="CRM/common/formButtons.tpl" location="top"}
7 {* FIELD EXAMPLE: OPTION 1 (AUTOMATIC LAYOUT) *}
9 {foreach from=$elementNames item=elementName}
10 <div class="crm-section">
11 <div class="label">{$form.$elementName.label}</div>
12 <div class="content">{$form.$elementName.html}</div>
13 <div class="clear"></div>
17 {if $form.title.value != ""}
19 if(isset($_REQUEST['id'])) {
20 $wid_id = $_REQUEST['id'];
21 $data = CRM_Wci_BAO_Widget::getWidgetData($wid_id);
22 $template = CRM_Core_Smarty::singleton();
23 $template->assign('wciform', $data);
24 if($data["override"] == 0) {
25 $template->template_dir[] = getWciWidgetTemplatePath();
26 $wcidata = $template->fetch('wciwidget.tpl');
28 $wcidata = $template->fetch('string:' . $wid_page[$dao->id]['custom_template']);
30 $widget_controller_path = getWciWidgetControllerPath();
31 $extension_root_path = getExtensionRootPath();
35 <div class="crm-section">
41 <div class="description">
42 Click <strong>Save & Preview</strong> to save any changes to your settings, and preview the widget again on this page.
44 <script type="text/javascript" src="{php}echo $widget_controller_path;{/php}?widgetId={php}echo $wid_id;{/php}&embed=0&referalid=2442"></script></script>
45 <div id='widgetwci'></div>
47 <!-- <div class="col2">
48 <div class="description">
49 Add this widget to any web page by copying and pasting the code below.
51 <textarea rows="8" cols="40" name="widget_code" id="widget_code"><script type="text/javascript" src="{php}echo $widget_controller_path;{/php}?widgetId={php}echo $wid_id;{/php}&embed=1&referalId=2442"> </script>
52 <div id='widgetwci'></div></textarea>
55 <a href="#" onclick="CreateWidget.widget_code.select(); return false;">ยป Select Code</a>
62 {* FIELD EXAMPLE: OPTION 2 (MANUAL LAYOUT)
65 <span>{$form.favorite_color.label}</span>
66 <span>{$form.favorite_color.html}</span>
71 <div class="crm-submit-buttons">
72 {include file="CRM/common/formButtons.tpl" location="bottom"}