Skip to content

Commit 9d55775

Browse files
authored
Merge pull request #16 from qgis/remove_self_enroll_feature
Remove self enroll feature
2 parents 412e7b6 + eb42fe7 commit 9d55775

File tree

11 files changed

+49
-275
lines changed

11 files changed

+49
-275
lines changed

django_project/changes/templates/layouts/page-title.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ <h1 class="title hero-title pr-3">
1414
</p>
1515
</div>
1616
<div class="is-vcentered">
17-
<a class="button is-primary1 is-size-5" href="{% url 'sustaining-member-create' %}">
17+
<a class="button is-primary1 is-size-5" href="mailto:finance@qgis.org?subject=QGIS%20Sustaining%20Membership" target="_blank">
1818
<i class="fas fa-award mr-3"></i>
1919
Become a Sustaining Member
2020
</a>

django_project/changes/templates/layouts/sustaining_members_sidebar.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,10 @@
1111
</a>
1212
</li>
1313
{% else %}
14-
{% url 'sustaining-member-create' as create_url %}
1514
<li>
1615
<a class="button is-success is-medium has-tooltip-bottom has-tooltip-arrow"
1716
data-tooltip="Become a sustaining member!"
18-
href="{{ create_url }}">
17+
href="mailto:finance@qgis.org?subject=QGIS%20Sustaining%20Membership">
1918
<i class="fas fa-award mr-3"></i>
2019
Sign up!
2120
</a>

django_project/changes/templates/sponsor/future-list.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ <h5 id="how-become-a-sponsor">How to become a sponsor?
4444
<div class="buttons">
4545
{% if not is_sustaining_member %}
4646
<a class="button is-success has-tooltip-arrow has-tooltip-bottom"
47-
href='{% url "sustaining-member-create" %}'
47+
href='mailto:finance@qgis.org?subject=QGIS%20Sustaining%20Membership'
4848
data-tooltip="Become a Sustaining Member">
4949
<span class="icon">
5050
<i class="fas fa-award"></i>

django_project/changes/templates/sponsor/list.html

Lines changed: 42 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -23,43 +23,33 @@
2323
color: limegreen;
2424
}
2525
</style>
26+
2627
<h1 class="title">
2728
{% if unapproved %}Unapproved {% endif %}Sustaining Members
2829
</h1>
29-
<p>
30-
We thank our sustaining members and donors
31-
who support the QGIS project, often regularly,
32-
and enable us to pay for our infrastructure
33-
and important development work, as well as
34-
finance developer meetings and promotion of
35-
QGIS in workshops and conferences.
36-
</p>
37-
<div class="container rich tips">
38-
<div class="icon">💁</div>
39-
<div class="cont coloring-2">
40-
<h5 id="how-become-a-sustaining-member">How to become a sustaining member?
41-
</h5>
42-
<p>
43-
For information on becoming a sustaining member,
44-
please visit
45-
<a href="https://qgis.org/funding/membership/" target="_blank">
46-
Sustaining Membership Program Overview</a>.
47-
</p>
48-
</div>
49-
</div>
5030

5131
<div class="buttons">
32+
{% if user.is_staff or user == the_project.owner or user in the_project.sponsorship_managers.all %}
33+
<a class="button is-outlined is-success has-tooltip-arrow has-tooltip-bottom"
34+
href='{% url "sponsor-create" %}'
35+
data-tooltip="Create New Sustaining Member">
36+
<span class="icon">
37+
<i class="fas fa-plus-circle"></i>
38+
</span>
39+
<span>Add New</span>
40+
</a>
41+
{% endif %}
5242
{% if not is_sustaining_member %}
5343
<a class="button is-success has-tooltip-arrow has-tooltip-bottom"
54-
href='{% url "sustaining-member-create" %}'
44+
href='mailto:finance@qgis.org?subject=QGIS%20Sustaining%20Membership'
5545
data-tooltip="Become a Sustaining Member">
5646
<span class="icon">
5747
<i class="fas fa-award"></i>
5848
</span>
5949
<span>Sign Up!</span>
6050
</a>
6151
{% else %}
62-
<a class="button is-light has-tooltip-arrow has-tooltip-bottom"
52+
<a class="button is-outlined is-warning has-tooltip-arrow has-tooltip-bottom"
6353
href='{% url "sustaining-membership" %}'
6454
data-tooltip="Your sustaining membership">
6555
<span class="icon">
@@ -76,11 +66,6 @@ <h5 id="how-become-a-sustaining-member">How to become a sustaining member?
7666
data-tooltip="Future Sponsor List">
7767
<i class="fas fa-money-bill-wave"></i>
7868
</a>
79-
<a class="button is-outlined is-success has-tooltip-arrow has-tooltip-bottom icon"
80-
href='{% url "sponsor-create" %}'
81-
data-tooltip="Create New Sustaining Member">
82-
<i class="fas fa-plus-circle"></i>
83-
</a>
8469
{% endif %}
8570
{% if not unapproved %}
8671
<a class="button is-light has-tooltip-arrow has-tooltip-bottom icon"
@@ -122,6 +107,35 @@ <h5 id="how-become-a-sustaining-member">How to become a sustaining member?
122107
</a>
123108
</div>
124109

110+
<p>
111+
We thank our sustaining members and donors
112+
who support the QGIS project, often regularly,
113+
and enable us to pay for our infrastructure
114+
and important development work, as well as
115+
finance developer meetings and promotion of
116+
QGIS in workshops and conferences.
117+
</p>
118+
<div class="container rich tips">
119+
<div class="icon">💁</div>
120+
<div class="cont coloring-2">
121+
<h5 id="how-become-a-sustaining-member">How to become a sustaining member?
122+
</h5>
123+
<p>
124+
You can reach out to the treasurer at
125+
<a href="mailto:finance@qgis.org?subject=QGIS%20Sustaining%20Membership" target="_blank">
126+
finance@qgis.org
127+
</a>
128+
or any other Project Steering Committee (PSC) member
129+
to express your interest in becoming a sustaining member.
130+
131+
For information on becoming a sustaining member,
132+
please visit
133+
<a href="https://qgis.org/funding/membership/" target="_blank">
134+
Sustaining Membership Program Overview</a>.
135+
</p>
136+
</div>
137+
</div>
138+
125139
{% include "sponsor/world-map.html" %}
126140

127141
{% if num_sponsors == 0 %}

django_project/changes/templates/sponsor/past-list.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ <h5 id="how-become-a-sustaining-member">How to become a sustaining member?
4747
<div class="buttons">
4848
{% if not is_sustaining_member %}
4949
<a class="button is-success has-tooltip-arrow has-tooltip-bottom"
50-
href='{% url "sustaining-member-create" %}'
50+
href='mailto:finance@qgis.org?subject=QGIS%20Sustaining%20Membership'
5151
data-tooltip="Become a Sustaining Member">
5252
<span class="icon">
5353
<i class="fas fa-award"></i>

django_project/changes/templates/sustaining_member/add.html

Lines changed: 0 additions & 56 deletions
This file was deleted.

django_project/changes/templates/sustaining_member/detail.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,6 @@ <h1 class="title">
161161
</div>
162162
</div>
163163
{% else %}
164-
<h4 class="title is-4">You haven't become a sustaining member yet, <a href="{% url "sustaining-member-create" %}" class="button is-success">sign up</a> to become one.</h4>
164+
<h4 class="title is-4">You haven't become a sustaining member yet, <a href="mailto:finance@qgis.org?subject=QGIS%20Sustaining%20Membership" class="button is-success">sign up</a> to become one.</h4>
165165
{% endif %}
166166
{% endblock %}

django_project/changes/tests/test_sustaining_member_views.py

Lines changed: 0 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -20,91 +20,6 @@ def mocked_send_notification(*args, **kwargs):
2020
return 'Mock document'
2121

2222

23-
class TestSustainingMemberCreateView(TestCase):
24-
"""Tests that Sponsor views work."""
25-
26-
@override_settings(VALID_DOMAIN=['testserver', ])
27-
def setUp(self):
28-
"""
29-
Setup before each test
30-
We force the locale to en otherwise it will use
31-
the locale of the host running the tests and we
32-
will get unpredictable results / 404s
33-
"""
34-
35-
self.client = Client()
36-
self.client.post(
37-
'/set_language/', data={'language': 'en'})
38-
logging.disable(logging.CRITICAL)
39-
self.project = ProjectF.create()
40-
self.sponsor = SponsorF.create(project=self.project)
41-
self.user = UserF.create(**{
42-
'username': 'timlinux',
43-
'password': 'password',
44-
'is_staff': True
45-
})
46-
self.user2 = UserF.create(**{
47-
'username': 'user',
48-
'password': 'password',
49-
'is_staff': False
50-
})
51-
# Something changed in the way factoryboy works with django 1.8
52-
# I think - we need to explicitly set the users password
53-
# because the core.model_factories.UserF._prepare method
54-
# which sets the password is never called. Next two lines are
55-
# a work around for that - sett #581
56-
self.user.set_password('password')
57-
self.user.save()
58-
self.user2.set_password('password')
59-
self.user2.save()
60-
61-
@override_settings(VALID_DOMAIN=['testserver', ])
62-
def test_SustainingMemberCreateView_get(self):
63-
"""
64-
Test if user can open a sustaining member create view
65-
"""
66-
self.client.login(username='user', password='password')
67-
68-
response = self.client.get(reverse('sustaining-member-create'))
69-
self.assertEqual(response.status_code, 200)
70-
self.assertEqual(response.context['is_sustaining_member'], False)
71-
expected_template = [
72-
'sustaining_member/add.html'
73-
]
74-
self.assertEqual(response.template_name, expected_template)
75-
self.assertEqual(response.context['the_project'].slug,
76-
self.project.slug)
77-
78-
@override_settings(VALID_DOMAIN=['testserver', ])
79-
@mock.patch('changes.views.sustaining_member.SustainingMemberCreateView.send_notification',
80-
side_effect=mocked_send_notification)
81-
def test_SustainingMemberCreateView_post(self, mocked_send_notification):
82-
"""
83-
Test if user can create a sustaining member
84-
"""
85-
testfile = (
86-
b'\x47\x49\x46\x38\x39\x61\x01\x00\x01\x00\x00\x00\x00\x21\xf9\x04'
87-
b'\x01\x0a\x00\x01\x00\x2c\x00\x00\x00\x00\x01\x00\x01\x00\x00\x02'
88-
b'\x02\x4c\x01\x00\x3b')
89-
logo = SimpleUploadedFile('small.jpeg', testfile,
90-
content_type='image/jpeg')
91-
92-
self.client.login(username='user', password='password')
93-
94-
post_data = {
95-
'name': 'test sustaining member',
96-
'logo': logo,
97-
'country': 'US',
98-
}
99-
response = self.client.post(reverse('sustaining-member-create'), post_data)
100-
self.assertEqual(response.status_code, 302)
101-
self.assertEqual(response.url,
102-
reverse('sustaining-membership'))
103-
104-
response = self.client.get(reverse('sustaining-membership'))
105-
self.assertEqual(response.context['is_sustaining_member'], True)
106-
107-
10823
class TestSustainingMemberUpdateView(TestCase):
10924
"""Tests that Sponsor views work."""
11025

django_project/changes/urls.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,6 @@
6363
ApproveSponsorshipPeriodView,
6464

6565
generate_sponsor_cloud,
66-
FetchGithubPRs,
67-
FetchRepoLabels,
68-
FetchCategory,
69-
download_all_referenced_images,
70-
)
71-
from changes.views.sustaining_member import (
72-
SustainingMemberCreateView
7366
)
7467

7568
urlpatterns = [
@@ -203,10 +196,6 @@
203196
name='sponsor-cloud'),
204197

205198
# Sustaining member
206-
url(
207-
r'^sustaining-member/add/$',
208-
view=SustainingMemberCreateView.as_view(),
209-
name='sustaining-member-create'),
210199
url(
211200
r'^membership/$',
212201
view=SustainingMembership.as_view(),

0 commit comments

Comments
 (0)