agendas: get proper form url in meetings agenda reminder (#59384)
This commit is contained in:
parent
112c7d5e6b
commit
bb46f55199
|
@ -22,7 +22,7 @@ Your meeting "{{ meeting }}" is scheduled on {{ date }} at {{ time }}.
|
|||
|
||||
{% if booking.form_url %}
|
||||
{% with _("Edit or cancel meeting") as button_label %}
|
||||
{% include "emails/button-link.html" with url=booking.form_url label=button_label %}
|
||||
{% include "emails/button-link.html" with url=booking.get_form_url label=button_label %}
|
||||
{% endwith %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
|
|
@ -16,7 +16,7 @@ Your meeting "{{ meeting }}" is scheduled on {{ date }} at {{ time }}.
|
|||
{% if email_extra_info %}{{ email_extra_info }}{% endif %}
|
||||
|
||||
{% if booking.form_url %}
|
||||
{% trans "If in need to cancel it, you can do so here:" %} {{ booking.form_url }}
|
||||
{% trans "If in need to cancel it, you can do so here:" %} {{ booking.get_form_url }}
|
||||
{% endif %}
|
||||
{% endautoescape %}
|
||||
{% endblock %}
|
||||
|
|
|
@ -1869,7 +1869,12 @@ def test_agenda_reminders_meetings(mailoutbox, freezer):
|
|||
meeting_type=meetingtype,
|
||||
start_datetime=now() + datetime.timedelta(days=5), # 06/01
|
||||
)
|
||||
Booking.objects.create(event=event, user_email='t@test.org', user_display_label='Birth certificate')
|
||||
Booking.objects.create(
|
||||
event=event,
|
||||
user_email='t@test.org',
|
||||
user_display_label='Birth certificate',
|
||||
form_url='publik://default/someform/1/',
|
||||
)
|
||||
|
||||
freezer.move_to('2020-01-04 15:00')
|
||||
call_command('send_booking_reminders')
|
||||
|
@ -1878,6 +1883,8 @@ def test_agenda_reminders_meetings(mailoutbox, freezer):
|
|||
mail = mailoutbox[0]
|
||||
assert mail.subject == 'Reminder for your meeting in 2 days at 11 a.m.'
|
||||
assert 'Your meeting "Birth certificate" is scheduled on Monday 6 January at 11 a.m..' in mail.body
|
||||
assert 'If in need to cancel it, you can do so here: http://example.org/someform/1/' in mail.body
|
||||
assert 'href="http://example.org/someform/1/"' in mail.alternatives[0][0]
|
||||
|
||||
|
||||
def test_anonymize_bookings(freezer):
|
||||
|
|
Loading…
Reference in New Issue