Commit 3dda8eaf authored by Sli's avatar Sli

elections: use MarkdownInput for CandidateForm

parent dc800b59
Pipeline #1675 passed with stage
in 12 minutes and 13 seconds
...@@ -12,7 +12,7 @@ from django import forms ...@@ -12,7 +12,7 @@ from django import forms
from core.views import CanViewMixin, CanEditMixin, CanCreateMixin from core.views import CanViewMixin, CanEditMixin, CanCreateMixin
from django.db.models.query import QuerySet from django.db.models.query import QuerySet
from core.views.forms import SelectDateTime from core.views.forms import SelectDateTime, MarkdownInput
from election.models import Election, Role, Candidature, ElectionList, Vote from election.models import Election, Role, Candidature, ElectionList, Vote
from ajax_select.fields import AutoCompleteSelectField from ajax_select.fields import AutoCompleteSelectField
...@@ -67,7 +67,7 @@ class CandidateForm(forms.ModelForm): ...@@ -67,7 +67,7 @@ class CandidateForm(forms.ModelForm):
class Meta: class Meta:
model = Candidature model = Candidature
fields = ["user", "role", "program", "election_list"] fields = ["user", "role", "program", "election_list"]
widgets = {"program": forms.Textarea} widgets = {"program": MarkdownInput}
user = AutoCompleteSelectField( user = AutoCompleteSelectField(
"users", label=_("User to candidate"), help_text=None, required=True "users", label=_("User to candidate"), help_text=None, required=True
......
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