Removed ItemPoll and ItemFormPoll.
This commit is contained in:
parent
a874e327ac
commit
7c866e11e4
@ -13,7 +13,7 @@
|
|||||||
from django.forms import Form, ModelForm, IntegerField, ChoiceField, \
|
from django.forms import Form, ModelForm, IntegerField, ChoiceField, \
|
||||||
ModelChoiceField, HiddenInput, Select
|
ModelChoiceField, HiddenInput, Select
|
||||||
from django.utils.translation import ugettext as _
|
from django.utils.translation import ugettext as _
|
||||||
from openslides.agenda.models import Item, ItemText, ItemApplication, ItemPoll, \
|
from openslides.agenda.models import Item, ItemText, ItemApplication, \
|
||||||
ItemAssignment
|
ItemAssignment
|
||||||
|
|
||||||
class ItemFormText(ModelForm):
|
class ItemFormText(ModelForm):
|
||||||
@ -37,17 +37,6 @@ class ItemFormApplication(ModelForm):
|
|||||||
exclude = ('closed', 'weight')
|
exclude = ('closed', 'weight')
|
||||||
|
|
||||||
|
|
||||||
class ItemFormPoll(ModelForm):
|
|
||||||
error_css_class = 'error'
|
|
||||||
required_css_class = 'required'
|
|
||||||
items = Item.objects.all().filter(parent=None).order_by('weight')
|
|
||||||
parent = ModelChoiceField(queryset=items, label=_("Parent item"), required=False)
|
|
||||||
|
|
||||||
class Meta:
|
|
||||||
model = ItemPoll
|
|
||||||
exclude = ('closed', 'weight')
|
|
||||||
|
|
||||||
|
|
||||||
class ItemFormAssignment(ModelForm):
|
class ItemFormAssignment(ModelForm):
|
||||||
error_css_class = 'error'
|
error_css_class = 'error'
|
||||||
required_css_class = 'required'
|
required_css_class = 'required'
|
||||||
@ -77,6 +66,5 @@ class ElementOrderForm(Form):
|
|||||||
MODELFORM = {
|
MODELFORM = {
|
||||||
'ItemText': ItemFormText,
|
'ItemText': ItemFormText,
|
||||||
'ItemApplication': ItemFormApplication,
|
'ItemApplication': ItemFormApplication,
|
||||||
'ItemPoll': ItemFormPoll,
|
|
||||||
'ItemAssignment': ItemFormAssignment,
|
'ItemAssignment': ItemFormAssignment,
|
||||||
}
|
}
|
||||||
|
@ -234,12 +234,6 @@ def edit(request, item_id=None, form='ItemText', default=None):
|
|||||||
'application': application,
|
'application': application,
|
||||||
'title': application.title,
|
'title': application.title,
|
||||||
}
|
}
|
||||||
elif form == "ItemPoll":
|
|
||||||
poll = Poll.objects.get(pk=default)
|
|
||||||
initial = {
|
|
||||||
'poll': poll,
|
|
||||||
'title': poll.title,
|
|
||||||
}
|
|
||||||
|
|
||||||
if item_id is None:
|
if item_id is None:
|
||||||
form = MODELFORM[form](initial=initial)
|
form = MODELFORM[form](initial=initial)
|
||||||
|
Loading…
Reference in New Issue
Block a user