Skip to content
Snippets Groups Projects
Commit c4c4b1b4 authored by Julian's avatar Julian
Browse files

Use `count_as_missed_lesson` in ExcuseType forms and tables

parent 6ad97931
No related branches found
No related tags found
1 merge request!274Resolve "[Excuses] Excuse types that change absence count / are uncounted"
......@@ -180,11 +180,11 @@ class ExtraMarkForm(forms.ModelForm):
class ExcuseTypeForm(forms.ModelForm):
layout = Layout("short_name", "name")
layout = Layout("short_name", "name", "count_as_missed_lesson")
class Meta:
model = ExcuseType
fields = ["short_name", "name"]
fields = ["short_name", "name", "count_as_missed_lesson"]
class PersonOverviewForm(ActionForm):
......
......@@ -37,6 +37,10 @@ class ExcuseTypeTable(tables.Table):
name = tables.LinkColumn("edit_excuse_type", args=[A("id")])
short_name = tables.Column()
count_as_absent = tables.BooleanColumn(
verbose_name=_("Count as absent"),
accessor="count_as_missed_lesson",
)
edit = tables.LinkColumn(
"edit_excuse_type",
args=[A("id")],
......
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