Change CLA wording from "sign" to "complete"

This commit is contained in:
Ricky Zhou (周家杰) 2008-03-14 21:32:05 -04:00
parent 1ff1bd0f25
commit 70c9727cdb
8 changed files with 31 additions and 31 deletions

View file

@ -76,7 +76,7 @@ def isApproved(person, group):
def CLADone(person):
'''
Returns True if the user has completed the GPG-signed CLA
Returns True if the user has completed the CLA
'''
cla_done_group =config.get('cla_done_group')
try:

View file

@ -60,20 +60,20 @@ class CLA(controllers.Controller):
@identity.require(turbogears.identity.not_anonymous())
@error_handler(error)
@expose(template="fas.templates.cla.index")
def sign(self, agree=False):
'''Sign CLA'''
def send(self, agree=False):
'''Send CLA'''
username = turbogears.identity.current.user_name
person = People.by_username(username)
if CLADone(person):
turbogears.flash(_('You have already signed the CLA.'))
turbogears.flash(_('You have already completed the CLA.'))
turbogears.redirect('/cla/')
return dict()
if not agree:
turbogears.flash(_("You have not signed the CLA."))
turbogears.flash(_("You have not completed the CLA."))
turbogears.redirect('/user/view/%s' % person.username)
if not person.telephone or \
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 complete the CLA, we must have your telephone number and postal address. Please ensure they have been filled out.'))
turbogears.redirect('/user/edit/%s' % username)
groupname = config.get('cla_fedora_group')
group = Groups.by_name(groupname)
@ -85,16 +85,16 @@ class CLA(controllers.Controller):
except:
# TODO: If apply succeeds and sponsor fails, the user has
# to remove themselves from the CLA group before they can
# sign the CLA and go through the above try block again.
# complete the CLA and go through the above try block again.
turbogears.flash(_("You could not be added to the '%s' group.") % group.name)
turbogears.redirect('/cla/')
return dict()
else:
dt = datetime.utcnow()
Log(author_id=person.id, description='Signed CLA', changetime=dt)
Log(author_id=person.id, description='Completed CLA', changetime=dt)
message = turbomail.Message(config.get('accounts_email'), config.get('legal_cla_email'), 'Fedora ICLA completed')
message.plain = '''
Fedora user %(username)s has signed a completed ICLA (below).
Fedora user %(username)s has completed an ICLA (below).
Username: %(username)s
Email: %(email)s
Date: %(date)s
@ -113,7 +113,7 @@ Date: %(date)s
template = loader.load('cla.txt', cls=TextTemplate)
message.plain += template.generate(person=person).render('text')
turbomail.enqueue(message)
turbogears.flash(_("You have successfully signed the CLA. You are now in the '%s' group.") % group.name)
turbogears.flash(_("You have successfully completed the CLA. You are now in the '%s' group.") % group.name)
turbogears.redirect('/user/view/%s' % person.username)
return dict()

View file

@ -10,13 +10,13 @@ class Help(controllers.Controller):
'user_ircnick' : ['IRC Nick (Optional)', '<p>IRC Nick is used to identify yourself on irc.freenode.net. Please register your nick on irc.freenode.net first, then fill this in so people can find you online when they need to</p>'],
'user_email' : ['Email (Required)', '<p>This email address should be your prefered email contact and will be used to send various official emails to. This is also where your @fedoraproject.org email will get forwarded</p>'],
'user_human_name' : ['Full Name (Required)', '<p>Your Human Name or "real life" name</p>'],
'user_gpg_keyid' : ['GPG Key', '<p>Only required for users signing the <a href="http://fedoraproject.org/wiki/Legal/Licenses/CLA">CLA</a>. It is generally used to prove that a message or email came from you or to encrypt information so that only the recipients can read it. See the <a href="http://fedoraproject.org/wiki/Infrastructure/AccountSystem/CLAHowTo">CLAHowTo</a> for more information</p>'],
'user_telephone' : ['Telephone', '<p>Only required for users signing the <a href="http://fedoraproject.org/wiki/Legal/Licenses/CLA">CLA</a>. Sometimes during a time of emergency someone from the Fedora Project may need to contact you. For more information see our <a href="http://fedoraproject.org/wiki/Legal/PrivacyPolicy">Privacy Policy</a></p>'],
'user_postal_address': ['Postal Address', '<p>Only required for users signing the <a href="http://fedoraproject.org/wiki/Legal/Licenses/CLA">CLA</a>. This should be a mailing address where you can be contacted. See our <a href="http://fedoraproject.org/wiki/Legal/PrivacyPolicy">Privacy Policy</a> about any concerns.</p>'],
'user_gpg_keyid' : ['GPG Key', '<p>A GPG key is generally used to prove that a message or email came from you or to encrypt information so that only the recipients can read it. This can be used when a password reset is sent to your email.</p>'],
'user_telephone' : ['Telephone', '<p>Required in order to complete the <a href="http://fedoraproject.org/wiki/Legal/Licenses/CLA">CLA</a>. Sometimes during a time of emergency someone from the Fedora Project may need to contact you. For more information see our <a href="http://fedoraproject.org/wiki/Legal/PrivacyPolicy">Privacy Policy</a></p>'],
'user_postal_address': ['Postal Address', '<p>Required in order to complete the <a href="http://fedoraproject.org/wiki/Legal/Licenses/CLA">CLA</a>. This should be a mailing address where you can be contacted. See our <a href="http://fedoraproject.org/wiki/Legal/PrivacyPolicy">Privacy Policy</a> about any concerns.</p>'],
'user_timezone': ['Timezone (Optional)', '<p>Please specify the time zone you are in.</p>'],
'user_comments': ['Comments (Optional)', '<p>Misc comments about yourself.</p>'],
'user_account_status': ['Account Status', '<p>Shows account status, possible values include<ul><li>Valid</li><li>Disabled</li><li>Expired</li></ul></p>'],
'user_cla' : ['CLA', '<p>In order to become a full Fedora contributor you must sign a <a href="http://fedoraproject.org/wiki/Legal/Licenses/CLA">Contributor License Agreement</a>. This license is a legal agreement between you and Red Hat. Full status allows people to contribute content and code and is recommended for anyone interested in getting involved in the Fedora Project. To find out more, see the <a href="http://fedoraproject.org/wiki/Infrastructure/AccountSystem/CLAHowTo">CLAHowTo</a>.</p>'],
'user_cla' : ['CLA', '<p>In order to become a full Fedora contributor you must complete the <a href="http://fedoraproject.org/wiki/Legal/Licenses/CLA">Contributor License Agreement</a>. This license is a legal agreement between you and Red Hat. Full status allows people to contribute content and code and is recommended for anyone interested in getting involved in the Fedora Project.</p>'],
'user_ssh_key' : ['Public SSH Key', '<p>Many resources require public key authentiaction to work. By uploading your public key to us, you can then log in to our servers. Type "man ssh-keygen" for more information on creating your key. Once created you will want to upload ~/.ssh/id_dsa.pub or ~/.ssh/id_rsa.pub</p>'],
'user_locale': ['Locale', '<p>For non-english speaking peoples this allows individuals to select which locale they are in.</p>'],

View file

@ -12,10 +12,10 @@
<xi:include href="cla.html" />
${Markup(_('&lt;a href="%(url)s"&gt;Text Version&lt;/a&gt;') % {'url': tg.url('/cla/text')})}
<p py:if="cla">
${Markup(_('You have already sucessfully signed the CLA.') % {'url': tg.url('/cla/text')})}
${Markup(_('You have already sucessfully complete the CLA.') % {'url': tg.url('/cla/text')})}
</p>
<py:if test="not cla">
<form action="${tg.url('/cla/sign')}" method="post">
<form action="${tg.url('/cla/send')}" method="post">
<div>
<input type="submit" id="agree" name="agree" value="${_('I agree')}" />
<input type="submit" value="${_('I do not agree')}" />

View file

@ -21,7 +21,7 @@
</py:if>
</py:for>
<ul class="queue">
<li py:if="not cla" class="unapproved">${_('CLA Not Signed. To become a full Fedora Contributor please ')}<a href="${tg.url('/cla/')}">${_('Sign the CLA')}</a>.</li>
<li py:if="not cla" class="unapproved">${_('CLA not completed. To become a full Fedora Contributor please ')}<a href="${tg.url('/cla/')}">${_('Complete the CLA')}</a>.</li>
<li py:if="not person.ssh_key">You have not submitted an SSH key, some Fedora resources require an SSH key. Please submit yours by editing <a href="${tg.url('/user/edit')}">My Account</a></li>
</ul>
<div>

View file

@ -27,6 +27,16 @@
<label for="fedoraPersonBugzillaMail">${_('Bugzilla Email')}:</label>
<input type="text" id="fedoraPersonBugzillaMail" name="fedoraPersonBugzillaMail" value="${target.username}" />
</div> -->
<div class="field">
<label for="telephone">${_('Telephone Number')}:</label>
<input type="text" id="telephone" name="telephone" value="${target.telephone}" />
<script type="text/javascript">var hb5 = new HelpBalloon({dataURL: '${tg.url('/help/get_help/user_telephone')}'});</script>
</div>
<div class="field">
<label for="postal_address">${_('Postal Address')}:</label>
<textarea id="postal_address" name="postal_address">${target.postal_address}</textarea>
<script type="text/javascript">var hb6 = new HelpBalloon({dataURL: '${tg.url('/help/get_help/user_postal_address')}'});</script>
</div>
<div class="field">
<label for="ircnick">${_('IRC Nick')}:</label>
<input type="text" id="ircnick" name="ircnick" value="${target.ircnick}" />
@ -37,22 +47,12 @@
<input type="text" id="gpg_keyid" name="gpg_keyid" value="${target.gpg_keyid}" />
<script type="text/javascript">var hb4 = new HelpBalloon({dataURL: '${tg.url('/help/get_help/user_gpg_keyid')}'});</script>
</div>
<div class="field">
<label for="telephone">${_('Telephone Number')}:</label>
<input type="text" id="telephone" name="telephone" value="${target.telephone}" />
<script type="text/javascript">var hb5 = new HelpBalloon({dataURL: '${tg.url('/help/get_help/user_telephone')}'});</script>
</div>
<div class="field">
<label for="ssh_key">${_('Public SSH Key')}:</label>
<!--<textarea id="ssh_key" rows='3' cols='50' name="ssh_key">${target.ssh_key}</textarea>-->
<input type="file" name="ssh_key" id="ssh_key" />
<script type="text/javascript">var hb19 = new HelpBalloon({dataURL: '${tg.url('/help/get_help/user_ssh_key')}'});</script>
</div>
<div class="field">
<label for="postal_address">${_('Postal Address')}:</label>
<textarea id="postal_address" name="postal_address">${target.postal_address}</textarea>
<script type="text/javascript">var hb6 = new HelpBalloon({dataURL: '${tg.url('/help/get_help/user_postal_address')}'});</script>
</div>
<div class="field">
<label for="timezone">${_('Time Zone')}:</label>
<select id="timezone" name="timezone">

View file

@ -24,11 +24,11 @@
${Markup(_('(pending change to %(email)s - &lt;a href="%(url)s"&gt;cancel&lt;/a&gt;)') % {'email': person.unverified_email, 'url': tg.url('/user/verifyemail/1/cancel')})}
</span>
</dd>
<py:if test="personal"><dt>${_('Telephone Number:')}</dt><dd>${person.telephone}&nbsp;</dd></py:if>
<py:if test="personal"><dt>${_('Postal Address:')}</dt><dd>${person.postal_address}&nbsp;</dd></py:if>
<!--<dt>${_('Bugzilla Email:')}</dt><dd>${person.username}</dd>-->
<dt>${_('IRC Nick:')}</dt><dd>${person.ircnick}&nbsp;</dd>
<dt>${_('PGP Key:')}</dt><dd>${person.gpg_keyid}&nbsp;</dd>
<py:if test="personal"><dt>${_('Telephone Number:')}</dt><dd>${person.telephone}&nbsp;</dd></py:if>
<py:if test="personal"><dt>${_('Postal Address:')}</dt><dd>${person.postal_address}&nbsp;</dd></py:if>
<py:if test="personal"><dt>${_('Public SSH Key:')}</dt>
<dd py:if="person.ssh_key" title="${person.ssh_key}">${person.ssh_key[:20]}....&nbsp;</dd>
<dd py:if="not person.ssh_key">No ssh key provided&nbsp;</dd>
@ -43,7 +43,7 @@
<script type="text/javascript">var hb1 = new HelpBalloon({dataURL: '${tg.url('/help/get_help/user_account_status')}'});</script></dd>
<dt>${_('CLA:')}</dt><dd>
<span py:if="cla" class="approved">${_('CLA Done')}</span>
<span py:if="not cla" class="unapproved">${_('Not Done')}<py:if test="personal"> (<a href="${tg.url('/cla/')}">${_('Sign it!')}</a>)</py:if></span>
<span py:if="not cla" class="unapproved">${_('Not Done')}<py:if test="personal"> (<a href="${tg.url('/cla/')}">${_('Complete it!')}</a>)</py:if></span>
<script type="text/javascript">var hb2 = new HelpBalloon({dataURL: '${tg.url('/help/get_help/user_cla')}'});</script></dd>
</dl>
</div>

View file

@ -655,7 +655,7 @@ https://admin.fedoraproject.org/accounts/user/verifypass/%(user)s/%(token)s
keydump = crypto.dump_privatekey(crypto.FILETYPE_PEM, pkey)
return dict(cert=certdump, key=keydump)
else:
turbogears.flash(_('Before generating a certificate, you must first sign the CLA.'))
turbogears.flash(_('Before generating a certificate, you must first complete the CLA.'))
turbogears.redirect('/cla/')