* [gentoo-commits] sites/www:master commit in: donate/
@ 2016-09-24 0:31 Robin H. Johnson
0 siblings, 0 replies; 3+ messages in thread
From: Robin H. Johnson @ 2016-09-24 0:31 UTC (permalink / raw
To: gentoo-commits
commit: 0d3af7ac18335c4ca74f9350e586313b94ea98f1
Author: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
AuthorDate: Sat Sep 24 00:26:46 2016 +0000
Commit: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
CommitDate: Sat Sep 24 00:30:48 2016 +0000
URL: https://gitweb.gentoo.org/sites/www.git/commit/?id=0d3af7ac
donate: set $5 min donation.
The foundation has recieved a number of small fraudulant donations,
possibly made to test stolen credit card numbers. These donations had
chargebacks fee levied against us by Paypal.
We are striving to verify the donations where possible, but this will
help reduce them.
Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org>
donate/index.html | 23 +++++++++++++++++++----
1 file changed, 19 insertions(+), 4 deletions(-)
diff --git a/donate/index.html b/donate/index.html
index 7168a69..8aa2f05 100644
--- a/donate/index.html
+++ b/donate/index.html
@@ -28,7 +28,20 @@ layout: tyrian
<div class="panel-body">
You can easily make a one-time contribution using PayPal:
<br><br>
- <form action="https://www.paypal.com/cgi-bin/webscr" method="post" class="donate-form">
+ <script type="text/javascript">
+ function validate_donation_form() {
+ var amount_str = document.forms["donate-form"]["amount"].value;
+ var amount_num = +amount_str; // unary conversion op
+ if (isNaN(amount_num)) {
+ return false;
+ }
+ if (amount_num < 5.00) {
+ return false;
+ }
+ return true;
+ }
+ </script>
+ <form action="https://www.paypal.com/cgi-bin/webscr" method="post" class="donate-form" name="donate-form" onsubmit="return validate_donation_form()">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="paypal@gentoo.org">
<input type="hidden" name="item_name" value="Gentoo Linux Support">
@@ -41,7 +54,7 @@ layout: tyrian
<input type="hidden" name="cancel_return" value="https://www.gentoo.org/donate/cancel.html">
<div class="input-group input-group-lg">
<span class="input-group-addon">US $</span>
- <input type="text" class="form-control" placeholder="Enter Amount" name="amount">
+ <input type="text" class="form-control" placeholder="Enter Amount" name="amount" min="5.00" step="0.01">
<span class="input-group-btn">
<button class="btn btn-danger" type="submit"><span class="fa fa-fw fa-heart"></span> Donate!</button>
</span>
@@ -50,7 +63,9 @@ layout: tyrian
<br>
<small>
You can use this form even if you don't have or want to create a PayPal account.
- On the next screen, you can pay with your credit card instead.
+ On the next screen, you can pay with your credit card instead. Please note that
+ there is a US$ 5 minimum, and you may be contacted to confirm your donation is
+ not fraudulent.
</small>
</div>
</div>
@@ -113,4 +128,4 @@ layout: tyrian
Our presence there was only possible thanks to your support<br>
Picture by Hanno Böck/CC-0
</small>
-</p>
\ No newline at end of file
+</p>
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [gentoo-commits] sites/www:master commit in: donate/
@ 2016-10-14 11:45 Alex Legler
0 siblings, 0 replies; 3+ messages in thread
From: Alex Legler @ 2016-10-14 11:45 UTC (permalink / raw
To: gentoo-commits
commit: 1e2cee911253fb3ee38aa305e97fa1f4ac7cd515
Author: Alex Legler <alex <AT> a3li <DOT> li>
AuthorDate: Fri Oct 14 11:35:36 2016 +0000
Commit: Alex Legler <a3li <AT> gentoo <DOT> org>
CommitDate: Fri Oct 14 11:35:36 2016 +0000
URL: https://gitweb.gentoo.org/sites/www.git/commit/?id=1e2cee91
Improve donation checking UX
donate/index.html | 21 +++++++++++----------
1 file changed, 11 insertions(+), 10 deletions(-)
diff --git a/donate/index.html b/donate/index.html
index 8aa2f05..d36d368 100644
--- a/donate/index.html
+++ b/donate/index.html
@@ -30,12 +30,13 @@ layout: tyrian
<br><br>
<script type="text/javascript">
function validate_donation_form() {
- var amount_str = document.forms["donate-form"]["amount"].value;
+ var input_field = $('#donation-amount');
+
+ var amount_str = input_field.value;
var amount_num = +amount_str; // unary conversion op
- if (isNaN(amount_num)) {
- return false;
- }
- if (amount_num < 5.00) {
+ if (isNaN(amount_num) || amount_num < 5.00) {
+ $('#donation-input-group').addClass('has-error');
+ $('#min-notice').addClass('text-danger');
return false;
}
return true;
@@ -52,9 +53,9 @@ layout: tyrian
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="return" value="https://www.gentoo.org/donate/thanks.html">
<input type="hidden" name="cancel_return" value="https://www.gentoo.org/donate/cancel.html">
- <div class="input-group input-group-lg">
+ <div class="input-group input-group-lg" id="donation-input-group">
<span class="input-group-addon">US $</span>
- <input type="text" class="form-control" placeholder="Enter Amount" name="amount" min="5.00" step="0.01">
+ <input id="donation-amount" type="number" class="form-control" placeholder="Enter Amount" name="amount" min="5.00" step="0.01" required>
<span class="input-group-btn">
<button class="btn btn-danger" type="submit"><span class="fa fa-fw fa-heart"></span> Donate!</button>
</span>
@@ -63,9 +64,9 @@ layout: tyrian
<br>
<small>
You can use this form even if you don't have or want to create a PayPal account.
- On the next screen, you can pay with your credit card instead. Please note that
- there is a US$ 5 minimum, and you may be contacted to confirm your donation is
- not fraudulent.
+ On the next screen, you can pay with your credit card instead.
+ <span id="min-notice">Please note that there is a US$ 5 minimum</span>,
+ and you may be contacted to confirm your donation is not fraudulent.
</small>
</div>
</div>
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [gentoo-commits] sites/www:master commit in: donate/
@ 2016-11-15 17:56 Robin H. Johnson
0 siblings, 0 replies; 3+ messages in thread
From: Robin H. Johnson @ 2016-11-15 17:56 UTC (permalink / raw
To: gentoo-commits
commit: b451fae0e5ff70b38adc2ec1c469a6463fd476b4
Author: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
AuthorDate: Tue Nov 15 17:56:40 2016 +0000
Commit: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
CommitDate: Tue Nov 15 17:56:40 2016 +0000
URL: https://gitweb.gentoo.org/sites/www.git/commit/?id=b451fae0
Donation button was broken for a month :-(.
Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org>
donate/index.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/donate/index.html b/donate/index.html
index d36d368..7b105ed 100644
--- a/donate/index.html
+++ b/donate/index.html
@@ -32,7 +32,7 @@ layout: tyrian
function validate_donation_form() {
var input_field = $('#donation-amount');
- var amount_str = input_field.value;
+ var amount_str = input_field[0].value;
var amount_num = +amount_str; // unary conversion op
if (isNaN(amount_num) || amount_num < 5.00) {
$('#donation-input-group').addClass('has-error');
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-11-15 17:56 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-14 11:45 [gentoo-commits] sites/www:master commit in: donate/ Alex Legler
-- strict thread matches above, loose matches on Subject: below --
2016-11-15 17:56 Robin H. Johnson
2016-09-24 0:31 Robin H. Johnson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox