''' Created on Feb 1, 2011 @author: leifj ''' from meetingtools.apps.room.models import Room from django.forms.widgets import Select, TextInput, RadioSelect, Textarea 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 PRIVATE = 2 class PrefixTextInput(TextInput): def __init__(self, attrs=None, prefix=None): super(PrefixTextInput, self).__init__(attrs) self.prefix = prefix def render(self, name, value, attrs=None): return mark_safe("
These are basic properties for your room. If you set your room to cleaned up after use it will be reset every time the last participant leaves the room. If you create a public room it will be open to anyone who has the room URL. If you create a private room then guests will have to be approved by an active meeting host before being able to join the room.
''' }), ] widgets = {'access': RadioSelect(), 'urlpath': PrefixTextInput(attrs={'size': '10'}), 'description': Textarea(attrs={'rows': 4, 'cols': 50}), 'name': TextInput(attrs={'size': '40'})} class DeleteRoomForm(Form): confirm = BooleanField(label="Confirm remove room") class TagRoomForm(Form): tag = CharField(max_length=256)