Commit f8a9afdd authored by Ivar Derksen's avatar Ivar Derksen
Browse files

Set minimum donation amount

parent d25da5de
Pipeline #45532 passed with stage
in 41 seconds
var config = {
idealServer: '/ideal-issuer/api/v1/ideal/',
minDonationAmount: 5.00,
};
function insertBanksIntoForm(data, select) {
......@@ -47,10 +48,12 @@ function insertAmountsIntoForm(data, select) {
// Insert other amounts (if present)
for (let i=0; i < amounts.length; i++) {
const option = $('<option>');
option.html(`&euro; ${amounts[i]}`);
option.val(amounts[i]);
select.append(option);
if (parseFloat(amounts[i]) >= config.minDonationAmount) {
const option = $('<option>');
option.html(`&euro; ${amounts[i]}`);
option.val(amounts[i]);
select.append(option);
}
}
if (sessionStorage.idx_input) {
select.val(sessionStorage.idx_amount);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment