diff --git a/kaehmy/forms.py b/kaehmy/forms.py index 9784c12..38e99a6 100644 --- a/kaehmy/forms.py +++ b/kaehmy/forms.py @@ -6,15 +6,15 @@ from kaehmy.models import PresetRole, CustomRole, Application, Comment, BaseRole class CheckboxSelectMultiple(forms.widgets.CheckboxSelectMultiple): - option_template_name = "kaehmy/checkbox_option.html" + option_template_name = "checkbox_option.html" def create_option( - self, name, value, label, selected, index, subindex=None, attrs=None + self, name, formIterator, label, selected, index, subindex=None, attrs=None ): dic = super(CheckboxSelectMultiple, self).create_option( - name, value, label, selected, index, subindex, attrs + name, formIterator, label, selected, index, subindex, attrs ) - description = PresetRole.objects.get(id=value).description + description = PresetRole.objects.get(id=formIterator.value).description dic["description"] = description return dic diff --git a/templates/kaehmy/checkbox_option.html b/kaehmy/templates/checkbox_option.html similarity index 100% rename from templates/kaehmy/checkbox_option.html rename to kaehmy/templates/checkbox_option.html