#29750 progressbar.tpl
authorJagadedes <jagadees.pillai@zyxware.com>
Tue, 23 Sep 2014 11:03:26 +0000 (16:33 +0530)
committerJagadedes <jagadees.pillai@zyxware.com>
Tue, 23 Sep 2014 11:03:26 +0000 (16:33 +0530)
templates/CRM/Wci/Form/ProgressBar.tpl [new file with mode: 0644]
wci-helper-functions.php [new file with mode: 0644]

diff --git a/templates/CRM/Wci/Form/ProgressBar.tpl b/templates/CRM/Wci/Form/ProgressBar.tpl
new file mode 100644 (file)
index 0000000..c99bb1f
--- /dev/null
@@ -0,0 +1,27 @@
+{* HEADER *}
+
+<div class="crm-submit-buttons">
+{include file="CRM/common/formButtons.tpl" location="top"}
+</div>
+
+{* FIELD EXAMPLE: OPTION 1 (AUTOMATIC LAYOUT) *}
+
+{foreach from=$elementNames item=elementName}
+  <div class="crm-section">
+    <div class="label">{$form.$elementName.label}</div>
+    <div class="content">{$form.$elementName.html}</div>
+    <div class="clear"></div>
+  </div>
+{/foreach}
+
+{* FIELD EXAMPLE: OPTION 2 (MANUAL LAYOUT)
+
+  <div>
+    <span>{$form.favorite_color.label}</span>
+    <span>{$form.favorite_color.html}</span>
+  </div>
+
+{* FOOTER *}
+<div class="crm-submit-buttons">
+{include file="CRM/common/formButtons.tpl" location="bottom"}
+</div>
diff --git a/wci-helper-functions.php b/wci-helper-functions.php
new file mode 100644 (file)
index 0000000..c38981b
--- /dev/null
@@ -0,0 +1,14 @@
+<?php
+
+  function getContributionPageOptions() {
+    $options = array(
+      '' => ts('- select -'),
+    );
+    
+    $result = civicrm_api3('contribution_page', 'get');
+    foreach ($result['values'] as $contribution_page) {
+      $options[$contribution_page['id']] = $contribution_page['title'];
+    }
+    
+    return $options;
+  }