view sg101/templates/donations/index.html @ 1169:8d785b6ee532

Fix for sudden broken donations form.
author Brian Neal <bgneal@gmail.com>
date Mon, 20 Nov 2017 18:12:24 -0600
parents 7fb9bc5a1232
children a38ecbffbd59
line wrap: on
line source
{% extends 'v3/base.html' %}
{% load bio_tags %}
{% load cache %}
{% load donations_tags %}
{% block title %}Donations{% endblock %}
{% block content %}
<h2>Donations</h2>
<p>
SurfGuitar101.com is a member supported website. We don't display ads or have other forms of
sponsorship. If you enjoy this website, the forums, chatting in IRC, the podcasts, surf music news,
the show calendar, and everything else, please consider making a small donation to help cover server
and hosting costs.
</p>
<p>
We are currently using Paypal to receive donations. You don't have to be a Paypal member to donate;
major credit cards are also accepted. If you really don't do Paypal, please
<a href="{% url 'contact-form' %}">contact me</a> and we can work something else out.
</p>
<p>Thank you for donating to SurfGuitar101.com!</p>
<div class="row medium-unstack">
   <div class="columns">
      <h3>Make A Donation</h3>
      <form action="{{ form_action }}" method="post">
      <fieldset class="fieldset">
         <legend>Donation Form</legend>
         <p>Please enter an amount:</p>
         <div class="input-group">
            <span class="input-group-label">$</span>
            <input class="input-group-field" name="amount" type="number" value="5.00"/>
         </div>
         {% if user.is_authenticated %}
            <input type="hidden" name="custom" value="{{ user.username }}" />
            <p>You are currently logged in. Would you like your site username listed with your donation?</p>
            <ul class="no-bullet">
               <li><input name="item_number" type="radio" value="{{ item_number }}" id="name_yes" />
               <label for="name_yes">Yes, list me as {{ user.username }}</label></li>
         {% else %}
         <p>You are not currently logged in.
         Please <a href="{% url 'accounts-login' %}?next={% url 'donations-index' %}">log in</a>
         if you would like your site username listed with your donation. Otherwise you can have your
         actual name (from Paypal) listed, or you can be listed as {{ anonymous }}.</p>
            <ul class="no-bullet">
               <li><input name="item_number" type="radio" value="{{ item_number }}" id="name_yes" />
               <label for="name_yes">Yes, list my name as gathered from Paypal</label></li>
         {% endif %}
            <li><input name="item_number" type="radio" value="{{ item_anon_number }}" checked="checked" id="name_no" />
               <label for="name_no">No, list me as {{ anonymous }}</label></li>
         </ul>
         <input type="hidden" name="cmd" value="_donations" />
         <input type="hidden" name="business" value="{{ business }}" />
         <input type="hidden" name="charset" value="utf-8" />
         <input type="hidden" name="return" value="http://{{ domain }}{% url 'donations-thanks' %}" />
         <input type="hidden" name="currency_code" value="USD" />
         <input type="hidden" name="item_name" value="{{ item_name }}" />
         <input type="hidden" name="rm" value="1" />
         <input type="hidden" name="no_note" value="0" />
         <input type="hidden" name="cn" value="Do you have any comments for {{ domain }}?" />
         <input type="hidden" name="no_shipping" value="1" />
         <input type="hidden" name="cancel_return" value="http://{{ domain }}{% url 'donations-index' %}" />

         <p><input type="image" src="https://www.paypal.com/en_US/i/btn/btn_donateCC_LG.gif" name="I1"
            alt="Submit Button" title="Submit Donation" /></p>
      </fieldset>
      </form>
   </div>
   <div class="columns">
      <h3>Statistics for {% now "F, Y" %}:</h3>
      <table>
         <tr><th>Goal:</th><td>${{ goal }}</td></tr>
         <tr><th>Gross:</th><td>${{ gross }}</td></tr>
         <tr><th>Net:</th><td>${{ net }}</td></tr>
         <tr><th>Left to Go:</th><td>${{ left }}</td></tr>
         <tr><th>Progress:</th><td><progress max="100" value="{{ pct }}"></progress></td></tr>
      </table>
   </div>
</div>

<div class="row medium-unstack">
   <div class="columns">
      <h3>Donors for {% now "F, Y" %}</h3>
      {% if donations %}
         <ol>
      {% endif %}
      {% for donation in donations %}
         <li>
         {% if donation.is_anonymous %}
            {{ anonymous }}
         {% else %}
            {% if donation.user %}
               {% profile_link donation.user.username %}
            {% else %}
               {{ donation.donor }}
            {% endif %}
         {% endif %}
         </li>
      {% empty %}
         <div class="warning callout">
            <i class="fi-asterisk size-21"></i>
            We haven't received any donations this month. You could be the first!
         </div>
      {% endfor %}
      {% if donations %}
         </ol>
      {% endif %}
   </div>
   <div class="columns">
      <h3>Hall of Fame Donors</h3>
      {% cache 3600 top_donors_tag %}
         {% top_donors 20 %}
      {% endcache %}
   </div>
</div>

<h2>More ways to help</h2>
<p>
Another way to help out SG101 is to buy products and services through our
affiliate links, below. These are all services that Brian uses and can vouch
for. If you are in the market for what these merchants are selling just click
through these links, buy something, and SG101 will get a small kickback.
Please contact Brian if you have any questions or concerns about our affiliate
links. Thanks!
</p>
<dl>
   <dt><a href="http://www.namecheap.com?aff=38776">Namecheap.com</a></dt>
   <dd>
<a href="http://www.namecheap.com?aff=38776"><img src="https://files.namecheap.com/graphics/linkus/468x60-6.gif" height="60" width="468" border="0" alt="Namecheap.com - Cheap domain name registration, renewal and transfers - Free SSL Certificates - Web Hosting"></a>
   </dd>
   <dt><a href="https://www.linode.com/?r=d4feeb528d2d09a9b6c715fbb7c9776155ec8ebe">Linode.com</a></dt>
   <dd>
   "Deploy and manage Linux virtual servers in
   the Linode cloud. Get a server running in seconds with your choice of Linux
   distro, resources, and node location." Brian highly recommends Linode for your
   VPS hosting needs. Free trials available. Sign up using
   <a href="https://www.linode.com/?r=d4feeb528d2d09a9b6c715fbb7c9776155ec8ebe">this link</a>,
   remain a customer for 90 days and SG101 will receive a credit.
   </dd>
</dl>
{% endblock %}