summaryrefslogtreecommitdiff
path: root/coip/apps/invitation
diff options
context:
space:
mode:
Diffstat (limited to 'coip/apps/invitation')
-rw-r--r--coip/apps/invitation/forms.py14
-rw-r--r--coip/apps/invitation/views.py2
2 files changed, 13 insertions, 3 deletions
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
diff --git a/coip/apps/invitation/views.py b/coip/apps/invitation/views.py
index 359d884..e4cb360 100644
--- a/coip/apps/invitation/views.py
+++ b/coip/apps/invitation/views.py
@@ -34,7 +34,7 @@ def invite(request,id):
invitation=Invitation(message="Please consider joining my group!",expires=exp.strftime("%Y-%m-%d"))
form = InvitationForm(instance=invitation);
- return respond_to(request,{'text/html': 'apps/invitation/edit.html'},{'form': form,'name': name,'formtitle': 'Invite to %s' % (name),'submitname': 'Invite User'})
+ return respond_to(request,{'text/html': 'apps/invitation/edit.html'},{'form': form,'name': name,'formtitle': 'Invite someone to join %s' % (name.short),'submitname': 'Invite User'})
@login_required
def accept(request,nonce):