template cleanup
authorkurund <kurund@civicrm.org>
Sat, 27 Jul 2013 19:32:47 +0000 (01:02 +0530)
committerkurund <kurund@civicrm.org>
Sat, 27 Jul 2013 19:32:47 +0000 (01:02 +0530)
templates/CRM/Contribute/Form/ContributionPage/Premium.tpl

index d8a12430f80241dc9b34d9d7629c2e20cdcde3db..8eb2c2855d3bea5dc8bc7a42f65b7763a313c325 100644 (file)
  +--------------------------------------------------------------------+
 *}
 <div id="help">
-    {ts}Edit <strong>Premiums Settings</strong> to customize the title and introductory message (e.g ...in appreciation of your support, you will be able to select from a number of exciting thank-you gifts...). You can optionally provide a contact email address and/or phone number for inquiries.{/ts}
-    {ts}Then select and review the premiums that you want to offer on this contribution page.{/ts}
+  {ts}Edit
+    <strong>Premiums Settings</strong>
+    to customize the title and introductory message (e.g ...in appreciation of your support, you will be able to select
+    from a number of exciting thank-you gifts...). You can optionally provide a contact email address and/or
+    phone number for inquiries.{/ts}
+  {ts}Then select and review the premiums that you want to offer on this contribution page.{/ts}
 </div>
 <div id="id_Premiums" class="crm-block crm-form-block crm-contribution-contributionpage-premium-form-block">
-   <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
-   <table class="form-layout-compressed">
-     <tr class="crm-contribution-contributionpage-premium-form-block-premiums_active">
-        <td class="label">{$form.premiums_active.label}</td>
-        <td class="html-adjust">{$form.premiums_active.html}<br />
-          <span class="description">{ts}Is the Premiums section enabled for this Online Contributions page?{/ts}</span>
-       </td>
+  <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
+  <table class="form-layout-compressed">
+    <tr class="crm-contribution-contributionpage-premium-form-block-premiums_active">
+      <td class="label">{$form.premiums_active.label}</td>
+      <td class="html-adjust">{$form.premiums_active.html}<br/>
+        <span class="description">{ts}Is the Premiums section enabled for this Online Contributions page?{/ts}</span>
+      </td>
     </tr>
-   </table>
+  </table>
 
-   <div id="premiumSettings" class="crm-accordion-wrapper crm-plain_text_email-accordion collapsed">
-   <div class="crm-accordion-header">
-        {ts}Premiums Settings{/ts}
-   </div>
-   <div class="crm-accordion-body">
+  <div id="premiumSettings" class="crm-accordion-wrapper crm-plain_text_email-accordion collapsed">
+    <div class="crm-accordion-header">
+      {ts}Premiums Settings{/ts}
+    </div>
+    <div class="crm-accordion-body">
 
-   <table class="form-layout-compressed">
-    <tr class="crm-contribution-contributionpage-premium-form-block-premiums_intro_title">
-       <td class="label">{$form.premiums_intro_title.label}{if $action == 2}{include file='CRM/Core/I18n/Dialog.tpl' table='civicrm_premiums' field='premiums_intro_title' id=$contributionPageID}{/if}
-       </td>
-       <td class="html-adjust">{$form.premiums_intro_title.html}<br />
-          <span class="description">{ts}Title to appear at the top of the Premiums section.{/ts}</span>
-       </td>
-    </tr>
-    <tr class="crm-contribution-contributionpage-premium-form-block-premiums_intro_text">
-       <td class="label">{$form.premiums_intro_text.label}{if $action == 2}{include file='CRM/Core/I18n/Dialog.tpl' table='civicrm_premiums' field='premiums_intro_text' id=$contributionPageID}{/if}
-       </td>
-       <td class="html-adjust">{$form.premiums_intro_text.html}<br />
-            <span class="description">{ts}Enter content for the introductory message. This will be displayed below the Premiums section title. You may include HTML formatting tags. You can also include images, as long as they are already uploaded to a server - reference them using complete URLs.{/ts}</span>
-      </td>
-    </tr>
-    <tr class="crm-contribution-contributionpage-premium-form-block-premiums_contact_email">
-       <td class="label">{$form.premiums_contact_email.label}
-       </td>
-       <td class="html-adjust">{$form.premiums_contact_email.html}<br />
-            <span class="description">{ts}This email address is included in automated contribution receipts if the contributor has selected a premium. It should be an appropriate contact mailbox for inquiries about premium fulfillment/shipping.{/ts}</span>
-      </td>
-    </tr>
-    <tr class="crm-contribution-contributionpage-premium-form-block-premiums_contact_phone">
-       <td class="label">{$form.premiums_contact_phone.label}
-       </td>
-       <td class="html-adjust">{$form.premiums_contact_phone.html}<br />
-            <span class="description">{ts}This phone number is included in automated contribution receipts if the contributor has selected a premium. It should be an appropriate phone number for inquiries about premium fulfillment/shipping.{/ts}</span>
-      </td>
-    </tr>
-    <tr class="crm-contribution-contributionpage-premium-form-block-premiums_display_min_contribution">
-       <td class="label">{$form.premiums_display_min_contribution.label}
-       </td>
-       <td class="html-adjust">{$form.premiums_display_min_contribution.html}<br />
-            <span class="description">{ts}Should the minimum contribution amount be automatically displayed after each premium description?{/ts}</span>
-      </td>
-    </tr>
-    <tr class="crm-contribution-contributionpage-premium-form-block-premiums_nothankyou_label">
-       <td class="label">{$form.premiums_nothankyou_label.label}<span class="marker"> *</span>
-       </td>
-       <td class="html-adjust">{$form.premiums_nothankyou_label.html}<br />
+      <table class="form-layout-compressed">
+        <tr class="crm-contribution-contributionpage-premium-form-block-premiums_intro_title">
+          <td class="label">
+            {$form.premiums_intro_title.label}
+            {if $action == 2}
+              {include file='CRM/Core/I18n/Dialog.tpl' table='civicrm_premiums'
+              field='premiums_intro_title' id=$contributionPageID}
+            {/if}
+          </td>
+          <td class="html-adjust">{$form.premiums_intro_title.html}<br/>
+            <span class="description">{ts}Title to appear at the top of the Premiums section.{/ts}</span>
+          </td>
+        </tr>
+        <tr class="crm-contribution-contributionpage-premium-form-block-premiums_intro_text">
+          <td class="label">
+            {$form.premiums_intro_text.label}
+            {if $action == 2}
+              {include file='CRM/Core/I18n/Dialog.tpl' table='civicrm_premiums'
+              field='premiums_intro_text' id=$contributionPageID}
+            {/if}
+          </td>
+          <td class="html-adjust">{$form.premiums_intro_text.html}<br/>
+            <span class="description">
+              {ts}Enter content for the introductory message. This will be displayed below the Premiums section title.
+                You may include HTML formatting tags. You can also include images, as long as they are already
+                uploaded to a server - reference them using complete URLs.{/ts}
+            </span>
+          </td>
+        </tr>
+        <tr class="crm-contribution-contributionpage-premium-form-block-premiums_contact_email">
+          <td class="label">
+            {$form.premiums_contact_email.label}
+          </td>
+          <td class="html-adjust">{$form.premiums_contact_email.html}<br/>
+            <span class="description">
+              {ts}This email address is included in automated contribution receipts if the contributor has selected
+                a premium. It should be an appropriate contact mailbox for inquiries about premium
+                fulfillment/shipping.{/ts}
+            </span>
+          </td>
+        </tr>
+        <tr class="crm-contribution-contributionpage-premium-form-block-premiums_contact_phone">
+          <td class="label">
+            {$form.premiums_contact_phone.label}
+          </td>
+          <td class="html-adjust">{$form.premiums_contact_phone.html}<br/>
+            <span class="description">
+              {ts}This phone number is included in automated contribution receipts if the contributor has selected
+                a premium. It should be an appropriate phone number for inquiries about premium
+                fulfillment/shipping.{/ts}
+            </span>
+          </td>
+        </tr>
+        <tr class="crm-contribution-contributionpage-premium-form-block-premiums_display_min_contribution">
+          <td class="label">
+            {$form.premiums_display_min_contribution.label}
+          </td>
+          <td class="html-adjust">{$form.premiums_display_min_contribution.html}<br/>
+            <span class="description">
+              {ts}Should the minimum contribution amount be automatically displayed after each premium description?{/ts}
+            </span>
+          </td>
+        </tr>
+        <tr class="crm-contribution-contributionpage-premium-form-block-premiums_nothankyou_label">
+          <td class="label">
+            {$form.premiums_nothankyou_label.label}<span class="marker"> *</span>
+          </td>
+          <td class="html-adjust">{$form.premiums_nothankyou_label.html}<br/>
             <span class="description">{ts}You can change the text for the 'No thank-you' radio button.{/ts}</span>
-      </td>
-    </tr>
-    <tr class="crm-contribution-contributionpage-premium-form-block-premiums_nothankyou_position">
-       <td class="label">{$form.premiums_nothankyou_position.label}
-       </td>
-       <td class="html-adjust">{$form.premiums_nothankyou_position.html}<br />
-            <span class="description">{ts}Place the 'No thank-you' radio button before OR after the list of premiums offered on this page.{/ts}</span>
-      </td>
-    </tr>
-    </table>
-    </div><!-- /.crm-accordion-body -->
-    {* Call Premiums tpl inside premiumSettings div to hide it on unchecking premiums_active checkbox*}    
+          </td>
+        </tr>
+        <tr class="crm-contribution-contributionpage-premium-form-block-premiums_nothankyou_position">
+          <td class="label">
+            {$form.premiums_nothankyou_position.label}
+          </td>
+          <td class="html-adjust">{$form.premiums_nothankyou_position.html}<br/>
+            <span class="description">
+              {ts}Place the 'No thank-you' radio button before OR after the list of premiums offered on this page.{/ts}
+            </span>
+          </td>
+        </tr>
+      </table>
+    </div>
+    <!-- /.crm-accordion-body -->
+    {* Call Premiums tpl inside premiumSettings div to hide it on unchecking premiums_active checkbox*}
     {include file="CRM/Contribute/Page/Premium.tpl"}
-    </div><!-- /.crm-accordion-wrapper -->
+  </div>
+  <!-- /.crm-accordion-wrapper -->
 
-    <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="bottom"}</div>
+  <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="bottom"}</div>
 </div>
 
 <script type="text/javascript">
-{literal}
-cj(function() {
-   cj().crmAccordions();
+  {literal}
+  cj(function () {
+    cj().crmAccordions();
+
+    // bind click event to premiums_active checkbox
+    cj('#premiums_active').click(function () {
+      // call function to show/hide Premium Settings div
+      premiumBlock(cj(this).prop('checked'));
+    });
 
-   // bind click event to premiums_active checkbox
-   cj('#premiums_active').click(function() {
-     // call function to show/hide Premium Settings div
-     premiumBlock(cj(this).prop('checked'));
-   });
+    // show/hide Premium Settings div on page load
+    // depending on "Premiums Section Enabled?" checkbox's value
+    if (!cj('#premiums_active').is(':checked')) {
+      cj("#premiumSettings:not(.collapsed)").crmAccordionToggle();
+      cj('#premiumSettings').hide();
+    }
+    else {
+      cj("#premiumSettings").crmAccordionToggle();
+      cj('#premiumSettings').show();
+    }
 
-   // show/hide Premium Settings div on page load
-   // depending on "Premiums Section Enabled?" checkbox's value
-   if (!cj('#premiums_active').is(':checked')) {
-     cj("#premiumSettings:not(.collapsed)").crmAccordionToggle();
-     cj('#premiumSettings').hide();
-   }
-   else {
-     cj("#premiumSettings").crmAccordionToggle();
-     cj('#premiumSettings').show();
-   }
-     
-   // function to show/hide Premium Settings
-   function premiumBlock(checked) {
-     if (checked) {
-       cj("#premiumSettings").crmAccordionToggle();
-       cj('#premiumSettings').show();
-       return;
-     }
-     else {
-       cj("#premiumSettings:not(.collapsed)").crmAccordionToggle();
-       cj('#premiumSettings').hide();
-       return;
-     }
-   }
-});
-{/literal}
+    // function to show/hide Premium Settings
+    function premiumBlock(checked) {
+      if (checked) {
+        cj("#premiumSettings").crmAccordionToggle();
+        cj('#premiumSettings').show();
+        return;
+      }
+      else {
+        cj("#premiumSettings:not(.collapsed)").crmAccordionToggle();
+        cj('#premiumSettings').hide();
+        return;
+      }
+    }
+  });
+  {/literal}
 </script>
 
 {* include jscript to warn if unsaved form field changes *}