Move "do not agree" check up, make it redirect to /user/view

This commit is contained in:
Ricky Zhou (周家杰) 2008-03-14 18:04:21 -04:00
parent d00e62368e
commit 001c6064eb

View file

@ -68,15 +68,15 @@ class CLA(controllers.Controller):
turbogears.flash(_('You have already signed the CLA.')) turbogears.flash(_('You have already signed the CLA.'))
turbogears.redirect('/cla/') turbogears.redirect('/cla/')
return dict() return dict()
if not agree:
turbogears.flash(_("You have not signed the CLA."))
turbogears.redirect('/user/view/%s' % person.username)
if not person.telephone or \ if not person.telephone or \
not person.postal_address: not person.postal_address:
turbogears.flash(_('To sign the CLA we must have your telephone number and postal address. Please ensure they have been filled out.')) turbogears.flash(_('To sign the CLA we must have your telephone number and postal address. Please ensure they have been filled out.'))
turbogears.redirect('/user/edit/%s' % username) turbogears.redirect('/user/edit/%s' % username)
groupname = config.get('cla_fedora_group') groupname = config.get('cla_fedora_group')
group = Groups.by_name(groupname) group = Groups.by_name(groupname)
if not agree:
turbogears.flash(_("You have not agreed to the CLA."))
turbogears.redirect('/cla/')
try: try:
# Everything is correct. # Everything is correct.
person.apply(group, person) # Apply... person.apply(group, person) # Apply...