diff options
author | Leif Johansson <leifj@sunet.se> | 2011-05-11 15:15:06 +0200 |
---|---|---|
committer | Leif Johansson <leifj@sunet.se> | 2011-05-11 15:15:06 +0200 |
commit | c7030b1d9966c88a166559f2e2e87d3d8afd0f20 (patch) | |
tree | 19592ded8cdb8887e7a129f624ba60981efba585 | |
parent | 62d6befbf91dd1df04b5cfa4c2a1bdfc4601e177 (diff) |
bring back modify with new limited form
-rw-r--r-- | src/meetingtools/apps/room/forms.py | 17 | ||||
-rw-r--r-- | src/templates/apps/room/update.html | 9 |
2 files changed, 3 insertions, 23 deletions
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("<b>"+self.prefix+"</b> "+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'})} diff --git a/src/templates/apps/room/update.html b/src/templates/apps/room/update.html index 3e5c4fa..01f1990 100644 --- a/src/templates/apps/room/update.html +++ b/src/templates/apps/room/update.html @@ -1,8 +1 @@ -{% extends "apps/room/modify.html" %} -{% block beforeform %} -<div class="ui-state-highlight ui-corner-all" style="margin-bottom: 5px;"> -<p class="infopanel"> -<span class="ui-icon ui-icon-info"></span> -Here you can update an existing meeting room... -</p></div> -{% endblock %}
\ No newline at end of file +{% extends "edit.html" %} |