$data["color_border"] = $dao->color_border;
$data["color_button"] = $dao->color_button;
$data["color_button_bg"] = $dao->color_button_bg;
+ $data['style_rules'] = $dao->style_rules;
$data["pb_percentage"] = CRM_Wci_BAO_ProgressBar::getProgressbarPercentage($dao->progress_bar_id);
}
),
));
- $this->add('textarea', 'embd_code', ts('Code to embed:'));
+ // $this->add('textarea', 'embd_code', ts('Code to embed:'));
// export form elements
$this->assign('elementNames', $this->getRenderableElementNames());
'custom_template' => $cust_templ));
}
}
- $widget_controller_path = getWciWidgetControllerPath();
-
- $emb_code = "<script src=\"http://code.jquery.com/jquery-1.9.1.min.js\"></script>
-<script type=\"text/javascript\" src=\"" . $widget_controller_path . "?widgetId=" . $this->_id . "\"></script>
-<script>
-$( document ).ready(function() {
-$('#widgetwci').html(wciwidgetcode);
-});
-</script>
-<div id='widgetwci'>
-</div>";
- $this->getElement('embd_code')->setValue($emb_code);
+ // $widget_controller_path = getWciWidgetControllerPath();
+ //
+ // $emb_code = "<script src=\"http://code.jquery.com/jquery-1.9.1.min.js\"></script>
+// <script type=\"text/javascript\" src=\"" . $widget_controller_path . "?widgetId=" . $this->_id . "\"></script>
+// <script>
+// $( document ).ready(function() {
+// $('#widgetwci').html(wciwidgetcode);
+// });
+// </script>
+// <div id='widgetwci'>
+// </div>";
+ // $this->getElement('embd_code')->setValue($emb_code);
}
else {
/** Keep template in civicrm-wci/templates folder*/
$template->assign('wciform', $data);
$template->template_dir[] = getWciWidgetTemplatePath();
$wcidata = $template->fetch('wciwidget.tpl');
+ $widget_controller_path = getWciWidgetControllerPath();
}
{/php}
+ <div class="crm-section">
+ <div class="label">
+ <label for="embd_code">Code to embed:</label>
+ </div>
+ <div class="content">
+ <div class="resizable-textarea">
+ <span>{literal}
+ <textarea name="embd_code" id="embd_code" class="form-textarea textarea-processed"><script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
+<script type="text/javascript" src="{/literal}{php}echo $widget_controller_path;{/php}{literal}?widgetId={/literal}{php}echo $wid_id;{/php}{literal}"></script>
+<script>
+ $( document ).ready(function() {
+ $('#widgetwci').html(wciwidgetcode);
+ });
+</script>
+<div id='widgetwci'></div></textarea>{/literal}
+ <div class="grippie" style="margin-right: 18px;"></div>
+ </span>
+ </div>
+ </div>
+ <div class="clear"></div>
+ </div>
<div class="crm-section">
<div class="content">
{include file="CRM/Wci/Page/wciwidget.tpl"}