regluit/frontend/templates/pledge_cancel.html

47 lines
1.8 KiB
HTML

{% extends "basepledge.html" %}
{% load humanize %}
{% block title %}Pledge Cancelled{% endblock %}
{% block extra_css %}
<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>
<div>You have asked to cancel your pledge of ${{ transaction.amount|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 %}
<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 %}