Eliminate separate view page.
This commit is contained in:
parent
5e9693d9d0
commit
d00e62368e
3 changed files with 6 additions and 40 deletions
|
@ -22,12 +22,11 @@ class CLA(controllers.Controller):
|
||||||
@identity.require(turbogears.identity.not_anonymous())
|
@identity.require(turbogears.identity.not_anonymous())
|
||||||
@expose(template="fas.templates.cla.index")
|
@expose(template="fas.templates.cla.index")
|
||||||
def index(self):
|
def index(self):
|
||||||
'''Display an explanatory message about the Click-through and Signed CLAs (with links)'''
|
'''Display the CLAs (and accept/do not accept buttons)'''
|
||||||
username = turbogears.identity.current.user_name
|
username = turbogears.identity.current.user_name
|
||||||
person = People.by_username(username)
|
person = People.by_username(username)
|
||||||
|
|
||||||
cla = CLADone(person)
|
cla = CLADone(person)
|
||||||
return dict(cla=cla)
|
return dict(cla=cla, person=person, date=datetime.utcnow().ctime())
|
||||||
|
|
||||||
def jsonRequest(self):
|
def jsonRequest(self):
|
||||||
return 'tg_format' in cherrypy.request.params and \
|
return 'tg_format' in cherrypy.request.params and \
|
||||||
|
@ -49,19 +48,6 @@ class CLA(controllers.Controller):
|
||||||
person = People.by_username(username)
|
person = People.by_username(username)
|
||||||
return dict(person=person, date=datetime.utcnow().ctime())
|
return dict(person=person, date=datetime.utcnow().ctime())
|
||||||
|
|
||||||
@identity.require(turbogears.identity.not_anonymous())
|
|
||||||
@error_handler(error)
|
|
||||||
@expose(template="fas.templates.cla.view")
|
|
||||||
def view(self):
|
|
||||||
'''View CLA'''
|
|
||||||
username = turbogears.identity.current.user_name
|
|
||||||
person = People.by_username(username)
|
|
||||||
if CLADone(person):
|
|
||||||
turbogears.flash(_('You have already signed the CLA.'))
|
|
||||||
turbogears.redirect('/cla/')
|
|
||||||
return dict()
|
|
||||||
return dict(person=person, date=datetime.utcnow().ctime())
|
|
||||||
|
|
||||||
@identity.require(turbogears.identity.not_anonymous())
|
@identity.require(turbogears.identity.not_anonymous())
|
||||||
@error_handler(error)
|
@error_handler(error)
|
||||||
@expose(template="genshi-text:fas.templates.cla.cla", format="text", content_type='text/plain; charset=utf-8')
|
@expose(template="genshi-text:fas.templates.cla.cla", format="text", content_type='text/plain; charset=utf-8')
|
||||||
|
|
|
@ -8,14 +8,13 @@
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<h2>${_('Fedora Contributor License Agreement')}</h2>
|
<h2>${_('Fedora Contributor License Agreement')}</h2>
|
||||||
|
${Markup(_('<a href="%(url)s">Text Version</a>') % {'url': tg.url('/cla/text')})}
|
||||||
|
<xi:include href="cla.html" />
|
||||||
|
${Markup(_('<a href="%(url)s">Text Version</a>') % {'url': tg.url('/cla/text')})}
|
||||||
<p py:if="cla">
|
<p py:if="cla">
|
||||||
${Markup(_('You have already sucessfully signed the <a href="%(url)s">CLA</a> (<a href="%(url)s">text</a>).') % {'url': tg.url('/cla/view')})}
|
${Markup(_('You have already sucessfully signed the CLA.') % {'url': tg.url('/cla/text')})}
|
||||||
</p>
|
</p>
|
||||||
<py:if test="not cla">
|
<py:if test="not cla">
|
||||||
<p>
|
|
||||||
${_('Insert legal text here')}
|
|
||||||
</p>
|
|
||||||
${Markup(_('<a href="%(url)s">View the CLA</a> (<a href="%(url)s">text</a>).') % {'url': tg.url('/cla/view')})}
|
|
||||||
<form action="${tg.url('/cla/sign')}" method="post">
|
<form action="${tg.url('/cla/sign')}" method="post">
|
||||||
<div>
|
<div>
|
||||||
<input type="submit" id="agree" name="agree" value="${_('I agree')}" />
|
<input type="submit" id="agree" name="agree" value="${_('I agree')}" />
|
||||||
|
|
|
@ -1,19 +0,0 @@
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml"
|
|
||||||
xmlns:py="http://genshi.edgewall.org/"
|
|
||||||
xmlns:xi="http://www.w3.org/2001/XInclude">
|
|
||||||
<xi:include href="../master.html" />
|
|
||||||
<head>
|
|
||||||
<title>${_('Fedora Accounts System')}</title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<h2>${_('Contributor License Agreement')}</h2>
|
|
||||||
<p>
|
|
||||||
<a href="${tg.url('/cla/')}">${_('Return to the signing page.')}</a>
|
|
||||||
</p>
|
|
||||||
<xi:include href="cla.html" />
|
|
||||||
<p>
|
|
||||||
<a href="${tg.url('/cla/')}">${_('Return to the signing page.')}</a>
|
|
||||||
</p>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
Loading…
Add table
Add a link
Reference in a new issue