regluit/frontend/templates/pledge_cancel.html

47 lines
1.8 KiB
HTML
Raw Normal View History

2012-02-15 16:03:58 +00:00
{% extends "basepledge.html" %}
2012-05-13 20:38:06 +00:00
{% load humanize %}
{% block title %}Pledge Cancelled{% endblock %}
{% block extra_css %}
2013-05-24 18:54:05 +00:00
<link type="text/css" rel="stylesheet" href="/static/css/campaign2.css" />
{% endblock %}
{% block doccontent %}
{% if error %}
<h2>Error</h2>
{{error}}
{% else %}
{% if transaction %}
<h2>Pledge Canceled</h2>
2014-12-17 17:50:23 +00:00
<div>You have asked to cancel your pledge of ${{ transaction.amount|floatformat:2|intcomma }} to <a href="{% url work work.id %}">{{ work.title }}</a>. </div>
<form method="post" action="{% url pledge_cancel campaign_id=campaign.id %}">
{% csrf_token %}
2012-05-23 14:22:48 +00:00
<input type="hidden" name="campaign_id" value="{{campaign.id}}" />
<input type="submit" value="Confirm Pledge Cancellation" id="cancelsubmit" />
</form>
<div>or return to <a href="{% url work work.id %}">{{ work.title }}</a> without canceling your pledge.</div>
{% comment %}
"Yes" should trigger whatever functionality we need to complete cancellation -- may differ depending on whether we've hit the back button from Amazon or the cancel-my-pledge link in pledge_modify.
Similarly. "Whoops" should use {{ try_again_url }} if we're coming out of Amazon, and should be a link back to the work page otherwise.
Not sure whether these want to be input buttons for forms, links, javascript, or what -- make them be whichever they need; I have applicable styling in any case. Will retrofit that.
This suggests we may need an if condition to determine which route we've come from since they may have different context (e.g. try_again_url I suspect only applies if we've come by way of the payment processor).
{% endcomment %}
{% else %}
<div>No relevant transaction to cancel for this campaign.</div>
{% endif %}
{% endif %}
{% endblock %}