comparison gpp/templates/donations/index.html @ 35:f77a1cdd7a46

Donations: first cut at a donations view and a form built for paypal.
author Brian Neal <bgneal@gmail.com>
date Sun, 07 Jun 2009 00:22:50 +0000
parents
children 9a29e9933959
comparison
equal deleted inserted replaced
34:d5d7e510ecd7 35:f77a1cdd7a46
1 {% extends 'base.html' %}
2 {% block title %}Donations{% endblock %}
3 {% block content %}
4 <h2>Donations</h2>
5 <p>
6 SurfGuitar101.com is a member supported website. We don't display ads or have other forms of
7 sponsorship. If you enjoy this website, the forums, chatting in IRC, the podcasts, surf music news,
8 the show calendar, and everything else, please consider making a small donation to help cover server
9 and hosting costs.
10 </p>
11 <p>
12 We are currently using Paypal to receive donations. You don't have to be a Paypal member to donate;
13 major credit cards are also accepted. If you really don't do Paypal, please
14 <a href="{% url contact-form %}">contact me</a> and we can work something else out.
15 </p>
16 <p>Thank you for donating to SurfGuitar101.com!</p>
17 <h3>Statistics for {% now "F, Y" %}:</h3>
18 <table>
19 <tr><th>Goal:</th><td>${{ goal }}</td></tr>
20 <tr><th>Gross:</th><td>${{ gross }}</td></tr>
21 <tr><th>Net:</th><td>${{ net }}</td></tr>
22 <tr><th>Left to Go:</th><td>${{ left }}</td></tr>
23 </table>
24 {% if donations %}
25 <h3>Donors for {% now "F, Y" %}:</h3>
26 <ul>
27 {% for donation in donations %}
28 <li>
29 {% if donation.is_anonymous %}
30 {{ anonymous }}
31 {% else %}
32 {% if donation.user %}
33 <a href="{% url bio-view_profile donation.user.username %}">{{ donation.user.username }}</a>
34 {% else %}
35 {{ donation.donor }}
36 {% endif %}
37 {% endif %}
38 </li>
39 {% endfor %}
40 </ul>
41 {% endif %}
42
43 <h3>Donation Form</h3>
44 <form action="{{ form_action }}" method="post">
45 <fieldset>
46 <legend>Make A Donation</legend>
47 <p>Please select an amount:</p>
48 <ul class="icon-list">
49 <li><input name="amount" type="radio" value="" id="amount_other" />
50 <label for="amount_other">Other:</label>
51 <input name="amount" type="text" value="25.00" id="amount_other" size="7" /></li>
52 <li><input name="amount" type="radio" value="5.00" id="amount_5" />
53 <label for="amount_5">$5</label></li>
54 <li><input name="amount" type="radio" value="10.00" id="amount_10" />
55 <label for="amount_10">$10</label></li>
56 <li><input name="amount" type="radio" value="15.00" id="amount_15" />
57 <label for="amount_15">$15</label></li>
58 <li><input name="amount" type="radio" value="20.00" id="amount_20" />
59 <label for="amount_20">$20</label></li>
60 </ul>
61 {% if user.is_authenticated %}
62 <input type="hidden" name="custom" value="{{ user.username }}" />
63 <p>You are currently logged in. Would you like your site username listed with your donation?</p>
64 <ul class="icon-list">
65 <li><input name="item_number" type="radio" value="{{ item_number }}" id="name_yes" />
66 <label for="name_yes">Yes, list me as {{ user.username }}</label></li>
67 {% else %}
68 <p>You are not currently logged in. Please <a href="{% url accounts-login %}">log in</a>
69 if you would like your site username listed with your donation. Otherwise you can have your
70 actual name (from Paypal) listed, or you can be listed as {{ anonymous }}.</p>
71 <ul class="icon-list">
72 <li><input name="item_number" type="radio" value="{{ item_number }}" id="name_yes" />
73 <label for="name_yes">Yes, list my name as gathered from Paypal</label></li>
74 {% endif %}
75 <li><input name="item_number" type="radio" value="{{ item_anon_number }}" id="name_no" />
76 <label for="name_no">No, list me as {{ anonymous }}</label></li>
77 </ul>
78 <input type="hidden" name="cmd" value="_donations" />
79 <input type="hidden" name="business" value="{{ business }}" />
80 <input type="hidden" name="charset" value="utf-8" />
81 <input type="hidden" name="return" value="http://{{ domain }}{% url donations-thanks %}" />
82 <input type="hidden" name="currency_code" value="USD" />
83 <input type="hidden" name="item_name" value="{{ item_name }}" />
84 <input type="hidden" name="rm" value="1" />
85 <input type="hidden" name="no_note" value="0" />
86 <input type="hidden" name="cn" value="Do you have any comments for {{ domain }}?" />
87 <input type="hidden" name="no_shipping" value="1" />
88 <input type="hidden" name="cancel_return" value="http://{{ domain }}{% url donations-index %}" />
89
90
91 <p><input type="image" src="https://www.paypal.com/en_US/i/btn/btn_donateCC_LG.gif" name="I1"
92 alt="Submit Button" /></p>
93 </fieldset>
94 </form>
95
96 {% endblock %}