Make bitcoin optional

master
Drew DeVault 9 years ago
parent db7cd6dd17
commit fb45e17b65
  1. 3
      config.ini.example
  2. 2
      scripts/index.js
  3. 3
      templates/index.html

@ -23,3 +23,6 @@ your_email=joe@bloe.com
# SQL connection string
connection-string=postgresql://postgres@localhost/fosspay
# Click here first: https://dashboard.stripe.com/account/bitcoin/enable
enable-bitcoin=no

@ -72,7 +72,7 @@
description: donation.type == "monthly" ? "Monthly Donation" : "One-time Donation",
panelLabel: "Donate {{amount}}",
amount: donation.amount,
bitcoin: donation.type == "once",
bitcoin: donation.type == "once" && window.bitcoin,
token: function(token) {
e.target.setAttribute("disabled", "");
e.target.textContent = "Submitting...";

@ -4,6 +4,7 @@
window.stripe_key = "{{ _cfg("stripe-publish") }}";
window.avatar = "{{ avatar }}";
window.your_name = "{{ _cfg("your-name") }}";
window.bitcoin = "{{ _cfg("enable-bitcoin") }}" === "yes";
</script>
<script src="//checkout.stripe.com/checkout.js"></script>
<script src="static/index.js"></script>
@ -79,7 +80,9 @@ window.your_name = "{{ _cfg("your-name") }}";
<h3>How often?</h3>
<div class="row">
<div class="col-md-4 col-md-offset-4">
{% if _cfg("enable-bitcoin") == "yes" %}
<p class="text-muted"><small>Bitcoin is only supported for one-time donations.</small></p>
{% endif %}
<div class="form-group">
<div class="btn-group btn-group-justified frequencies" role="group" aria-label="...">
<div class="btn-group" role="group">

Loading…
Cancel
Save