Fix the cla.txt template problem, fix initial inserts in schema, and gettext calls in template.
This commit is contained in:
parent
3388021462
commit
6285bd18a2
3 changed files with 7 additions and 9 deletions
|
@ -7,8 +7,7 @@ import cherrypy
|
|||
from datetime import datetime
|
||||
import re
|
||||
import turbomail
|
||||
from genshi.template import TemplateLoader
|
||||
from genshi.template import TextTemplate
|
||||
from genshi.template.plugin import TextTemplateEnginePlugin
|
||||
|
||||
from fas.model import People
|
||||
from fas.model import Log
|
||||
|
@ -109,9 +108,8 @@ Date: %(date)s
|
|||
'facsimile': person.facsimile,
|
||||
'date': dt.ctime(),}
|
||||
# Sigh.. if only there were a nicer way.
|
||||
loader = TemplateLoader('fas/templates/cla')
|
||||
template = loader.load('cla.txt', cls=TextTemplate)
|
||||
message.plain += template.generate(person=person).render('text')
|
||||
plugin = TextTemplateEnginePlugin()
|
||||
message.plain += plugin.render(template='fas.templates.cla.cla', info=dict(person=person), format='text')
|
||||
turbomail.enqueue(message)
|
||||
turbogears.flash(_("You have successfully completed the CLA. You are now in the '%s' group.") % group.name)
|
||||
turbogears.redirect('/user/view/%s' % person.username)
|
||||
|
|
|
@ -21,8 +21,8 @@
|
|||
</py:if>
|
||||
</py:for>
|
||||
<ul class="queue">
|
||||
<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>
|
||||
<li py:if="not cla" class="unapproved">${Markup(_('CLA not completed. To become a full Fedora Contributor please <a href="%s">complete the CLA</a>.') % tg.url('/cla/'))}</li>
|
||||
<li py:if="not person.ssh_key">${Markup(_('You have not submitted an SSH key, some Fedora resources require an SSH key. Please submit yours by editing <a href="%s">My Account</a>') % tg.url('/user/edit'))}</li>
|
||||
</ul>
|
||||
<div>
|
||||
<!-- TODO: Make this entire page more friendly -->
|
||||
|
|
|
@ -347,8 +347,8 @@ GRANT ALL ON TABLE people, groups, person_roles, group_roles, bugzilla_queue, co
|
|||
INSERT INTO people (id, username, human_name, password, email) VALUES (100001, 'admin', 'Admin User', '$1$djFfnacd$b6NFqFlac743Lb4sKWXj4/', 'root@localhost');
|
||||
|
||||
-- Create default groups and populate
|
||||
INSERT INTO groups (id, name, display_name, owner_id, group_type) VALUES (100002, 'cla_done', 'CLA Done Group', (SELECT id from people where username='admin'), 'tracking');
|
||||
INSERT INTO groups (id, name, display_name, owner_id, group_type) VALUES (101441, 'cla_fedora', 'Fedora CLA Group', (SELECT id from people where username='admin'), 'tracking');
|
||||
INSERT INTO groups (id, name, display_name, owner_id, group_type, user_can_remove) VALUES (100002, 'cla_done', 'CLA Done Group', (SELECT id from people where username='admin'), 'tracking', false);
|
||||
INSERT INTO groups (id, name, display_name, owner_id, group_type, user_can_remove) VALUES (101441, 'cla_fedora', 'Fedora CLA Group', (SELECT id from people where username='admin'), 'tracking', false);
|
||||
INSERT INTO groups (id, name, display_name, owner_id, group_type) VALUES (100006, 'accounts', 'Account System Admins', (SELECT id from people where username='admin'), 'tracking');
|
||||
INSERT INTO groups (id, name, display_name, owner_id, group_type) VALUES (100148, 'fedorabugs', 'Fedora Bugs Group', (SELECT id from people where username='admin'), 'tracking');
|
||||
INSERT INTO groups (name, display_name, owner_id, group_type) VALUES ('fas-system', 'System users allowed to get password and key information', (SELECT id from people where username='admin'), 'system');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue