From 814da1fbc7d4085fc2b13eae26047bde5070203e Mon Sep 17 00:00:00 2001 From: Michael McGrath Date: Mon, 3 Mar 2008 10:45:00 -0600 Subject: [PATCH] Require less info initially (lower barrier, less scary). Notify users when signing the CLA that we need more information --- fas/fas/cla.py | 7 ++++++- fas/fas/templates/cla/index.html | 11 +++++++---- fas/fas/templates/user/new.html | 3 +-- fas/fas/user.py | 2 +- 4 files changed, 15 insertions(+), 8 deletions(-) diff --git a/fas/fas/cla.py b/fas/fas/cla.py index 3f1a6bd..3b83756 100644 --- a/fas/fas/cla.py +++ b/fas/fas/cla.py @@ -46,6 +46,11 @@ class CLA(controllers.Controller): '''View CLA''' username = turbogears.identity.current.user_name person = People.by_username(username) + if not person.telephone or \ + not person.postal_address or \ + not person.gpg_keyid: + turbogears.flash(_('To sign the CLA we must have your telephone number, postal address and gpg key id. Please ensure they have been filled out')) + turbogears.redirect('/user/edit/%s' % username) if type == 'click': if signedCLAPrivs(person): @@ -82,7 +87,7 @@ class CLA(controllers.Controller): '''Sign CLA''' username = turbogears.identity.current.user_name person = People.by_username(username) - + if signedCLAPrivs(person): turbogears.flash(_('You have already signed the CLA.')) turbogears.redirect('/cla/') diff --git a/fas/fas/templates/cla/index.html b/fas/fas/templates/cla/index.html index b63e85e..31fd226 100644 --- a/fas/fas/templates/cla/index.html +++ b/fas/fas/templates/cla/index.html @@ -11,10 +11,13 @@

${Markup(_('There are two ways to sign the CLA. Most users will want to do a signed CLA as it will promote them to a full contributor in Fedora. The click-through CLA only grants partial access but may be preferred for those with special legal considerations. See: <a href="http://fedoraproject.org/wiki/Legal/CLAAcceptanceHierarchies">CLA Acceptance Hierarchies</a> for more information.'))}

- +
+

+

+

${Markup(_('You have already sucessfully signed the <a href="%s">CLA</a>.') % tg.url('/cla/view'))}

diff --git a/fas/fas/templates/user/new.html b/fas/fas/templates/user/new.html index 8d07f5a..786cd5b 100644 --- a/fas/fas/templates/user/new.html +++ b/fas/fas/templates/user/new.html @@ -26,7 +26,6 @@ - -->
@@ -34,7 +33,7 @@
-
+
-->
diff --git a/fas/fas/user.py b/fas/fas/user.py index fe023ee..be3712c 100644 --- a/fas/fas/user.py +++ b/fas/fas/user.py @@ -255,7 +255,7 @@ class User(controllers.Controller): @validate(validators=UserCreate()) @error_handler(error) @expose(template='fas.templates.new') - def create(self, username, human_name, email, telephone, postal_address): + def create(self, username, human_name, email, telephone=None, postal_address=None): # TODO: Ensure that e-mails are unique? # Also, perhaps implement a timeout- delete account # if the e-mail is not verified (i.e. the person changes