Make bitcoin optional

This commit is contained in:
Drew DeVault 2015-09-05 21:36:13 -04:00
parent db7cd6dd17
commit fb45e17b65
3 changed files with 7 additions and 1 deletions

View File

@ -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

View File

@ -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...";

View File

@ -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">