#29801 - Increased rows attribute for textarea in create widget.
authorManoj K <manoj.k@zyxware.com>
Thu, 30 Oct 2014 10:47:27 +0000 (16:17 +0530)
committerManoj K <manoj.k@zyxware.com>
Thu, 30 Oct 2014 10:47:27 +0000 (16:17 +0530)
CRM/Wci/Form/CreateWidget.php
extern/wciwidget.php
templates/CRM/Wci/Form/CreateWidget.tpl
templates/CRM/Wci/Page/wciwidget.tpl

index f28ccb69eb5344044469f52092c1b84f53414c7a..51f9dc1d16bf414b7a192538a9f4f7609ddae0c0 100644 (file)
@@ -103,9 +103,9 @@ class CRM_Wci_Form_CreateWidget extends CRM_Core_Form {
         $val[2]
       );
     }
-    $this->add('textarea', 'style_rules', ts('Additional Style Rules'));
+    $this->add('textarea', 'style_rules', ts('Additional Style Rules'))->setRows(5);
     $this->add('checkbox', 'override', ts('Override default template'));
-    $this->add('textarea', 'custom_template', ts('Custom template:<br><SMALL><font color="red">Please customize the smarty v2 template only if you know what you are doing</font></SMALL>'));
+    $this->add('textarea', 'custom_template', ts('Custom template:<br><SMALL><font color="red">Please customize the smarty v2 template only if you know what you are doing</font></SMALL>'))->setRows(10);
 
     $this->addElement('submit','preview','name="Save and Preview" id="preview"');
     $this->addButtons(array(
index 3e0d2e53ce799cd11a50b8491852e2f87bcf8918..f0533652b9e651a3d8201896453cb2b2e7fd0a3c 100644 (file)
@@ -56,6 +56,7 @@ if (isset($format)) {
 
   $template->assign('wciform', $data);
   $template->assign('cpageId', $data['button_link_to']);
+  $template->assign('embed', $embed);
 
   if ($data["override"] == '0') {
     $template->template_dir[] = getWciWidgetTemplatePath();
index c91646cd7f998cd19c9208c3a198a0520c61569e..b493e8fd4a37f224bf7e0ea342d8375a13d44b34 100644 (file)
@@ -38,8 +38,8 @@
     <div class="content">
       <div class="resizable-textarea">
         <span>{literal}
-          <textarea name="embd_code" id="embd_code" class="form-textarea textarea-processed">
-<script type="text/javascript" src="{/literal}{php}echo $widget_controller_path;{/php}{literal}?widgetId={/literal}{php}echo $wid_id;{/php}{literal}"></script>
+          <textarea rows="5" name="embd_code" id="embd_code" class="form-textarea textarea-processed">
+<script type="text/javascript" src="{/literal}{php}echo $widget_controller_path;{/php}{literal}?widgetId={/literal}{php}echo $wid_id;{/php}{literal}&embed=1"></script>
 <script type="text/javascript">
 // Cleanup functions for the document ready method
 if ( document.addEventListener ) {
@@ -93,7 +93,7 @@ function onReady( ) {
    {* {include file="CRM/Wci/Page/wciwidget.tpl"} *}
 
 <script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
-<script type="text/javascript" src="{php}echo $widget_controller_path;{/php}?widgetId={php}echo $wid_id;{/php}"></script>
+<script type="text/javascript" src="{php}echo $widget_controller_path;{/php}?widgetId={php}echo $wid_id;{/php}&embed=0"></script>
 <script>
   $( document ).ready(function()  {ldelim} 
     $('#widgetwci').html(wciwidgetcode);
index 0c8bc6a6a03dfc29a22e16f5edc212836bb77e9c..1e923ef2caf76ec84a6d52e01f081faef3647c0a 100644 (file)
         background-color:#2786C2;
         height:1em;
         display:block;
-        -moz-border-radius:   4px 0px 0px 4px;
-        -webkit-border-radius:   4px 0px 0px 4px;
-        -khtml-border-radius:   4px 0px 0px 4px;
-        border-radius:      4px 0px 0px 4px;
+        -moz-border-radius:   4px;
+        -webkit-border-radius:   4px;
+        -khtml-border-radius:   4px;
+        border-radius:      4px;
         text-align:left;
         width: {/literal}{$wciform.pb_percentage}{literal}%; /* progress bar percentage */
     }
     <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 $embed eq 1 }
         <form method="get" action="{$wciform.emailSignupGroupFormURL}" name="Subscribe">
+      {/if}
         <p style="text-align:center;">
           <input type="text" id="frmEmail" name="email" size="10">
         </p>
-        <input id="mark_x_2" name="mark_x_2" type="hidden" value="1">
         <p style="text-align: center; margin-top: 10px;">
-          <input type="submit" name="_qf_Subscribe_next" value="Subscribe Me">
+          {if $embed eq 1 }
+            <input type="submit" name="_qf_Subscribe_next" value="Subscribe Me">
+          {else}
+            <input type="button" name="_qf_Subscribe_next" value="Subscribe Me">
+          {/if}
         </p>
+      {if $embed eq 1 }
         </form>
+      {/if}
     {/if}
 </div>