Skip to content

Commit 7437c9d

Browse files
committed
Improve donate page interactions
1 parent 24e544d commit 7437c9d

File tree

2 files changed

+20
-21
lines changed

2 files changed

+20
-21
lines changed

assets/js/donate.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ function initEventHandlers() {
215215
}
216216
const is_custom = selected.id === 'custom';
217217
const amount_str = is_custom ? document.querySelector('.amount-input').value : selected.value;
218-
const is_monthly = is_custom ? document.querySelector('input[name="custom-cycle"]:checked').value === 'monthly' : true;
218+
const is_monthly = is_custom ? document.getElementById('custom-montly').checked : true;
219219
const is_corporate = document.getElementById("btn-corporate-tiers").classList.contains("active");
220220
const channel = document.getElementById("channel-options").value;
221221

@@ -328,7 +328,7 @@ function initEventHandlers() {
328328
// Auto select Custom card when interacting with its inputs
329329
const customRadio = document.getElementById("custom");
330330
const customInputs = document.querySelectorAll(
331-
".amount-input, input[name='custom-cycle']"
331+
".amount-input, input[id='custom-montly']"
332332
);
333333

334334
customInputs.forEach(el => {

donate/index.html

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -267,23 +267,19 @@ <h3 class="tier-title">Platinum</h3>
267267
<input id="custom" class="sponsor-radio" type="radio" name="sponsor">
268268
<div class="sponsor-card">
269269
<h3>Custom</h3>
270-
<div class="amount-wrapper">
271-
<input id="amount-input" class="amount-input" inputmode="decimal"
272-
placeholder="Enter amount (USD)" min="1"
273-
step="1" required>
274-
<div id="amount-prefix" class="currency-symbol">$</div>
275-
<div id="amount-suffix" class="currency-symbol">USD</div>
276-
</div>
277-
278-
<!-- Payment cycle selector -->
279-
<div class="cycle-wrapper">
280-
<label class="cycle-option">
281-
<input type="radio" name="custom-cycle" value="monthly" checked>
282-
Monthly
283-
</label>
284-
<label class="cycle-option">
285-
<input type="radio" name="custom-cycle" value="onetime">
286-
One-time
270+
<div class="d-flex align-items-center gap-3 mb-2">
271+
<div class="amount-wrapper">
272+
<input id="amount-input" class="amount-input"
273+
inputmode="decimal"
274+
placeholder="Enter amount (USD)" min="1"
275+
step="1" required>
276+
<div id="amount-prefix" class="currency-symbol">$</div>
277+
<div id="amount-suffix" class="currency-symbol">USD</div>
278+
</div>
279+
<!-- Monthly checkbox -->
280+
<label class="checkbox-label mb-0">
281+
<input type="checkbox" id="custom-montly" checked>
282+
<span class="checkbox"></span>Monthly
287283
</label>
288284
</div>
289285
</div>
@@ -522,9 +518,12 @@ <h2 class="accordion-header" id="faqHeading3">
522518
<div class="accordion-body">
523519
At present, Axmol Engine does not operate its own nonprofit
524520
entity.
525-
Instead, we rely on the <strong><a href="https://opencollective.com/opensource">Open Source Collective</a>
521+
Instead, we rely on the <strong><a
522+
href="https://opencollective.com/opensource">Open Source
523+
Collective</a>
526524
(OSC)</strong>, a
527-
U.S.-registered 501(c)(6) nonprofit fiscal host dedicated to supporting
525+
U.S.-registered 501(c)(6) nonprofit fiscal host dedicated to
526+
supporting
528527
open source
529528
projects.<br><br>
530529
By sponsoring Axmol through OSC, Corporate contributors benefit

0 commit comments

Comments
 (0)