[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [donate-static/master] Made the intro part of cryptocurrency editable



commit 04486d321b851f02f0fc48694441baa8a5f98c7e
Author: Peter Haight <peterh@xxxxxxxxxxxxxxx>
Date:   Fri Oct 9 16:41:01 2020 -0700

    Made the intro part of cryptocurrency editable
    
    Moved the intro part of the cryptocurrency page into the body field so
    that it's editable.
    
    Issue #48280
---
 content/cryptocurrency/contents.lr | 51 +++++++++++++++++++++++++++++++++++++-
 templates/cryptocurrency.html      | 48 +----------------------------------
 2 files changed, 51 insertions(+), 48 deletions(-)

diff --git a/content/cryptocurrency/contents.lr b/content/cryptocurrency/contents.lr
index 55a4f25f..1dafb169 100644
--- a/content/cryptocurrency/contents.lr
+++ b/content/cryptocurrency/contents.lr
@@ -14,6 +14,55 @@ header_description:
 ---
 header_description_alignment: 
 ---
-body: 
+body:
+
+<div class="intro-text">
+  <div class="preamble">
+    <p>
+      'Donate using BTCPayServer'
+    </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>
+
+    <a class="btc-onion-link" href="http://sqgf7aihkpxwdtcb3zjf62jo63o5yqjckukioas3aropdmcay4ymepid.onion/apps/2xcGbmQoXHddtFPs5oYJJ79DCrFC/pos";>Donate using the BTC onion site</a>
+  </div>
+  <div class="preamble">
+    <p>
+      Donate using wallet addresses
+    </p>
+  </div>
+  <p>
+    Please fill out this form and then send your coins to the appropriate wallet. 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.
+  </p>
+  <p>
+    Below you will find the cryptocurrencies we accept and our wallet addresses. The wallet addresses will be displayed again after you complete the form. Please make sure to copy the wallet addresses exactly when making your donation, as we cannot recover funds sent to the wrong wallet.
+  </p>
+  <p>
+    If you have any questions, or would like to donate a cryptocurrency not listed below, please email us at giving@xxxxxxxxxxxxxx.
+  </p>
+</div>
+
 ---
 html: cryptocurrency.html
diff --git a/templates/cryptocurrency.html b/templates/cryptocurrency.html
index 76672baf..014c4eb5 100644
--- a/templates/cryptocurrency.html
+++ b/templates/cryptocurrency.html
@@ -4,53 +4,7 @@
       <a class="hyperlinks links" href="/donate">{{ _('Want to donate by credit card or PayPal?') }}</a>
     </div>
     <div class="intro-text-section container">
-      <div class="intro-text">
-        <div class="preamble">
-          <p>
-            {{ _('Donate using BTCPayServer') }}
-          </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>
-
-          <a class="btc-onion-link" href="http://sqgf7aihkpxwdtcb3zjf62jo63o5yqjckukioas3aropdmcay4ymepid.onion/apps/2xcGbmQoXHddtFPs5oYJJ79DCrFC/pos";>{{ _('Donate using the BTC onion site') }}</a>
-        </div>
-        <div class="preamble">
-          <p>
-            {{ _('Donate using wallet addresses') }}
-          </p>
-        </div>
-        <p>
-          {{ _('Please fill out this form and then send your coins to the appropriate wallet.') }} {{ _('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.') }}
-        </p>
-        <p>
-          {{ _('Below you will find the cryptocurrencies we accept and our wallet addresses.') }} {{ _('The wallet addresses will be displayed again after you complete the form.') }} {{ _('Please make sure to copy the wallet addresses exactly when making your donation, as we cannot recover funds sent to the wrong wallet.') }}
-        </p>
-        <p>
-        {{ _('If you have any questions, or would like to donate a cryptocurrency not listed below, please email us at giving@xxxxxxxxxxxxxx.') }}
-        </p>
-      </div>
+      {{ this.body }}
     </div>
     <noscript>
       <form action="/cryptocurrency/donate" method="POST">



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits