Verified Commit 4c14cecd authored by Sébastiaan Versteeg's avatar Sébastiaan Versteeg
Browse files

Add language to frontend form for exams/summaries + fixed unknown language state in course overview

parent 81642569
......@@ -27,7 +27,7 @@ class AddExamForm(ModelForm):
class Meta:
model = Exam
fields = ('file', 'course', 'type', 'exam_date')
fields = ('file', 'course', 'type', 'language', 'exam_date')
class AddSummaryForm(ModelForm):
......@@ -47,4 +47,4 @@ class AddSummaryForm(ModelForm):
class Meta:
model = Summary
fields = ('name', 'year', 'file', 'course', 'author')
fields = ('name', 'year', 'language', 'file', 'course', 'author')
......@@ -63,7 +63,7 @@
<a href="{% url 'education:exam' item.id %}"
target="_blank">
{{ item.name }}
{% if item.language != '' %}
{% if item.language %}
<img class="lang-flag" src="{% static 'img/flags/'|add:item.language|add:'.svg' %}"/>
{% endif %}
</a>
......@@ -80,7 +80,7 @@
<a href="{% url 'education:summary' item.id %}"
target="_blank">
{{ item.name }}
{% if item.language != '' %}
{% if item.language %}
<img class="lang-flag" src="{% static 'img/flags/'|add:item.language|add:'.svg' %}"/>
{% endif %}
</a>
......
Markdown is supported
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