diff options
author | Leif Johansson <leifj@sunet.se> | 2011-05-12 10:36:45 +0200 |
---|---|---|
committer | Leif Johansson <leifj@sunet.se> | 2011-05-12 10:36:45 +0200 |
commit | 890daedbfa6a1e19af54334312abe40bfc5c6e8b (patch) | |
tree | 7f5b082982fd1b3eab4bf27d0ee3f07051c4ec8f | |
parent | ca1d49acab1e0fbade083df339846e43926e8ff4 (diff) |
- temporary hack for default template
- description field in dialogs
-rw-r--r-- | src/meetingtools/apps/room/forms.py | 11 | ||||
-rw-r--r-- | src/meetingtools/apps/room/views.py | 6 | ||||
-rw-r--r-- | src/meetingtools/settings.py | 1 |
3 files changed, 12 insertions, 6 deletions
diff --git a/src/meetingtools/apps/room/forms.py b/src/meetingtools/apps/room/forms.py index b34910f..1697c81 100644 --- a/src/meetingtools/apps/room/forms.py +++ b/src/meetingtools/apps/room/forms.py @@ -27,7 +27,7 @@ class PrefixTextInput(TextInput): class ModifyRoomForm(ModelForm): class Meta: model = Room - fields = ['name','source_sco_id','self_cleaning'] + fields = ['name','description','source_sco_id','self_cleaning'] widgets = {'source_sco_id': Select(), 'name': TextInput(attrs={'size': '40'})} @@ -38,15 +38,20 @@ class CreateRoomForm(BetterModelForm): class Meta: model = Room - fields = ['name','urlpath','access','self_cleaning'] + fields = ['name','description','urlpath','access','self_cleaning'] fieldsets = [('name',{'fields': ['name'], 'classes': ['step'], 'legend': 'Step 1: Room name', 'description': 'The room name should be short and descriptive.' }), + ('description',{'fields': ['description'], + 'classes': ['step'], + 'legend': 'Step 2: Room description', + 'description': 'Please provide a short summary of this room.' + }), ('properties',{'fields': ['self_cleaning','urlpath','access'], 'classes': ['step'], - 'legend': 'Step 2: Room properties', + 'legend': 'Step 3: Room properties', 'description': ''' <p>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 diff --git a/src/meetingtools/apps/room/views.py b/src/meetingtools/apps/room/views.py index ef1a641..4630e3c 100644 --- a/src/meetingtools/apps/room/views.py +++ b/src/meetingtools/apps/room/views.py @@ -16,7 +16,7 @@ import logging from pprint import pformat from meetingtools.utils import session import time -from meetingtools.settings import GRACE, BASE_URL +from meetingtools.settings import GRACE, BASE_URL, DEFAULT_TEMPLATE_SCO from django.utils.datetime_safe import datetime from django.http import HttpResponseRedirect from django.core.exceptions import ObjectDoesNotExist @@ -129,7 +129,7 @@ def _update_room(request, room, form=None): api = ac_api_client(request, room.acc) params = {'type':'meeting'} - for attr,param in (('sco_id','sco-id'),('folder_sco_id','folder-id'),('source_sco_id','source-sco-id'),('urlpath','url-path'),('name','name')): + for attr,param in (('sco_id','sco-id'),('folder_sco_id','folder-id'),('source_sco_id','source-sco-id'),('urlpath','url-path'),('name','name'),('description','description')): v = None if hasattr(room,attr): v = getattr(room,attr) @@ -191,7 +191,7 @@ def _update_room(request, room, form=None): def create(request): acc = _acc_for_user(request.user) my_meetings_sco_id = _user_meeting_folder(request,acc) - room = Room(creator=request.user,acc=acc,folder_sco_id=my_meetings_sco_id) + room = Room(creator=request.user,acc=acc,folder_sco_id=my_meetings_sco_id,source_sco_id=DEFAULT_TEMPLATE_SCO) what = "Create" title = "Create a new room" diff --git a/src/meetingtools/settings.py b/src/meetingtools/settings.py index a09da72..9c44138 100644 --- a/src/meetingtools/settings.py +++ b/src/meetingtools/settings.py @@ -28,6 +28,7 @@ DATABASES = { } GRACE = 10 +DEFAULT_TEMPLATE_SCO=18807 # Local time zone for this installation. Choices can be found here: # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name |