[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [donate/master] Add BTCPay widget to /cryptocurrency
commit f5f7341d82f547a1c9ecc0210432e3f5d0015086
Author: Jenny Liu <jliu@xxxxxxxxxxxxxxx>
Date: Wed Sep 11 23:51:38 2019 +0000
Add BTCPay widget to /cryptocurrency
Issue #42446
---
templates/cryptocurrency.twig | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/templates/cryptocurrency.twig b/templates/cryptocurrency.twig
index dd12f04b..a8ab0fd6 100644
--- a/templates/cryptocurrency.twig
+++ b/templates/cryptocurrency.twig
@@ -23,6 +23,30 @@
{% trans %}Thanks for your interest in donating cryptocurrency to the Tor Project.{% endtrans %}
</p>
</div>
+ <div class="btc-form">
+ <form method="POST" action="https://fund.btcpayserver.org/api/v1/invoices" style="width:418px; margin:auto;">
+ <input type="hidden" name="storeId" value="9Ac1k57DGMpL2QeYeqSiNcpq6tor6NAGgiuYYij3tPaE" />
+ <div style="text-align:center;display:block;">
+ <div>
+ <button style="cursor:pointer; font-size:25px; line-height: 25px; background: rgba(0,0,0,.1); height: 30px; width: 45px; border:none; border-radius: 60px; margin: auto;" onclick="event.preventDefault(); var price = parseInt(document.querySelector('#btcpay-input-price').value); if ('-' == '-' && (price - 1) < 1) { return; } document.querySelector('#btcpay-input-price').value = parseInt(document.querySelector('#btcpay-input-price').value) - 1;">
+ -
+ </button>
+ <input type="text" id="btcpay-input-price" name="price" min="1" max="20" step="1" value="10" style="border: none; background-image: none; background-color: transparent; -webkit-box-shadow: none ; -moz-box-shadow: none ; -webkit-appearance: none ; width: 3em; text-align: center; font-size: 25px; margin: auto; border-radius: 5px; line-height: 35px; background: #fff;" oninput="event.preventDefault();isNaN(event.target.value) || event.target.value <= 0 ? document.querySelector('#btcpay-input-price').value = 10 : event.target.value" />
+ <button style="cursor:pointer; font-size:25px; line-height: 25px; background: rgba(0,0,0,.1); height: 30px; width: 45px; border:none; border-radius: 60px; margin: auto;" onclick="event.preventDefault(); var price = parseInt(document.querySelector('#btcpay-input-price').value); if ('+' == '-' && (price - 1) < 1) { return; } document.querySelector('#btcpay-input-price').value = parseInt(document.querySelector('#btcpay-input-price').value) + 1;">
+ +
+ </button>
+ </div>
+ <select onmouseover="this.style.border='solid #ccc 1px'; this.style.padding='0px'" onmouseout="this.style.border='0'; this.style.padding='1px'" onchange="document.querySelector('input[type = hidden][name = currency]').value = event.target.value" style="border: 0; display: block; padding: 1px; margin: auto auto 5px auto; font-size: 11px; background: 0 0; cursor: pointer;">
+ <option value="USD">USD</option>
+ <option value="GBP">GBP</option>
+ <option value="EUR">EUR</option>
+ <option value="BTC">BTC</option>
+ </select>
+ </div>
+ <input type="hidden" name="currency" value="USD" />
+ <input type="image" src="https://fund.btcpayserver.org/img/paybutton/pay.png" name="submit" style="width:209px; display:block; margin:auto;" alt="Pay with BtcPay, Self-Hosted Bitcoin Payment Processor">
+ </form>
+ </div>
<p>
{% trans %}Please fill out this form and then send your coins to the appropriate wallet.{% endtrans %} {% trans %}Filling out the form is not necessary, but doing so will notify us about your donation quickly, allow us to send you an acknowledgement, and let us know your communication preferences.{% endtrans %}
</p>
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits