From 77ceee6e23f2a8daaf5e3247970953313aebcdd3 Mon Sep 17 00:00:00 2001 From: Leif Johansson Date: Mon, 28 Feb 2011 22:07:19 +0100 Subject: wizards --- coip/apps/invitation/forms.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'coip/apps/invitation/forms.py') diff --git a/coip/apps/invitation/forms.py b/coip/apps/invitation/forms.py index 28add9b..2a1b62f 100644 --- a/coip/apps/invitation/forms.py +++ b/coip/apps/invitation/forms.py @@ -5,8 +5,18 @@ Created on Jun 23, 2010 ''' from django import forms from coip.apps.invitation.models import Invitation +from form_utils.forms import BetterModelForm -class InvitationForm(forms.ModelForm): +class InvitationForm(BetterModelForm): class Meta: model = Invitation - fields = ['email','message','expires'] \ No newline at end of file + fields = ['email','message','expires'] + fieldsets = [('step1', {'fields': ['email','message'], + 'legend': 'Step 1: Email and message', + 'classes': ['step'], + 'description': 'An email message will be sent to the recipient with an invitation-link. After following that link the recipient will be a member of the group.'}), + ('step2', {'fields': ['expires'], + 'legend': 'Step 2: Expiration (optioinal)', + 'classes': ['step','submit_step'], + 'description': 'You are encouraged to provide an expiration time for your invitation. The time should be long enough to allow the recipient to answer and short enough prevent the invitation from falling into the wrong hands. The default is usually good enough.'}) + ] \ No newline at end of file -- cgit v1.1