--- donation.module	2007-07-24 19:21:29.000000000 -0400
+++ /home/mike/Desktop/donation.module	2008-08-10 23:42:20.000000000 -0400
@@ -17,6 +17,11 @@
 define('DONATION_DONORS_TEXT',         'donation_donors_text');
 define('DONATION_DONORS_DEFAULT_TEXT', t('<ul><li><a href="/donate">Donate now</a> or <a href="/about/donations">learn about donating.</a></li><li><p>This page lists all donors. Donation amounts exclude transaction fees charged by Paypal.</li><li>If you wish to edit your donor name, you may do so from your <a href="/user">profile page</a>.</p></li></ul>'));
 
+define('DONATION_DONOR_USER_DEFAULT_TEXT', t('If the user is registered on this site, enter his/her the Drupal uid.'));
+define('DONATION_TARGET_DEFAULT_TEXT', t('Donation to the Drupal Association'));
+define('DONATION_CURRENCY_DEFAULT_TEXT', t('The Drupal Association accepts payments in these two currencies.'));
+define('DONATION_LOVE_DEFAULT_TEXT',  t('Drupal loves you. Enter the amount you wish to donate.'));
+
 function donation_perm() {
   return array('administer donations');
 }
@@ -132,6 +137,47 @@
     '#description' => t('Select whether donations will be public or private for this site.'),
     );
 
+/* Added for site flexibility mike@openconcept.ca */
+
+  $form[DONATION_DONOR_USER_TEXT] = array(
+    '#type' => 'textarea',
+    '#title' => t('Text for linking manual link of donation to user'),
+    '#default_value' => variable_get(DONATION_DONOR_USER_TEXT, DONATION_DONOR_USER_DEFAULT_TEXT),
+    '#description' => t('This text will be displayed from add the donation admin page.'),
+  );
+
+  $form[DONATION_TARGET_TEXT] = array(
+    '#type' => 'textarea',
+    '#title' => t('Text describing the target organization'),
+    '#default_value' => variable_get(DONATION_TARGET_TEXT, DONATION_TARGET_DEFAULT_TEXT),
+    '#description' => t('This text will be displayed to the user from the main donate page.'),
+  );
+
+  $form[DONATION_CURRENCY_TEXT] = array(
+    '#type' => 'textarea',
+    '#title' => t('Text for describing currency options'),
+    '#default_value' => variable_get(DONATION_CURRENCY_TEXT, DONATION_CURRENCY_DEFAULT_TEXT),
+    '#description' => t('This text will be displayed with choices of currency on main donation page.'),
+  );
+
+  $form[DONATION_LOVE_TEXT] = array(
+    '#type' => 'textarea',
+    '#title' => t('Text for the we love donations section'),
+    '#default_value' => variable_get(DONATION_LOVE_TEXT, DONATION_LOVE_DEFAULT_TEXT),
+    '#description' => t('This text will be displayed on the main donation page.'),
+  );
+  
+  $currency_options_paypal_string = implode(',', array_keys(simple_paypal_get_currencies()));
+  $form[DONATION_CURRENCY_OPTIONS] = array(
+    '#type' => 'textarea',
+    '#title' => t('Choose which currencies to accept'),
+    '#default_value' => variable_get(DONATION_CURRENCY_OPTIONS, $currency_options_paypal_string),
+    '#description' => t('This text will be displayed on the main donation page.'),
+  );
+
+
+/* End changes */
+
   $form[DONATION_DONORS_TEXT] = array(
     '#type' => 'textarea',
     '#title' => t('Text for the donors list page'),
@@ -176,7 +222,7 @@
       '#type'          => 'textfield',
       '#title'         => t('User ID'),
       '#default_value' => $uid,
-      '#description'   => t('If the user is registered on this site, enter his/her the Drupal uid.'),
+      '#description'   => variable_get(DONATION_DONOR_USER_TEXT, DONATION_DONOR_USER_DEFAULT_TEXT),
       );
     $form['name'] = array(
       '#type'          => 'textfield',
@@ -477,7 +523,7 @@
     '#name' => 'cmd');
   $form['item_name'] = array(
     '#type' => 'hidden',
-    '#value' => 'Donation to the Drupal Association',
+    '#value' => variable_get(DONATION_TARGET_TEXT, DONATION_TARGET_DEFAULT_TEXT),
     '#name' => 'item_name');
   $form['no_shipping'] = array(
     '#type' => 'hidden',
@@ -487,17 +533,27 @@
     '#type' => 'hidden',
     '#value' => url('donation/thanks', NULL, NULL, TRUE),
     '#name' => 'return');
+  
+  // Creat custom currency dropdown
+  $currency_options_paypal_string = implode(',', array_keys(simple_paypal_get_currencies()));
+  $currency_custom_options = explode(',', variable_get(DONATION_CURRENCY_OPTIONS, $currency_options_paypal_string));
+  foreach(simple_paypal_get_currencies() AS $key => $value) {
+    if(in_array($key, $currency_custom_options)) {
+      $custom_currency_list[$key] = $value;
+    }
+  }
+  
   $form['currency_code'] = array(
     '#type' => 'select',
     '#title' => t('Currency'),
-    '#options' => simple_paypal_get_currencies(),
+    '#options' => $custom_currency_list,
     '#name' => 'currency_code',
-    '#description' => t('The Drupal Association accepts payments in these two currencies.'),
+    '#description' => variable_get(DONATION_CURRENCY_TEXT, DONATION_CURRENCY_DEFAULT_TEXT), 
   );
   $form['amount'] = array(
     '#type' => 'textfield',
     '#title' => t('Amount'),
-    '#description' => t('Drupal loves you. Enter the amount you wish to donate.'),
+    '#description' => variable_get(DONATION_LOVE_TEXT, DONATION_LOVE_DEFAULT_TEXT), 
     '#size' => 40,
     '#required' => TRUE,
     '#maxlength' => 255,
