mirror of https://git.sr.ht/~sircmpwn/fosspay
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
158 lines
6.4 KiB
158 lines
6.4 KiB
{% extends "layout.html" %}
|
|
{% block scripts %}
|
|
<script>
|
|
window.stripe_key = "{{ _cfg("stripe-publish") }}";
|
|
window.avatar = "{{ avatar }}";
|
|
window.your_name = "{{ _cfg("your-name") }}";
|
|
window.bitcoin = "{{ _cfg("enable-bitcoin") }}" === "yes";
|
|
window.default_amount = {{ _cfg("default-amount") }};
|
|
window.default_type = "{{ _cfg("default-type") }}";
|
|
{% if user %}
|
|
window.email = "{{user.email}}";
|
|
{% endif %}
|
|
</script>
|
|
<script src="//checkout.stripe.com/checkout.js"></script>
|
|
<script src="static/index.js"></script>
|
|
{% endblock %}
|
|
{% block body %}
|
|
<div class="well">
|
|
<div class="container">
|
|
<h1>Donate to {{ _cfg("your-name") }}</h1>
|
|
<div class="row">
|
|
<div class="col-md-8 col-md-offset-2">
|
|
{% include "summary.html" %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<noscript>
|
|
<div class="container">
|
|
<div class="alert alert-danger">
|
|
<p>This page requires Javascript. It's necessary to send your credit card number to
|
|
<a href="https://stripe.com/">Stripe</a> directly, so you don't need to trust me with it.</p>
|
|
</div>
|
|
</div>
|
|
</noscript>
|
|
<div class="container text-center hidden" id="thanks">
|
|
{% include "post-donation-message.html" %}
|
|
<form id="new-donor-password" class="hidden" action="{{root}}/password-reset" method="POST">
|
|
<p>Set a password now if you want to manage your donations later:</p>
|
|
<input type="password" placeholder="Password" name="password" />
|
|
<input type="hidden" name="token" id="reset-token" />
|
|
<button class="btn btn-primary btn-sm">Submit</button>
|
|
</form>
|
|
</div>
|
|
<div class="container text-center" id="donation-stuff">
|
|
<h3>How much?</h3>
|
|
<div class="row">
|
|
<div class="col-md-8 col-md-offset-2">
|
|
<div class="btn-group btn-group-justified amounts" role="group" aria-label="...">
|
|
<div class="btn-group" role="group">
|
|
<button data-amount="5" type="button"
|
|
class="btn btn-default {{"active" if _cfgi("default-amount") == 5 else ""}}">
|
|
$5</button>
|
|
</div>
|
|
<div class="btn-group" role="group">
|
|
<button data-amount="10" type="button"
|
|
class="btn btn-default {{"active" if _cfgi("default-amount") == 10 else ""}}">
|
|
$10</button>
|
|
</div>
|
|
<div class="btn-group" role="group">
|
|
<button data-amount="20" type="button"
|
|
class="btn btn-default {{"active" if _cfgi("default-amount") == 20 else ""}}">
|
|
$20</button>
|
|
</div>
|
|
<div class="btn-group" role="group">
|
|
<button data-amount="50" type="button"
|
|
class="btn btn-default {{"active" if _cfgi("default-amount") == 50 else ""}}">
|
|
$50</button>
|
|
</div>
|
|
<div class="btn-group" role="group">
|
|
<button data-amount="custom" type="button" class="btn btn-default">Custom</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="row hidden" id="custom-amount" style="margin-top: 20px;">
|
|
<div class="col-md-4 col-md-offset-4">
|
|
<div class="form-group">
|
|
<div class="input-group">
|
|
<span class="input-group-addon">$</span>
|
|
<input id="custom-amount-text" type="text" value="13.37"
|
|
class="form-control" placeholder="Amount" />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<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">
|
|
<button data-frequency="once" type="button"
|
|
class="btn btn-default {{"active" if _cfg("default-type")=="once" else ""}}">
|
|
Once</button>
|
|
</div>
|
|
<div class="btn-group" role="group">
|
|
<button data-frequency="monthly" type="button"
|
|
class="btn btn-default {{"active" if _cfg("default-type")=="monthly" else ""}}">
|
|
Monthly</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% if len(projects) > 1 %}
|
|
<h3>What project?</h3>
|
|
<div class="row">
|
|
<div class="col-md-4 col-md-offset-4">
|
|
<div class="form-group">
|
|
<select id="project" class="form-control">
|
|
<option value="null"
|
|
{{ "selected" if selected_project == None else "" }}>None in particular</option>
|
|
{% for project in projects %}
|
|
<option value="{{ project.id }}"
|
|
{{ "selected" if selected_project == project.id else "" }}>{{ project.name }}</option>
|
|
{% endfor %}
|
|
</select>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
<div class="row">
|
|
<div class="col-md-4 col-md-offset-4">
|
|
<div class="form-group">
|
|
<input type="text" id="comments" class="form-control" placeholder="Any comments?" maxlength="512" />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="row" style="margin-top: 50px">
|
|
<div class="col-md-4 col-md-offset-4">
|
|
<div class="alert alert-danger hidden" id="errors">
|
|
<p></p>
|
|
</div>
|
|
<button class="btn btn-block btn-success" id="donate-button">Donate</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<hr />
|
|
<div class="container text-center">
|
|
{% if not user %}
|
|
<p>
|
|
<small class="text-muted">
|
|
Been here before? <a href="login">Log in</a> to view your donation
|
|
history, edit recurring donations, and so on.
|
|
</small>
|
|
</p>
|
|
{% endif %}
|
|
<p>
|
|
<small class="text-muted">
|
|
Powered by <a href="https://github.com/SirCmpwn/fosspay">fosspay</a>.
|
|
</small>
|
|
</p>
|
|
</div>
|
|
{% endblock %}
|
|
|