Fix submission forms for many2many fields with checkboxes

This includes proper styling (no more centering of the checkbox itself)
and actually saving the m2m fields on submit.
This commit is contained in:
Magnus Hagander
2017-12-11 15:29:45 +01:00
parent e37ee54d25
commit 4ed0ca0fbe
2 changed files with 7 additions and 1 deletions

View File

@ -43,6 +43,8 @@ def simple_form(instancetype, itemid, request, formclass, formtemplate='base/for
form.apply_submitter(r, request.user)
r.save()
form.save_m2m()
return HttpResponseRedirect(redirect)
else:
# Generate form