Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
IRMA
Github mirrors
pbdf-website
Commits
515581a9
Commit
515581a9
authored
Sep 29, 2020
by
Ivar Derksen
Committed by
David Venhoek
Sep 29, 2020
Browse files
Set minimum donation amount
parent
bc58dd52
Pipeline
#45543
passed with stage
in 40 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
assets/js/donation.js
View file @
515581a9
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
(
`€
${
amounts
[
i
]}
`
);
option
.
val
(
amounts
[
i
]);
select
.
append
(
option
);
if
(
parseFloat
(
amounts
[
i
])
>=
config
.
minDonationAmount
)
{
const
option
=
$
(
'
<option>
'
);
option
.
html
(
`€
${
amounts
[
i
]}
`
);
option
.
val
(
amounts
[
i
]);
select
.
append
(
option
);
}
}
if
(
sessionStorage
.
idx_input
)
{
select
.
val
(
sessionStorage
.
idx_amount
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment