From c7030b1d9966c88a166559f2e2e87d3d8afd0f20 Mon Sep 17 00:00:00 2001 From: Leif Johansson Date: Wed, 11 May 2011 15:15:06 +0200 Subject: bring back modify with new limited form --- src/meetingtools/apps/room/forms.py | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) (limited to 'src/meetingtools') diff --git a/src/meetingtools/apps/room/forms.py b/src/meetingtools/apps/room/forms.py index ed4287f..b34910f 100644 --- a/src/meetingtools/apps/room/forms.py +++ b/src/meetingtools/apps/room/forms.py @@ -10,6 +10,7 @@ from django.forms.fields import BooleanField, ChoiceField, CharField from django.forms.forms import Form from form_utils.forms import BetterModelForm from django.utils.safestring import mark_safe +from django.forms.models import ModelForm PUBLIC = 0 PROTECTED = 1 @@ -23,25 +24,11 @@ class PrefixTextInput(TextInput): def render(self, name, value, attrs=None): return mark_safe(""+self.prefix+" "+super(PrefixTextInput, self).render(name, value, attrs)) -class ModifyRoomForm(BetterModelForm): +class ModifyRoomForm(ModelForm): class Meta: model = Room fields = ['name','source_sco_id','self_cleaning'] - fieldsets = [('name',{'fields': ['name'], - 'classes': ['step'], - 'legend': 'Step 1: Room name', - 'description': 'The room name should be short and descriptive.' - }), - ('properties',{'fields': ['self_cleaning','urlpath','source_sco_id'], - 'classes': ['step'], - 'legend': 'Step 2: Room properties', - 'description': ''' - These are basic properties for your room. If you set your room to be cleaned up after use it will - be reset every time the last participant leaves the room.''' - }), - ] widgets = {'source_sco_id': Select(), - 'urlpath': PrefixTextInput(attrs={'size': '15'}), 'name': TextInput(attrs={'size': '40'})} -- cgit v1.1