regluit/frontend/templates/gift.html

61 lines
2.2 KiB
HTML

{% extends "basedocumentation.html" %}
{% load humanize %}
{% block title %}Gifts{% endblock %}
{% block extra_extra_head %}
<link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.13/themes/ui-lightness/jquery-ui.css" type="text/css" media="screen">
<link type="text/css" rel="stylesheet" href="/static/css/pledge.css" />
{{ transfer_form.media.css }}
<script type="text/javascript" src="{{ jquery_ui_home }}" ></script>
{{ transfer_form.media.js }}
{% endblock %}
{% block doccontent %}
<h2>gift Credits</h2>
<p>
You have a balance of {{ user.credit.balance }} gift credits. <br />
You have pledged {{ user.credit.pledged }} gift credits to ungluing campaigns.<br />
You have {{ user.credit.available }} gift credits available to pledge or transfer.<br />
</p>
<div class="clearfix">
<h2>Gift Credit Transfers</h2>
{% if transfer_message %}
<p>{{ transfer_message }}
{% if transfer_amount %}
<br /> Recipient: <a href="{% url supporter recipient %}">{{ recipient }}</a>
<br /> Amount: {{ transfer_amount }} gift credits
{% endif %}
</p>
{% endif %}
<p>
You may transfer up to {{ user.credit.available }} gift credits to another Unglue.it user.<br />
</p>
<form action="#" method="POST">
{% csrf_token %}
{{ transfer_form.as_p }}
<input id="transfer_submit" type="submit" name="transfer" value="Transfer Credits" />
</form>
</div>
<div class="clearfix">
<h2>About Gift Credits</h2>
{% if nonprofit.is_on %}
<p>Unglue.it uses donation credits to cooperate with a non-profit charity, {{ nonprofit.name }} in the ungluing of books. When you make a donation to {{ nonprofit.name }}, you can get credits for your donation. Then you can direct how {{ nonprofit.name }} uses your donation in support of ungluing campaigns. You can also transfer your credits to other ungluers. To make a donation, and receive credits, click the button!
</p>
<div id="donate_charity">
<form method="GET" action="{{nonprofit.link}}">
{{ donate_form.non_field_errors }}
{{donate_form}}
<input name="donate_submit" type="submit" value="Go Donate!" id="donate_submit" />
</form>
</div>
</div>
{% else %}
<p>Gift credits are not turned on yet.</p>
{% endif %}
{% endblock %}