Skip to content

Commit 15c8daf

Browse files
committed
fix(donations): various wording improvements in donation flow
1 parent ee7354c commit 15c8daf

5 files changed

Lines changed: 121 additions & 107 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ python manage.py runserver
6666
If you'd like to generate donation receipts PDFs, also run this
6767

6868
```bash
69-
docker run -p 3000:3000 ghcr.io/kuboschek/pdf-render-server
69+
docker run -p 3000:3000 ghcr.io/kuboschek/pdf-render-server:master
7070
```
7171

7272
If you'd like to also receive Stripe webhooks: Install the Stripe CLI.

donation_receipts/templates/donation_receipts/donationreceipt_form.html

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,18 @@
22
{% load uikit_tags %}
33

44
{% block content %}
5+
<h1>Donation Receipt - Address Entry</h1>
6+
<p>Please provide your full name and address below. We will use this information to generate your donation receipt. Please include the following minimum information:</p>
7+
<p>
8+
GivenName FamilyName<br />
9+
Example Street 1<br />
10+
12345 Example City<br />
11+
Country<br />
12+
</p>
13+
514
<form class="uk-form-horizontal" method="POST">
615
{% csrf_token %}
716
{{ form | as_uikit_form }}
817
<input type="submit" class="uk-button uk-button-primary" value="Confirm">
918
</form>
10-
{% endblock %}
19+
{% endblock %}

donations/templates/donations/donation_form.html

Lines changed: 53 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -9,68 +9,68 @@
99
{% block title %}Support Tomorrow's Alumni{% endblock %}
1010

1111
{% block content %}
12-
<h1>Support Tomorrow's Alumni</h1>
13-
<div class="uk-text">
14-
<p>
15-
Our association relies solely on volunteer work and donations.
16-
Your generous donations enable our work.
17-
Join our mission to support three talented students every year.
18-
Give back by funding the Alumni Scholarship.
19-
<a href="https://go.jacobs-alumni.de/scholarship-receivers/">Read more</a> about the latest recipients.
20-
</p>
12+
<h1>Support Tomorrow's Alumni</h1>
13+
<div class="uk-text">
14+
<p>
15+
Our association relies solely on volunteer work and donations.
16+
Your generous donations enable our work.
17+
Join our mission to support three talented students every year.
18+
Give back by funding the Alumni Scholarship.
19+
<a href="https://go.jacobs-alumni.de/scholarship-receivers/">Read more</a> about the latest recipients.
20+
</p>
21+
</div>
22+
<div class="uk-grid">
23+
<div class="uk-width-1-1 uk-width-2-3@m">
24+
{% if not request.user.is_authenticated %}
25+
<div class="uk-alert-primary uk-alert">
26+
Members: Please <a href="{% url 'login' %}">log in</a> to use saved cards.
27+
</div>
28+
{% endif %}
29+
<form class="uk-form-horizontal" method="POST">
30+
{% csrf_token %}
31+
{{ form | as_uikit_form }}
32+
33+
<input type="submit" class="uk-button uk-button-primary uk-width-1-1 uk-hidden@m" value="Proceed to payment">
34+
<input type="submit" class="uk-button uk-button-primary uk-float-right uk-visible@m" value="Proceed to payment">
35+
<p><br /></p>
36+
</form>
2137
</div>
22-
<div class="uk-grid">
23-
<div class="uk-width-1-1 uk-width-2-3@m">
24-
{% if not request.user.is_authenticated %}
25-
<div class="uk-alert-primary uk-alert">
26-
Members: Please <a href="{% url 'login' %}">log in</a> to use saved cards.
27-
</div>
28-
{% endif %}
29-
<form class="uk-form-horizontal" method="POST">
30-
{% csrf_token %}
31-
{{ form | as_uikit_form }}
3238

33-
<input type="submit" class="uk-button uk-button-primary uk-width-1-1 uk-hidden@m" value="Donate">
34-
<input type="submit" class="uk-button uk-button-primary uk-float-right uk-visible@m" value="Donate">
35-
<p><br /></p>
36-
</form>
39+
<div class="uk-width-1-1 uk-width-1-3@m uk-pull-2-3@m">
40+
<div class="uk-card uk-card-default">
41+
<div class="uk-card-header">
42+
<h3 class="uk-card-title">Why Donate?</h3>
43+
</div>
44+
<div class="uk-card-body">
45+
<ul class="reasons">
46+
<li>Fund the Alumni Scholarship</li>
47+
<li>Tax-deductable in Germany</li>
48+
<li>Audited non-profit</li>
49+
<li>Payment secured using Stripe</li>
50+
</ul>
51+
</div>
3752
</div>
38-
39-
<div class="uk-width-1-1 uk-width-1-3@m uk-pull-2-3@m">
40-
<div class="uk-card uk-card-default">
41-
<div class="uk-card-header">
42-
<h3 class="uk-card-title">Your Benefits</h3>
43-
</div>
44-
<div class="uk-card-body">
45-
<ul class="reasons">
46-
<li>Fund the Alumni Scholarship</li>
47-
<li>Tax-deductable in Germany</li>
48-
<li>Audited non-profit</li>
49-
<li>Payment secured using Stripe</li>
50-
</ul>
51-
</div>
53+
<div><br /></div>
54+
<div class="uk-card uk-card-default uk-hidden" id="live-display">
55+
<div class="uk-card-header">
56+
<h3 class="uk-card-title">Live Donations</h3>
5257
</div>
53-
<div><br /></div>
54-
<div class="uk-card uk-card-default uk-hidden" id="live-display">
55-
<div class="uk-card-header">
56-
<h3 class="uk-card-title">Live Donations</h3>
57-
</div>
58-
<div class="uk-card-body">
59-
<h4>Totals Since 2020</h4>
60-
<ul id="donation_totals"></ul>
61-
</div>
62-
<div class="uk-card-footer">
63-
<div>
64-
<span class="circle"></span>
65-
<span id="recent-donation"></span>
66-
</div>
58+
<div class="uk-card-body">
59+
<h4>Totals Since 2020</h4>
60+
<ul id="donation_totals"></ul>
61+
</div>
62+
<div class="uk-card-footer">
63+
<div>
64+
<span class="circle"></span>
65+
<span id="recent-donation"></span>
6766
</div>
6867
</div>
6968
</div>
70-
7169
</div>
70+
71+
</div>
7272
{% endblock %}
7373

7474
{% block extrascripts %}
75-
{% render_entrypoint "donate__form" "js" %}
75+
{% render_entrypoint "donate__form" "js" %}
7676
{% endblock %}

donations/templates/donations/success.html

Lines changed: 53 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -2,57 +2,62 @@
22
{% load uikit_tags %}
33

44
{% block head %}
5-
{% if not object.completed or not receipt.finalized %}
6-
<meta http-equiv="refresh" content="3">
7-
{% endif %}
5+
{% if not object.completed or not receipt.finalized %}
6+
<meta http-equiv="refresh" content="3">
7+
{% endif %}
88
{% endblock %}
99

1010
{% block title %}Thank You{% endblock %}
1111

1212
{% block content %}
13-
<div class="uk-clearfix">
14-
<h1>Thank You</h1>
15-
{% if object.completed %}
16-
{% if receipt.finalized %}
17-
{# If we have a logged in user, and a receipt exists, offer it #}
18-
{% if user.alumni %}
19-
<h3>Your contributions enable our continued work!</h3>
20-
<h4>You may <a href="{% url 'download' receipt %}">download your receipt</a> now</h4>
21-
{# Anonymous users only get one e-mail #}
22-
{% else %}
23-
<h3>We've emailed your donation receipt.</h3>
24-
{% endif %}
25-
{% elif receipt %}
26-
{# This case is when the receipt wasn't finalized, but was created #}
27-
<h3>We will e-mail your donation receipt once it's ready. You may still <a href="{% url 'receipt-create' object.external_id %}">update your receipt</a>.</h3>
28-
{% else %}
29-
{% if user.alumni %}
30-
{# If we're logged in, but no receipt exists, the user needs to fill in their address. #}
31-
{% if not user.alumni.address.is_filled %}
32-
<h3>
33-
We tried issuing your donation receipt, but have no address on file.
34-
Please <a href="{% url 'edit_address' %}?next={% url 'donation-detail' object.external_id %}">
35-
provide your address</a>.
36-
</h3>
37-
{% else %}
38-
<h3>If you'd like a donation receipt (for the tax authorities), please contact support.</h3>
39-
{% endif %}
40-
{% else %}
41-
{# These are anonymous users, who may have just donated, or may have come back from an e-mail. #}
42-
<h3>
43-
Your contribution was successfully processed! If you would like a donation receipt (for the tax authorities), please
44-
<a href="{% url 'receipt-create' object.external_id %}">provide your address</a>.
45-
</h3>
46-
{% endif %}
47-
{% endif %}
48-
{% else %}
49-
<h3>
50-
Once your contribution is fully processed, you'll hear from us by e-mail.
51-
{% if object.target %}
52-
Your donation towards {{ object.target.label }} will be taken into consideration regardless.
53-
{% endif %}
54-
</h3>
13+
<div class="uk-clearfix">
14+
<h1>Thank You</h1>
15+
{% if object.completed %}
16+
{% if receipt.finalized %}
17+
{# If we have a logged in user, and a receipt exists, offer it #}
18+
{% if user.alumni %}
19+
<h3>Your contributions enable our continued work!</h3>
20+
<h4>You may <a href="{% url 'download' receipt %}">download your receipt</a> now</h4>
21+
{# Anonymous users only get one e-mail #}
22+
{% else %}
23+
<h3>We've emailed your donation receipt.</h3>
24+
{% endif %}
25+
{% elif receipt %}
26+
{# This case is when the receipt wasn't finalized, but was created #}
27+
<h3>Your receipt is awaiting approval by the treasurer. We will let you know by e-mail once it's ready, you don't need to wait here. Made a typo? You can still <a href="{% url 'receipt-create' object.external_id %}">update your name and address for this receipt</a>.</h3>
28+
{% else %}
29+
{% if user.alumni %}
30+
{# If we're logged in, but no receipt exists, the user needs to fill in their address. #}
31+
{% if not user.alumni.address.is_filled %}
32+
<h3>
33+
We tried issuing your donation receipt, but have no address on file.
34+
Please <a href="{% url 'edit_address' %}?next={% url 'donation-detail' object.external_id %}">
35+
provide your address</a>.
36+
</h3>
37+
{% else %}
38+
<h3>If you'd like a donation receipt (for the tax authorities), please contact support.</h3>
39+
{% endif %}
40+
{% else %}
41+
{# These are anonymous users, who may have just donated, or may have come back from an e-mail. #}
42+
<h3>
43+
Your contribution was successfully processed! If you need a donation receipt (for the tax authorities), please
44+
<a href="{% url 'receipt-create' object.external_id %}">provide your name and address</a>.
45+
In case you'd like to continue later, we've sent a link for that to your e-mail address.
46+
</h3>
47+
{% endif %}
48+
{% endif %}
49+
{% else %}
50+
<h3>
51+
If you donated by card, please wait a moment for the payment to be processed.
52+
This page will refresh automatically.
53+
</h3>
54+
<h3>
55+
If you donated by bank transfer, you will receive an e-mail once your transfer is complete. You will then be able to request a donation receipt. This usually takes 1-3 working days.
56+
{% if object.target %}
57+
Your donation towards {{ object.target.label }} will be taken into consideration regardless.
5558
{% endif %}
56-
<p>In case of questions or problems, please contact <a href="mailto:support@jacobs-alumni.de">support@jacobs-alumni.de</a></p>
57-
</div>
58-
{% endblock %}
59+
</h3>
60+
{% endif %}
61+
<p>In case of questions or problems, please contact <a href="mailto:support@jacobs-alumni.de">support@jacobs-alumni.de</a></p>
62+
</div>
63+
{% endblock %}

donations/views.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from django.shortcuts import redirect
55
from django.urls import reverse
66
from django.utils.translation import gettext
7-
from django.forms import ModelForm
7+
from django import forms
88
from django.views.generic import CreateView, TemplateView, DetailView, UpdateView
99

1010
import donation_receipts.models
@@ -64,14 +64,14 @@ def get_success_url(self) -> str:
6464
return session.url
6565

6666

67-
class ReceiptForm(ModelForm):
67+
class ReceiptForm(forms.ModelForm):
6868
class Meta:
6969
model = donation_receipts.models.DonationReceipt
7070
fields = ["sender_info"]
7171

72-
labels = {"sender_info": "Name and Address"}
72+
labels = {"sender_info": "Full Name and Address"}
7373
help_texts = {
74-
"sender_info": "Your full legal name and your address, on multiple lines"
74+
"sender_info": "Your full legal name and your address, on multiple lines",
7575
}
7676

7777
def clean(self):

0 commit comments

Comments
 (0)