diff options
Diffstat (limited to 'src/meetingtools/apps/room/forms.py')
-rw-r--r-- | src/meetingtools/apps/room/forms.py | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/meetingtools/apps/room/forms.py b/src/meetingtools/apps/room/forms.py new file mode 100644 index 0000000..3b89297 --- /dev/null +++ b/src/meetingtools/apps/room/forms.py @@ -0,0 +1,33 @@ +''' +Created on Feb 1, 2011 + +@author: leifj +''' +from django.forms.models import ModelForm +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 + +PUBLIC = 0 +PROTECTED = 1 +PRIVATE = 2 + +class UpdateRoomForm(ModelForm): + #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.'))) + + class Meta: + model = Room + fields = ['name','urlpath','participants','presenters','hosts','source_sco_id','self_cleaning'] + widgets = {'participants': Select(), + 'presenters': Select(), + 'hosts': Select(), + 'source_sco_id': Select(), + 'urlpath': TextInput(attrs={'size': '40'}), + 'name': TextInput(attrs={'size': '40'}), + } + +class DeleteRoomForm(Form): + confirm = BooleanField(label="Confirm remove room")
\ No newline at end of file |