Commit fb5da144 authored by Luko van der Maas's avatar Luko van der Maas
Browse files

Merge branch 'fix/newsletter-event-js' into 'master'

Fix some small bugs in the automatic newsletter event code

Closes #861

See merge request !1228
parents 32394028 ff8636f1
......@@ -39,7 +39,7 @@ class NewsletterEventForm(NewsletterItemForm):
super().__init__(*args, **kwargs)
self.fields['event'].choices = [(None, '-----')] + [
(e.pk, e.title_nl) for e in
(e.pk, e.title) for e in
Event.objects.filter(published=True, start__gt=timezone.now())
]
self.fields['event'].required = False
......
......@@ -68,7 +68,7 @@ django.jQuery(function () {
$('#id_newsletterevent_set-' + id + '-start_datetime_1')
.val(formatDate(data['start'], 'time'));
$('#id_newsletterevent_set-' + id + '-end_datetime_0')
.val(formatDate(data['start'], 'date'));
.val(formatDate(data['end'], 'date'));
$('#id_newsletterevent_set-' + id + '-end_datetime_1')
.val(formatDate(data['end'], 'time'));
}
......
......@@ -100,8 +100,8 @@
<p style="font-family: Arial, sans-serif">
<i><b>{% trans "Attention" %}:</b> {% trans "Registration deadline = unregistration deadline" %}!
{% trans "Thalia will recover the costs on you if you do not unregister on time" %}.
{% if event.penalty_costs and item.newsletterevent.penalty_costs > 0 %}
{% trans "These costs are" %}: <b>€{{ event.penalty_costs }}.</b>
{% if item.newsletterevent.penalty_costs and item.newsletterevent.penalty_costs > 0 %}
{% trans "These costs are" %}: <b>€{{ item.newsletterevent.penalty_costs }}.</b>
{% endif %}
</i>
</p>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment