Skip to content
Snippets Groups Projects
Unverified Commit 20f3ba5e authored by Nik | Klampfradler's avatar Nik | Klampfradler
Browse files

Revert "Try getting to full names of persons."

This reverts commit 12468ed9.
parent 12468ed9
No related branches found
No related tags found
No related merge requests found
......@@ -13,17 +13,14 @@ class LessonDocumentationForm(forms.ModelForm):
class PersonalNoteForm(forms.ModelForm):
class Meta:
model = PersonalNote
fields = ['person__last_name', 'person__first_name', 'absent', 'late', 'excused', 'remarks']
fields = ['person', 'absent', 'late', 'excused', 'remarks']
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.fields['person__last_name'].widget.attrs['readonly'] = True
self.fields['person__first_name'].widget.attrs['readonly'] = True
self.fields['person'].widget.attrs['readonly'] = True
def clean_person__last_name(self):
return self.instance.person__last_name
def clean_person__first_name(self):
return self.instance.person__first_name
def clean_person(self):
return self.instance.person
PersonalNoteFormSet = forms.modelformset_factory(
......
......@@ -45,8 +45,7 @@
<table class="table table-striped table-bordered table-hover table-condensed table-responsive w-100 d-block d-md-table">
<tr>
<th>{% blocktrans %}Last name{% endblocktrans %}</th>
<th>{% blocktrans %}First name{% endblocktrans %}</th>
<th>{% blocktrans %}Person{% endblocktrans %}</th>
<th>{% blocktrans %}Absent{% endblocktrans %}</th>
<th>{% blocktrans %}Tardiness{% endblocktrans %}</th>
<th>{% blocktrans %}Excused{% endblocktrans %}</th>
......@@ -54,8 +53,7 @@
</tr>
{% for form in personal_note_formset %}
<tr>
<td>{{ form.person__last_name }}</td>
<td>{{ form.person__firstname }}</td>
<td>{{ form.person }}</td>
<td>{{ form.absent }}</td>
<td>{{ form.late }}</td>
<td>{{ form.excused }}</td>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment