Require less info initially (lower barrier, less scary). Notify users when signing the CLA that we need more information

This commit is contained in:
Michael McGrath 2008-03-03 10:45:00 -06:00
parent 189425628e
commit 814da1fbc7
4 changed files with 15 additions and 8 deletions

View file

@ -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/')

View file

@ -11,10 +11,13 @@
<p>
${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: &lt;a href="http://fedoraproject.org/wiki/Legal/CLAAcceptanceHierarchies"&gt;CLA Acceptance Hierarchies&lt;/a&gt; for more information.'))}
</p>
<ul py:if="not signedCLA">
<li><a href="${tg.url('/cla/view/sign')}">${_('Signed CLA')}</a></li>
<li py:if="not clickedCLA"><a href="${tg.url('/cla/view/click')}">${_('Click-through CLA')}</a></li>
</ul>
<br/>
<p>
<ul py:if="not signedCLA">
<li><a href="${tg.url('/cla/view/sign')}">${_('Sign Contributor License Agreement (CLA)')}</a></li>
<!--<li py:if="not clickedCLA"><a href="${tg.url('/cla/view/click')}">${_('Click-through CLA')}</a></li>-->
</ul>
</p>
<p py:if="signedCLA">
${Markup(_('You have already sucessfully signed the &lt;a href="%s"&gt;CLA&lt;/a&gt;.') % tg.url('/cla/view'))}
</p>

View file

@ -26,7 +26,6 @@
<label for="fedoraPersonBugzillaMail">${_('Bugzilla Email:')}</label>
<input type="text" id="mail" name="fedoraPersonBugzillaMail" />
</div>
-->
<div class="field">
<label for="telephone">${_('Telephone Number:')}</label>
<input type="text" id="telephone" name="telephone" />
@ -34,7 +33,7 @@
<div class="field">
<label for="postal_address">${_('Postal Address:')}</label>
<textarea id="postal_address" name="postal_address"></textarea>
</div>
</div>-->
<div class="field">
<input type="submit" value="${_('Sign up!')}" />
</div>

View file

@ -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