regluit/frontend/templates/pledge_cancel.html

49 lines
1.8 KiB
HTML
Raw Normal View History

2015-04-28 03:24:02 +00:00
{% extends 'basepledge.html' %}
2016-05-11 14:41:50 +00:00
2012-05-13 20:38:06 +00:00
{% load humanize %}
2018-01-30 18:19:40 +00:00
{% load sass_tags %}
{% block title %}Pledge Cancelled{% endblock %}
{% block extra_css %}
2018-01-30 18:19:40 +00:00
<link type="text/css" rel="stylesheet" href="{% sass_src 'scss/campaign2.scss' %}" />
{% endblock %}
{% block doccontent %}
{% if error %}
<h2>Error</h2>
{{error}}
{% else %}
{% if transaction %}
<h2>Pledge Canceled</h2>
2015-04-28 03:24:02 +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>
2015-04-28 03:24:02 +00:00
<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>
2015-04-28 03:24:02 +00:00
<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 %}