add non DD email field

- add field in form
- use field for NM page URL
- change spelling from E-Mail to Email
This commit is contained in:
Jan Dittberner 2009-01-22 21:45:04 +01:00
parent 67a945dd49
commit 33d1037de5
4 changed files with 16 additions and 4 deletions

View file

@ -67,7 +67,7 @@ alioth.pattern=http://alioth.debian.org/~%(aliothusername)s/
[membership]
urls=nm,db,alioth
nm.pattern=https://nm.debian.org/nmstatus.php?email=%(email)s
nm.pattern=https://nm.debian.org/nmstatus.php?email=%(nonddemail)s
db.pattern=http://db.debian.org/search.cgi?uid=%(username)s&dosearch=Search
alioth.pattern=http://alioth.debian.org/users/%(aliothusername)s/

View file

@ -32,5 +32,6 @@ class DeveloperData(formencode.Schema):
formencode.validators.MinLength(32),
formencode.validators.MaxLength(32))
username = formencode.validators.PlainText()
nonddemail = formencode.validators.Email()
aliothusername = formencode.validators.PlainText()
mode = formencode.validators.OneOf([u'json', u'html'], not_empty=True)

View file

@ -37,10 +37,11 @@ my_config = ConfigParser()
my_config.readfp(pkg_resources.resource_stream(__name__, 'ddportfolio.ini'))
_FIELDNAMES_MAP = {
'email' : N_('E-Mail address'),
'email' : N_('Email address'),
'name' : N_('Name'),
'gpgfp' : N_('GPG fingerprint'),
'username' : N_('Debian user name'),
'nonddemail' : N_('Non DD email address'),
'aliothusername' : N_('Alioth user name'),
}
@ -69,6 +70,6 @@ def build_urls(fields):
False, qfields)])
except InterpolationMissingOptionError, e:
data.append(['error', section, url,
_('Missing field %s') % \
_('Missing input: %s') % \
_(_FIELDNAMES_MAP[e.reference])])
return data