Source

pixels_for_food / templates / checkout.html

Full commit
{% extends "base.html" %}

{% block header %}
<script language="javascript" type="text/javascript">
    function donation(){
        $("#id_anonymous").attr('checked', false);
        $("#donation_form").submit();
    }
    function anon_donation(){
        $("#id_name").attr("value", "anonymous");
        $("#id_email").attr("value", "");
        $("#id_anonymous").attr('checked', true);
        $("#donation_form").submit();
    }
    
    
</script>
{% endblock %}

{%block content %}
<div id="middleBar">
<div id="middleBar_Content">
<h3>You are donating <span id="poundTotal">{{form.initial['pounds']}}</span> lbs of food worth $<span id="total">{{form.initial['amount']}}</span></h3>
</div>
</div>
<div id="content" >
    
    <form method="post" id="donation_form">
        <table border="0" width="50%" align="center" >
        {{ form.as_table }}
            <tr>
                <td align="center"><input type="button" value="Donate" onclick="donation();"/></td>
                <td align="center"><input type="button" value="Anonymouns Donation" onclick="anon_donation();"/></td>
            </tr>
        </table>
    </form>
    
</div>
{% endblock%}