Index: trunk/extensions/DonationInterface/globalcollect_gateway/forms/js/webitects.js |
— | — | @@ -73,13 +73,96 @@ |
74 | 74 | } |
75 | 75 | window.validateAmount = function() { |
76 | 76 | |
77 | | - // TODO: THIS NEEDS TO BE REPLACED WITH KALDARI'S CURRENCIES |
| 77 | + // If you change these, also change in currencyRates.inc. |
78 | 78 | var minimums = { |
79 | | - 'USD' : 1, |
80 | | - 'CAD' : 1 |
| 79 | + 'AED': 4, |
| 80 | + 'ARS': 4, |
| 81 | + 'AUD': 1, |
| 82 | + 'BBD': 2, |
| 83 | + 'BDT': 76, |
| 84 | + 'BGN': 1.4, |
| 85 | + 'BHD': 0.4, |
| 86 | + 'BMD': 1, |
| 87 | + 'BND': 1.3, |
| 88 | + 'BOB': 7, |
| 89 | + 'BRL': 1.7, |
| 90 | + 'BSD': 1, |
| 91 | + 'BZD': 2, |
| 92 | + 'CAD': 1, |
| 93 | + 'CHF': 0.9, |
| 94 | + 'CLP': 494, |
| 95 | + 'CNY': 6, |
| 96 | + 'COP': 1910, |
| 97 | + 'CRC': 512, |
| 98 | + 'CZK': 18, |
| 99 | + 'DKK': 5, |
| 100 | + 'DOP': 38, |
| 101 | + 'DZD': 73, |
| 102 | + 'EEK': 11, |
| 103 | + 'EGP': 6, |
| 104 | + 'EUR': 0.7, |
| 105 | + 'GBP': 0.6, |
| 106 | + 'GTQ': 7.8, |
| 107 | + 'HKD': 7.7, |
| 108 | + 'HNL': 19, |
| 109 | + 'HRK': 5, |
| 110 | + 'HUF': 219, |
| 111 | + 'IDR': 8960, |
| 112 | + 'ILS': 3.6, |
| 113 | + 'INR': 49, |
| 114 | + 'JMD': 85, |
| 115 | + 'JOD': 0.7, |
| 116 | + 'JPY': 78, |
| 117 | + 'KES': 97, |
| 118 | + 'KRW': 1127, |
| 119 | + 'KYD': 0.8, |
| 120 | + 'KZT': 147, |
| 121 | + 'LBP': 1500, |
| 122 | + 'LKR': 110, |
| 123 | + 'LTL': 2.5, |
| 124 | + 'LVL': 0.5, |
| 125 | + 'MAD': 8.1, |
| 126 | + 'MKD': 45, |
| 127 | + 'MUR': 29, |
| 128 | + 'MVR': 15, |
| 129 | + 'MXN': 13, |
| 130 | + 'MYR': 3, |
| 131 | + 'NOK': 5.5, |
| 132 | + 'NZD': 1.2, |
| 133 | + 'OMR': 0.3, |
| 134 | + 'PAB': 1, |
| 135 | + 'PEN': 2.7, |
| 136 | + 'PHP': 43, |
| 137 | + 'PKR': 86, |
| 138 | + 'PLN': 3, |
| 139 | + 'PYG': 4190, |
| 140 | + 'QAR': 3.6, |
| 141 | + 'RON': 3.1, |
| 142 | + 'RUB': 30, |
| 143 | + 'SAR': 3.7, |
| 144 | + 'SEK': 6.5, |
| 145 | + 'SGD': 1.2, |
| 146 | + 'SVC': 8.7, |
| 147 | + 'THB': 30, |
| 148 | + 'TJS': 4.7, |
| 149 | + 'TND': 1.4, |
| 150 | + 'TRY': 1.7, |
| 151 | + 'TTD': 6, |
| 152 | + 'TWD': 30, |
| 153 | + 'UAH': 8, |
| 154 | + 'USD': 1, |
| 155 | + 'UYU': 19, |
| 156 | + 'UZS': 1760, |
| 157 | + 'VND': 21000, |
| 158 | + 'XAF': 470, |
| 159 | + 'XCD': 2.7, |
| 160 | + 'XOF': 476, |
| 161 | + 'ZAR': 7.8 |
81 | 162 | }; |
82 | 163 | var error = true; |
83 | 164 | var amount = $( 'input[name="amount"]' ).val(); // get the amount |
| 165 | + // Normalize weird amount formats. |
| 166 | + // Don't mess with these unless you know what you're doing. |
84 | 167 | amount = amount.replace( /[,.](\d)$/, '\:$10' ); |
85 | 168 | amount = amount.replace( /[,.](\d)(\d)$/, '\:$1$2' ); |
86 | 169 | amount = amount.replace( /[,.]/g, '' ); |
Index: trunk/extensions/DonationInterface/gateway_common/currencyRates.inc |
— | — | @@ -5,6 +5,7 @@ |
6 | 6 | * Last updated November 3, 2011 (rounded down) |
7 | 7 | */ |
8 | 8 | function getCurrencyRates() { |
| 9 | + // If you change these, make sure to also update any JS validation scripts |
9 | 10 | $currencyRates = array( |
10 | 11 | 'AED' => '4', |
11 | 12 | 'ARS' => '4', |
Index: trunk/extensions/DonationInterface/gateway_common/us-states.i18n.php |
— | — | @@ -65,7 +65,7 @@ |
66 | 66 | 'donate_interface-state-dropdown-WI' => 'Wisconsin', |
67 | 67 | 'donate_interface-state-dropdown-WV' => 'West Virginia', |
68 | 68 | 'donate_interface-state-dropdown-WY' => 'Wyoming', |
69 | | - 'donate_interface-state-dropdown-AA' => 'AA', |
70 | | - 'donate_interface-state-dropdown-AE' => 'AE', |
71 | | - 'donate_interface-state-dropdown-AP' => 'AP', |
| 69 | + 'donate_interface-state-dropdown-AA' => 'AA (Military)', |
| 70 | + 'donate_interface-state-dropdown-AE' => 'AE (Military)', |
| 71 | + 'donate_interface-state-dropdown-AP' => 'AP (Military)', |
72 | 72 | ); |