diff options
Diffstat (limited to 'src/meetingtools/apps/room/forms.py')
-rw-r--r-- | src/meetingtools/apps/room/forms.py | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/meetingtools/apps/room/forms.py b/src/meetingtools/apps/room/forms.py index 3b89297..aef7d8d 100644 --- a/src/meetingtools/apps/room/forms.py +++ b/src/meetingtools/apps/room/forms.py @@ -8,12 +8,13 @@ from meetingtools.apps.room.models import Room from django.forms.widgets import Select, TextInput from django.forms.fields import ChoiceField, BooleanField from django.forms.forms import Form +from form_utils.forms import BetterModelForm PUBLIC = 0 PROTECTED = 1 PRIVATE = 2 -class UpdateRoomForm(ModelForm): +class UpdateRoomForm(BetterModelForm): #protection = ChoiceField(choices=((PUBLIC,'Anyone can enter the room.'), # (PROTECTED,'Only group members and accepted guests can enter the room.'), # (PRIVATE,'Only group members can enter.'))) @@ -21,6 +22,20 @@ class UpdateRoomForm(ModelForm): class Meta: model = Room fields = ['name','urlpath','participants','presenters','hosts','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 self-cleaning it will be reset every time the last participant leaves the room.'}), + ('rights',{'fields': ['participants','presenters','hosts'], + 'classes': ['step','submit_step'], + 'legend': 'Step 3: Room rights (optional)', + 'description': 'Define the groups that are to have access to your room.'}) + ] widgets = {'participants': Select(), 'presenters': Select(), 'hosts': Select(), |