From 998b4cd5cfa3fe5ecdfe68e9e01d1a94dcfa009b Mon Sep 17 00:00:00 2001 From: heinzel Date: Wed, 9 Dec 2020 08:31:41 +0100 Subject: [PATCH 1/6] Registrations: decollapse events by clicking on the title --- .../templates/dav_registration/event_list.html | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/dav_registration/templates/dav_registration/event_list.html b/dav_registration/templates/dav_registration/event_list.html index 83c7f1c..9636609 100644 --- a/dav_registration/templates/dav_registration/event_list.html +++ b/dav_registration/templates/dav_registration/event_list.html @@ -17,7 +17,7 @@
-
+

{{ event.get_formated_date }} {% if event.get_alt_formated_date %} @@ -81,12 +85,12 @@

{% endblock head-additional %} @@ -74,10 +85,10 @@
-
+
{% bootstrap_field form.postal_code %}
-
+
{% bootstrap_field form.city %}
@@ -93,6 +104,12 @@
{% bootstrap_field form.year_of_birth %}
+
+ Antrag auf reduzierte Teilnahmegebühr + {% bootstrap_field form.apply_reduced_fee %} +
+
+
{% bootstrap_field form.dav_number %}
@@ -100,11 +117,6 @@ Nichtmitglieder {% bootstrap_field form.not_dav_member %}
-
-
-
- -
{% bootstrap_field form.emergency_contact %}
From 50d7ef953e5d5541f9c4154cfc7da4c54ef399bb Mon Sep 17 00:00:00 2001 From: heinzel Date: Wed, 9 Dec 2020 17:59:36 +0100 Subject: [PATCH 6/6] satisfy tests --- dav_registration/tests/test_emails.py | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/dav_registration/tests/test_emails.py b/dav_registration/tests/test_emails.py index 0a33235..1c6547b 100644 --- a/dav_registration/tests/test_emails.py +++ b/dav_registration/tests/test_emails.py @@ -37,6 +37,7 @@ Here Telefon: 12 E-Mail: {participant_email} Jahrgang: {year_of_birth} +Antrag auf reduzierte Teilnahmegebühr: {apply_reduced_fee_yesno} DAV Mitgliedsnummer: 0 Notfall-Kontakt @@ -71,6 +72,7 @@ Here, 1 Karlsruhe 12 {participant_email} 0 +Antrag auf reduzierte Teilnahmegebühr: {apply_reduced_fee_yesno} Notfall-Kontakt: - @@ -136,6 +138,7 @@ class EmailsTestCase(EmailTestMixin, EventMixin, RegistrationMixin, TestCase): participant_full_name=registration.get_full_name(), participant_email=registration.email_address, year_of_birth=registration.year_of_birth, + apply_reduced_fee_yesno='Nein', event_number=event.get_number(), event_title=event.title, event_formated_date=event.get_formated_date(), @@ -160,9 +163,10 @@ class EmailsTestCase(EmailTestMixin, EventMixin, RegistrationMixin, TestCase): 'postal_code': '76131', 'city': 'Karlsruhe', 'phone_number': '+49 721 1234567890 AB (Büro)', + 'year_of_birth': 1976, + 'apply_reduced_fee': True, 'dav_member': False, 'dav_number': '131/00/007*12345', - 'year_of_birth': 1976, 'emergency_contact': 'Call 911!', 'experience': 'Yes, we can!', 'note': 'Automatischer Software Test\nGruß\n heinzel =u}', @@ -180,6 +184,7 @@ class EmailsTestCase(EmailTestMixin, EventMixin, RegistrationMixin, TestCase): search += 'Telefon: {}\n'.format(registration_data['phone_number']) search += 'E-Mail: {}\n'.format(registration_data['email_address']) search += 'Jahrgang: {}\n'.format(registration_data['year_of_birth']) + search += 'Antrag auf reduzierte Teilnahmegebühr: Ja\n' search += 'DAV Mitglied: Nein\n' self.assertIn(search, mail.body) @@ -245,6 +250,7 @@ class EmailsTestCase(EmailTestMixin, EventMixin, RegistrationMixin, TestCase): participant_email=registration.email_address, year_of_birth=registration.year_of_birth, approx_age=registration.approx_age(), + apply_reduced_fee_yesno='Nein', event_number=event.get_number(), event_title=event.title, event_formated_date=event.get_formated_date(), @@ -268,9 +274,10 @@ class EmailsTestCase(EmailTestMixin, EventMixin, RegistrationMixin, TestCase): 'postal_code': '76131', 'city': 'Karlsruhe', 'phone_number': '+49 721 1234567890 AB (Büro)', + 'year_of_birth': THIS_YEAR, + 'apply_reduced_fee': True, 'dav_member': False, 'dav_number': '131/00/007*12345', - 'year_of_birth': THIS_YEAR, 'emergency_contact': 'Call 911!', 'experience': 'Yes, we can!', 'note': 'Automatischer Software Test\nGruß\n heinzel =u}', @@ -288,8 +295,8 @@ class EmailsTestCase(EmailTestMixin, EventMixin, RegistrationMixin, TestCase): search += '\n' search += registration_data['email_address'] search += '\n' - search += 'Nicht DAV Mitglied' - search += '\n' + search += 'Nicht DAV Mitglied\n' + search += 'Antrag auf reduzierte Teilnahmegebühr: Ja\n' self.assertIn(search, mail.body) search = '\n'