commit b10c330ed24a40bada1140c2f0a5a4542b6b9287
Author: Nicolas Chauvet <kwizart(a)gmail.com>
Date: Wed Nov 2 14:21:52 2016 +0100
Add user
files/hotfix/fas/user/new.html | 75 ++++++++++++++
files/hotfix/fas/user/view.html | 211 +++++++++++++++++++++++++++++++++++++++
2 files changed, 286 insertions(+), 0 deletions(-)
---
diff --git a/files/hotfix/fas/user/new.html b/files/hotfix/fas/user/new.html
new file mode 100644
index 0000000..31fd5a5
--- /dev/null
+++ b/files/hotfix/fas/user/new.html
@@ -0,0 +1,75 @@
+<!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>${_('Sign up for a RPM Fusion account')}</title>
+ </head>
+ <body>
+ <h2>${_('Sign up for a RPM Fusion account')}</h2>
+ <p><strong>${_('NOTE:')}</strong> ${_('Username is
permanent')} <em>${_('(i.e. it cannot be changed after registration and will
never be deleted from the system).')}</em> ${_('Personal information may be
updated or removed at any time.')}</p>
+ <form action="${tg.url('/user/create')}"
method="post">
+ <div class="field">
+ <label for="username">${_('Username:')}</label>
+ <input type="text" id="username" name="username"
/>
+ </div>
+ <div class="field">
+ <label for="human_name">${_('Full Name:')}</label>
+ <input type="text" id="human_name"
name="human_name" />
+ <script type="text/javascript">var hb1 = new
HelpBalloon({dataURL:
'${tg.url('/help/get_help/user_human_name')}'});</script>
+ </div>
+ <div class="field">
+ <label for="human_name">${_('Name check
override:')}</label>
+ <input type="checkbox" id="human_name_override"
name="human_name_override" />
+ </div>
+ <div class="field">
+ <label for="email">${_('Email:')}</label>
+ <input type="text" id="email" name="email"
/>
+ <script type="text/javascript">var hb1 = new
HelpBalloon({dataURL:
'${tg.url('/help/get_help/user_email')}'});</script>
+ </div>
+ <div class="field">
+ <label for="email">${_('Verify Email:')}</label>
+ <input type="text" id="email"
name="verify_email" />
+ <script type="text/javascript">var hb1 = new
HelpBalloon({dataURL:
'${tg.url('/help/get_help/user_email')}'});</script>
+ </div>
+ <div class="field">
+ <label for="security_question">${_('Security
Question:')}</label>
+ <input type="text" id="security_question"
name="security_question" />
+ <script type="text/javascript">var hb1 = new
HelpBalloon({dataURL:
'${tg.url('/help/get_help/user_security_question')}'});</script>
+ </div>
+ <div class="field">
+ <label for="security_answer">${_('Security
Answer:')}</label>
+ <input type="text" id="security_answer"
name="security_answer" />
+ </div>
+ <!--
+ <div class="field">
+ <label for="fedoraPersonBugzillaMail">${_('Bugzilla
Email:')}</label>
+ <input type="text" id="mail"
name="fedoraPersonBugzillaMail" />
+ <script type="text/javascript">var hb1 = new
HelpBalloon({dataURL:
'${tg.url('/help/get_help/user_bugzilla_mail')}'});</script>
+ </div>
+ <div class="field">
+ <label for="telephone">${_('Telephone
Number:')}</label>
+ <input type="text" id="telephone"
name="telephone" />
+ <script type="text/javascript">var hb1 = new
HelpBalloon({dataURL:
'${tg.url('/help/get_help/user_telephone')}'});</script>
+ </div>
+ <div py:if="show['show_postal_address']"
class="field">
+ <label for="postal_address">${_('Postal
Address:')}</label>
+ <textarea id="postal_address"
name="postal_address"></textarea>
+ <script type="text/javascript">var hb1 = new
HelpBalloon({dataURL:
'${tg.url('/help/get_help/user_postal_address')}'});</script>
+ </div>-->
+ <div class="field">
+ <label for="age_check">${_('I am 13 years of age or
older')}</label>
+ <input type="checkbox" id="age_check"
name="age_check" />
+ <script type="text/javascript">var hb1 = new
HelpBalloon({dataURL:
'${tg.url('/help/get_help/user_age_check')}'});</script>
+ </div>
+ <div class="field">
+ ${ET(captcha.display())}
+ <label for="captcha">${_('Answer this math
equation')}</label>
+ </div>
+ <div class="field">
+ <input class="sub-button" type="submit"
value="${_('Sign up!')}" />
+ </div>
+ </form>
+ </body>
+</html>
diff --git a/files/hotfix/fas/user/view.html b/files/hotfix/fas/user/view.html
new file mode 100644
index 0000000..d13aa43
--- /dev/null
+++ b/files/hotfix/fas/user/view.html
@@ -0,0 +1,211 @@
+<!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>${_('View Account')}</title>
+ </head>
+ <body>
+ <?python
+ import turbogears
+ from fas import auth
+ from fas.model import People
+ from fas import controllers
+ viewer = People.by_username(tg.identity.user.username)
+ viewer = viewer.filter_private()
+ locale = controllers.get_locale()
+ ?>
+ <h2 class="account" py:if="personal">${_('Your RPM
Fusion Account')}</h2>
+ <h2 class="account" py:if="not personal">${_('%s\'s
RPM Fusion Account') % person.username}</h2>
+ <h3>${_('Account Details')} <a
href="${tg.url('/user/edit/%s' % person.username)}" py:if="personal
or admin">${_('(edit)')}</a></h3>
+ <div class="userbox">
+ <dl>
+ <dt>${_('Account Name:')}</dt>
+ <dd>${person.username}</dd>
+ <py:if test="person.human_name">
+ <dt>${_('Full Name:')}</dt>
+ <dd>${person.human_name}</dd>
+ </py:if>
+ <py:if test="person.email">
+ <dt>${_('Email:')}</dt>
+ <dd>${person.email}
+ <span py:if="(personal or admin) and person.unverified_email and
person.emailtoken">
+ ${Markup(_('(pending change to %(email)s - <a
href="%(url)s">cancel</a>)') % {'email':
person.unverified_email, 'url': tg.url('/user/verifyemail/1/cancel')})}
+ </span>
+ </dd>
+ </py:if>
+ <py:if test="person.telephone and (personal or admin)">
+ <dt>${_('Telephone Number:')}</dt>
+ <dd>${person.telephone} </dd>
+ </py:if>
+ <py:if test="person.postal_address and (personal or admin) and
show['show_postal_address']">
+ <dt>${_('Postal Address:')}</dt>
+ <dd>${person.postal_address} </dd>
+ </py:if>
+ <py:if test="person.country_code">
+ <dt>${_('Country:')}</dt>
+ <dd>${person.country_code} </dd>
+ </py:if>
+ <!--
+ <py:if test="person.bugzilla_email">
+ <dt>${_('Bugzilla
Email:')}</dt><dd>${person.username}</dd>
+ </py:if>
+ -->
+ <py:if test="person.ircnick">
+ <dt>${_('IRC
Nick:')}</dt><dd>${person.ircnick} </dd>
+ </py:if>
+ <py:if test="person.gpg_keyid">
+ <dt>${_('PGP Key:')}</dt>
+ <dd><a
href="http://keys.fedoraproject.org/pks/lookup?search=0x${person.gpg...
+ </py:if>
+ <!-- We should correct this. Everything else is filtered in the
+ - model:People*Select classes.
+ - -->
+ <py:if test="personal or admin">
+ <dt>${_('Public SSH Key:')}</dt>
+ <dd py:if="person.ssh_key" class="ssh_key"
title="${person.ssh_key}">
+ <span py:for="key in person.ssh_key.split('\n')"
py:strip="True">${key}<br /></span>
+ <a
href="${tg.url('/user/clearkey')}">${_('(remove ssh
key)')}</a>
+ </dd>
+ <dd py:if="not person.ssh_key">${_('No ssh key
provided')} </dd>
+ </py:if>
+ <py:if test="person.comments">
+
<dt>${_('Comments:')}</dt><dd>${person.comments} </dd>
+ </py:if>
+ <!-- Note: password is changable so we don't hide it if it's
+ - unavailable
+ - -->
+ <py:if test="personal or admin">
+ <dt>${_('Security question: ')}</dt>
+ <py:if test="personal">
+ <dd>${person.security_question} <a
href="${tg.url('/user/changequestion')}">${_('(change)')}</a></dd>
+ </py:if>
+ <py:if test="not personal and admin">
+ <dd>
+ <div>
+ <span py:if="person.security_question"
class="approved">${_('Active')}</span>
+ <span py:if="not person.security_question"
class="unapproved">${_('Inactive')}</span>
+ </div>
+ </dd>
+ </py:if>
+ </py:if>
+ <py:if test="personal or admin">
+ <dt>${_('Password:')}</dt>
+ <dd>
+ <a
href="${tg.url('/user/changepass')}">${_('(change)')}</a>
+ </dd>
+ </py:if>
+ <py:if test="person.status">
+ <dt>${_('Account Status:')}</dt>
+ <dd>
+ <div py:choose="person.status" py:strip="True">
+ <span py:when="'active'"
class="approved">${_('Active')}</span>
+ <span py:when="'bot'"
class="approved">${_('Bot')}</span>
+ <span py:when="'inactive'"
class="unapproved">${_('Inactive')}</span>
+ <span py:when="'expired'"
class="approved">${_('Expired')}</span>
+ <span py:when="'admin_disabled'"
class="unapproved">${_('Disabled')}</span>
+ <span py:when="'spamcheck_awaiting'"
class="unapproved">${_('Awaiting spamcheck')}</span>
+ <span py:when="'spamcheck_manual'"
class="unapproved">${_('Awaiting manual spamcheck')}</span>
+ <span py:when="'spamcheck_denied'"
class="unapproved">${_('Denied by spamcheck')}</span>
+ <py:if test="admin or (modo and can_update) and (person.status ==
'active')">
+ <a href="${tg.url('/user/updatestatus/%s/%s' %
(person.username, 'inactive'))}">${_('(set as
inactive)')}</a>
+ </py:if>
+ <py:if test="(admin or (modo and can_update)) and (person.status ==
'spamcheck_manual' or person.status == 'spamcheck_denied' or person.status
== 'spamcheck_awaiting')">
+ <a href="${tg.url('/user/updatestatus/%s/%s' %
(person.username, 'active'))}">${_('(enable)')}</a>
+ </py:if>
+ <py:if test="(admin or (modo and can_update)) and (person.status ==
'spamcheck_manual' or person.status == 'spamcheck_awaiting' or
person.status == 'active')">
+ <a href="${tg.url('/user/updatestatus/%s/%s' %
(person.username, 'spamcheck_denied'))}">${_('(deny
spamcheck)')}</a>
+ </py:if>
+ </div>
+ <script type="text/javascript">var hb1 = new
HelpBalloon({dataURL:
'${tg.url('/help/get_help/user_account_status')}'});</script>
+ </dd>
+ </py:if>
+ <dt>${_('Contributor Agreement:')}</dt>
+ <dd py:choose="cla">
+ <span py:when="True" class="approved">
+ <py:if test="undeprecated">
+ ${_('CLA Signed')}
+ </py:if>
+ <py:if test="not undeprecated">
+ ${_('CLA Done')} - <span
class="unapproved">${_('New CLA Not Signed')}
+ <py:if test="personal">- ${_('We need contributors to
sign the new Contributor Agreement')}(<a
href="${tg.url('/fpca/')}">${_('Complete it
now!')}</a>)</py:if>
+ </span>
+ </py:if>
+ <py:if test="admin">
+ (<a href="${tg.url('/fpca/reject/%s' %
person.username)}">${_('Reject FPCA')}</a>)
+ </py:if>
+ </span>
+
+ <span py:otherwise="" class="unapproved">${_('Not
Signed')}<py:if test="personal"> (<a
href="${tg.url('/fpca/')}">${_('Complete
it!')}</a>)</py:if></span>
+ <script type="text/javascript">var hb2 = new
HelpBalloon({dataURL:
'${tg.url('/help/get_help/user_cla')}'});</script>
+ </dd>
+ <dt>${_('Privacy:')}</dt>
+ <dd>
+ <span py:if="person.privacy">${_('Account Information
Private')}</span>
+ <span py:if="not person.privacy">${_('Account Information
Public')}</span>
+ <script type="text/javascript">var hb_privacy = new
HelpBalloon({dataURL:
'${tg.url('/help/get_help/user_privacy')}'});</script>
+ </dd>
+ <py:if test="admin">
+ <dt>${_('IPA Sync status:')}</dt>
+ <dd>
+ <span py:if="person.ipa_sync_status is None">Not
attempted</span>
+ <span py:if="person.ipa_sync_status is not
None">${person.ipa_sync_status}</span>
+ </dd>
+ </py:if>
+ </dl>
+ </div>
+ <h3 py:if="personal">${_('Your Roles')}</h3>
+ <h3 py:if="not personal">${_('%s\'s Roles') %
person.username}</h3>
+ <!--mpm <ul class="roleslist">
+ <li py:for="group in sorted(groups.keys())"><span
class="team approved">${groupdata[group].fedoraGroupDesc}
(${group})</span></li>
+ <li py:for="group in sorted(groupsPending.keys())"><span
class="team unapproved">${groupdata[group].fedoraGroupDesc}
(${group})</span></li>
+ </ul>
+ -->
+ <!--
+ <ul class="actions" py:if="personal">
+ <li><a
href="${tg.url('/group/list/A*')}">${_('(Join another
project)')}</a></li>
+ <li><a href="${tg.url('/')}">${_('(Create a new
project)')}</a></li>
+ </ul>
+ -->
+ <ul id="rolespanel">
+ <py:for each="role in sorted(person['roles'], lambda x,y:
cmp(x.group.name, y.group.name))">
+ <li py:if="auth.can_view_group(viewer, role.group)"
class="role">
+ <h4><a href="${tg.url('/group/view/%s') %
role.group.name}">${role.group.display_name}</a></h4>
(${role.role_type})
+ <dl>
+ <dt>${_('Status:')}</dt>
+ <dd>
+ <span class="approved" py:if="role.role_status ==
'approved'">${_('Approved')}</span>
+ <span class="unapproved" py:if="role.role_status ==
'unapproved'">${_('Unapproved')}</span>
+ </dd>
+ <py:if test="personal">
+ <dt>${_('Tools:')}</dt>
+ <dd>
+ <ul class="tools">
+ <li><a href="${tg.url('/group/view/%s' %
role.group.name)}">${_('View Group')}</a></li>
+ <li py:if="role.role_status == 'approved'">
+ <a href="${tg.url('/group/invite/%s/%s/' % (role.group.name,
locale))}">
+ ${_('Invite a New Member...')}
+ </a>
+ </li>
+ <li
py:if="auth.can_sponsor_group(People.by_username(person['username']),
role.group)"><a href="${tg.url('/group/view/%s' %
role.group.name)}">${_('Manage Group
Membership...')}</a></li>
+ <li
py:if="auth.can_edit_group(People.by_username(person['username']),
role.group)"><a href="${tg.url('/group/edit/%s' %
role.group.name)}">${_('Manage Group Details...')}</a></li>
+ </ul>
+ </dd>
+ <py:if
test="auth.can_sponsor_group(People.by_username(person['username']),
role.group) and role.group.unapproved_roles">
+ <dt>${_('Queue:')}</dt>
+ <dd>
+ <ul class="queue">
+ <li py:for="unapproved_role in
role.group.unapproved_roles[:5]">
+ ${Markup(_('<strong>%(user)s</strong> requests
approval to join
<strong>%(unapproved_role.group)s</strong>.') %
{'user': unapproved_role.member.username, 'unapproved_role.group':
unapproved_role.group.name})}
+ </li>
+ </ul>
+ </dd>
+ </py:if>
+ </py:if>
+ </dl>
+ </li>
+ </py:for>
+ </ul>
+ </body>
+</html>