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
Small Technology Foundation web site
spikes
patronage
Commits
2524c1ce
Verified
Commit
2524c1ce
authored
Jul 27, 2019
by
Aral Balkan
Browse files
Fix custom donation amount value; fix button font size
parent
8aa47106
Changes
3
Hide whitespace changes
Inline
Side-by-side
fund-us/css/index.css
View file @
2524c1ce
...
...
@@ -285,7 +285,7 @@ input[name="donationAmount"]:checked + label
@media
only
screen
and
(
min-width
:
380px
)
{
#donateButton
{
font-size
:
2
1
px
;
font-size
:
2
0
px
;
}
}
...
...
fund-us/index.html
View file @
2524c1ce
...
...
@@ -8,6 +8,8 @@
html
{
color
:
black
;
background-color
:
white
;
font-family
:
-apple-system
,
BlinkMacSystemFont
,
"Segoe UI"
,
Cantarell
,
Ubuntu
,
Helvetica
,
Arial
,
sans-serif
}
</style>
<link
rel=
'stylesheet'
href=
'css/index.css'
>
...
...
fund-us/js/index.js
View file @
2524c1ce
...
...
@@ -55,8 +55,7 @@ function getDonationAmount () {
// If the person has not chosen a donation amount, check if they entered a custom amount.
if
(
selectedDonationAmount
==
0
)
{
selectedDonationAmount
=
Number
(
document
.
getElementById
(
'
otherDonationAmount
'
).
value
)
*
100
console
.
log
(
'
Donation amount:
'
+
selectedDonationAmount
)
selectedDonationAmount
=
Number
(
document
.
getElementById
(
'
otherDonationAmount
'
).
value
)
}
return
selectedDonationAmount
...
...
@@ -82,13 +81,9 @@ document.getElementById('donateButton').addEventListener('click', function(e) {
// Get the details we need for the server call.
var
selectedDonationType
=
document
.
querySelector
(
'
input[name="donationType"]:checked
'
).
value
console
.
log
(
"
Selected donation type:
"
+
selectedDonationType
)
var
isDonationRecurring
=
(
selectedDonationType
==
'
monthly
'
)
var
donationAmount
=
getDonationAmount
()
console
.
log
(
"
Donation amount >>>>
"
+
donationAmount
)
console
.
log
(
`Is donation recurring?
${
isDonationRecurring
}
`
)
const
stripeRedirect
=
isDonationRecurring
?
stripe
.
redirectToCheckout
({
//
// Patronage.
...
...
Write
Preview
Markdown
is supported
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