Removed ItemPoll and ItemFormPoll.

This commit is contained in:
Emanuel Schuetze 2011-09-03 14:36:01 +02:00
parent a874e327ac
commit 7c866e11e4
2 changed files with 1 additions and 19 deletions

View File

@ -13,7 +13,7 @@
from django.forms import Form, ModelForm, IntegerField, ChoiceField, \
ModelChoiceField, HiddenInput, Select
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
class ItemFormText(ModelForm):
@ -37,17 +37,6 @@ class ItemFormApplication(ModelForm):
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):
error_css_class = 'error'
required_css_class = 'required'
@ -77,6 +66,5 @@ class ElementOrderForm(Form):
MODELFORM = {
'ItemText': ItemFormText,
'ItemApplication': ItemFormApplication,
'ItemPoll': ItemFormPoll,
'ItemAssignment': ItemFormAssignment,
}

View File

@ -234,12 +234,6 @@ def edit(request, item_id=None, form='ItemText', default=None):
'application': application,
'title': application.title,
}
elif form == "ItemPoll":
poll = Poll.objects.get(pk=default)
initial = {
'poll': poll,
'title': poll.title,
}
if item_id is None:
form = MODELFORM[form](initial=initial)