Merge branch 'relaunch' into relaunch_ry
commit
57514e4ba0
|
@ -19,6 +19,7 @@ You have a balance of {{ user.credit.balance }} donation credits. <br />
|
|||
You have pledged {{ user.credit.pledged }} donation credits to ungluing campaigns.<br />
|
||||
You have {{ user.credit.available }} donation credits available to pledge or transfer.<br />
|
||||
</p>
|
||||
<div class="clearfix">
|
||||
<h2>Donation Credit Transfers</h2>
|
||||
{% if transfer_message %}
|
||||
<p>{{ transfer_message }}
|
||||
|
@ -36,6 +37,25 @@ You may transfer up to {{ user.credit.available }} donation credits to another U
|
|||
{{ transfer_form.as_p }}
|
||||
<input id="transfer_submit" type="submit" name="transfer" value="Transfer Credits" />
|
||||
</form>
|
||||
</div>
|
||||
<div class="clearfix">
|
||||
<h2>About Donation 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>Donation credits are not turned on yet.</p>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
|
||||
|
|
|
@ -20,13 +20,19 @@
|
|||
<div class="jsmod-content">
|
||||
|
||||
<div><h2>Funding Your Pledge</h2>
|
||||
<div>We're so happy that you've decided to {% if modified %}increase your pledge{% else %}join{% endif %} this campaign. We have two ways we can fund your pledge of ${{preapproval_amount}}.
|
||||
<div>We're so happy that you've decided to {% if modified %}increase your pledge{% else %}join{% endif %} this campaign.
|
||||
{% if nonprofit.is_on %}
|
||||
We have two ways we can fund your pledge of ${{preapproval_amount}}.
|
||||
<ol>
|
||||
<li>You can <a href="#donate">make a donation now</a> to {{nonprofit.name}}, a non-profit charity that's working with Unglue.it to give books to the world.</li>
|
||||
<li>You can <a href="#authorize">give us your credit card</a> information now; we'll charge your card only if the campaign succeeds.</li>
|
||||
</ol>
|
||||
{% else %}
|
||||
To fund your pledge of ${{preapproval_amount}}, you can <a href="#authorize">give us your credit card</a> information now; we'll charge your card only if the campaign succeeds.
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% if nonprofit.is_on %}
|
||||
<div id="donate" class="clearfix">
|
||||
<h3>Donate to Charity</h3>
|
||||
{% if request.user.credit.balance %}You have a donation credit of ${{ request.user.credit.balance }}. The amount that's uncommitted is ${{ request.user.credit.available }}, so you need to add at least ${{ needed }}.{% endif %}
|
||||
|
@ -42,6 +48,7 @@
|
|||
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div id="authorize" class="clearfix">
|
||||
<h3>Pledge by Credit Card</h3>
|
||||
<p>Unglue.it uses Stripe to securely manage your Credit Card information.
|
||||
|
@ -52,7 +59,7 @@
|
|||
<form action="" method="post" id="payment-form">
|
||||
{% csrf_token %}
|
||||
{{ form.non_field_errors }}
|
||||
{{form}}
|
||||
{{ form.as_p }}
|
||||
<payment key="{{STRIPE_PK}}"></payment>
|
||||
<input name="cc_submit" type="submit" value="Verify Credit Card" id="cc_submit" />
|
||||
</form>
|
||||
|
|
|
@ -588,7 +588,8 @@ class DonationView(TemplateView):
|
|||
return self.render_to_response(context)
|
||||
|
||||
def get_context_data(self, *args, **kwargs):
|
||||
context = {'user' : self.request.user}
|
||||
context = {'user' : self.request.user,'nonprofit': settings.NONPROFIT}
|
||||
context['donate_form'] = DonateForm(initial={'username':self.request.user.username})
|
||||
return context
|
||||
|
||||
class PledgeView(FormView):
|
||||
|
|
|
@ -284,5 +284,6 @@ MAINTENANCE_MODE = False
|
|||
MAINTENANCE_IGNORE_URLS = {}
|
||||
|
||||
class NONPROFIT:
|
||||
is_on = True
|
||||
name = 'Library Renewal'
|
||||
link = 'http://127.0.0.1:8000/donate_to_campaign/'
|
Loading…
Reference in New Issue