forked from jan/debianmemberportfolio
Add username for and link to the Salsa service
Salsa will be gradually replacing the Alioth service.
This commit is contained in:
parent
c13b49b3ce
commit
a627c20031
7 changed files with 25 additions and 4 deletions
|
@ -56,6 +56,9 @@ class DeveloperData(FlaskForm):
|
|||
])
|
||||
username = StringField('username', validators=[Optional(), PlainText()])
|
||||
nonddemail = StringField('nonddemail', validators=[Optional(), Email()])
|
||||
salsausername = StringField('salsausername', validators=[
|
||||
Optional(), PlainText()
|
||||
])
|
||||
aliothusername = StringField('aliothusername', validators=[
|
||||
Optional(), PlainText()
|
||||
])
|
||||
|
|
|
@ -78,6 +78,8 @@ db.pattern=https://db.debian.org/search.cgi?uid=%(username)s&dosearch=Search
|
|||
db.optional=true
|
||||
webid.pattern=http://webid.debian.net/maintainers/%(username)s
|
||||
webid.optional=true
|
||||
salsa.pattern=https://salsa.debian.org/%(salsausername)s
|
||||
salsa.optional=true
|
||||
alioth.pattern=https://alioth.debian.org/users/%(aliothusername)s/
|
||||
alioth.optional=true
|
||||
wiki.pattern=https://wiki.debian.org/%(wikihomepage)s
|
||||
|
|
|
@ -45,6 +45,7 @@ _FIELDNAMES_MAP = {
|
|||
'gpgfp': N_('GPG fingerprint'),
|
||||
'username': N_('Debian user name'),
|
||||
'nonddemail': N_('Non Debian email address'),
|
||||
'salsausername': N_('Salsa user name'),
|
||||
'aliothusername': N_('Alioth user name'),
|
||||
}
|
||||
|
||||
|
|
|
@ -67,6 +67,13 @@ with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||
</label><br />
|
||||
{{ form.nonddemail }}
|
||||
</div>
|
||||
<div id="salsausernamefield"{% if form.salsausername.errors %} class="witherrors"{% endif %}>
|
||||
<label for="salsausername">{{ _('Salsa user name:') }}{% if form.salsausername.errors %}<br />
|
||||
<span class="errormsg">{{ form.salsausername.errors|join(', ') }}</span>
|
||||
{% endif %}
|
||||
</label><br />
|
||||
{{ form.salsausername }}
|
||||
</div>
|
||||
<div id="aliothusernamefield"{% if form.aliothusername.errors %} class="witherrors"{% endif %}>
|
||||
<label for="aliothusername">{{ _('Alioth user name:') }}{% if form.aliothusername.errors %}<br />
|
||||
<span class="errormsg">{{ form.aliothusername.errors|join(', ') }}</span>
|
||||
|
|
|
@ -19,13 +19,13 @@ with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||
#}
|
||||
var defaulthiddendivs = new Array(
|
||||
'#namefield', '#gpgfpfield', '#usernamefield', '#nonddemailfield',
|
||||
'#aliothusernamefield', '#wikihomepagefield', '#forumsidfield');
|
||||
'#salsausernamefield', '#aliothusernamefield', '#wikihomepagefield', '#forumsidfield');
|
||||
var maskedfielddivs = new Array(
|
||||
'#namefield', '#gpgfpfield', '#usernamefield', '#nonddemailfield',
|
||||
'#aliothusernamefield', '#wikihomepagefield', '#forumsidfield');
|
||||
'#salsausernamefield', '#aliothusernamefield', '#wikihomepagefield', '#forumsidfield');
|
||||
var allfielddivs = new Array(
|
||||
'#namefield', '#gpgfpfield', '#usernamefield', '#nonddemailfield',
|
||||
'#aliothusernamefield', '#wikihomepagefield', '#forumsidfield');
|
||||
'#salsausernamefield', '#aliothusernamefield', '#wikihomepagefield', '#forumsidfield');
|
||||
|
||||
function updateFields(data, textStatus) {
|
||||
if (data.type == 2) { // DD
|
||||
|
@ -34,6 +34,7 @@ function updateFields(data, textStatus) {
|
|||
$('#username').prop('value', data.username).prop(
|
||||
'readonly', 'readonly');
|
||||
$('#nonddemail').prop('value', data.email).focus();
|
||||
$('#salsausername').prop('value', data.username);
|
||||
$('#aliothusername').prop('value', data.username);
|
||||
$('#wikihomepage').prop('value', data.wikihomepage);
|
||||
|
||||
|
@ -41,6 +42,7 @@ function updateFields(data, textStatus) {
|
|||
$('#gpgfpfield').show();
|
||||
$('#usernamefield').show();
|
||||
$('#nonddemailfield').show();
|
||||
$('#salsausernamefield').show();
|
||||
$('#aliothusernamefield').show();
|
||||
$('#wikihomepagefield').show();
|
||||
$('#forumsidfield').show();
|
||||
|
@ -57,11 +59,12 @@ function updateFields(data, textStatus) {
|
|||
$('#gpgfpfield').show();
|
||||
$('#usernamefield').hide();
|
||||
$('#nonddemailfield').hide();
|
||||
$('#salsausernamefield').show();
|
||||
$('#aliothusernamefield').show();
|
||||
$('#wikihomepagefield').show();
|
||||
$('#forumsidfield').show();
|
||||
|
||||
$('#aliothusername').focus().select();
|
||||
$('#salsausername').focus().select();
|
||||
} else {
|
||||
$('#nonddemail').prop('value', data.email);
|
||||
$('#name').removeAttr('readonly');
|
||||
|
@ -72,6 +75,7 @@ function updateFields(data, textStatus) {
|
|||
$('#gpgfpfield').hide();
|
||||
$('#nonddemailfield').hide();
|
||||
$('#namefield').show();
|
||||
$('#salsausernamefield').show();
|
||||
$('#aliothusernamefield').show();
|
||||
$('#wikihomepagefield').show();
|
||||
$('#forumsidfield').show();
|
||||
|
|
|
@ -89,6 +89,7 @@ developer name on all bug logs)'),
|
|||
'dbfinger': N_('DB information via finger'),
|
||||
'db': N_('DB information via HTTP'),
|
||||
'webid': N_('FOAF profile'),
|
||||
'salsa': N_('Salsa'),
|
||||
'alioth': N_('Alioth'),
|
||||
'wiki': N_('Wiki'),
|
||||
'forum': N_('Forum'),
|
||||
|
@ -126,6 +127,7 @@ DM_TUPLES = (('name', 'name'),
|
|||
|
||||
#: list of field name tuples for Debian Developers
|
||||
DD_TUPLES = (('username', 'username'),
|
||||
('salsausername', 'username'),
|
||||
('aliothusername', 'username'))
|
||||
|
||||
|
||||
|
|
|
@ -132,6 +132,7 @@ that are filled at runtime:
|
|||
================== ========================================
|
||||
Placeholder Replacement
|
||||
================== ========================================
|
||||
%(salsausername)s user name on `salsa.debian.org`_
|
||||
%(aliothusername)s user name on `alioth.debian.org`_
|
||||
%(email)s email address (URL encoded)
|
||||
%(emailnoq)s email address
|
||||
|
@ -143,6 +144,7 @@ Placeholder Replacement
|
|||
%(wikihomepage)s full name in camel case (i.e. JohnSmith)
|
||||
================== ========================================
|
||||
|
||||
.. _salsa.debian.org: https://salsa.debian.org/
|
||||
.. _alioth.debian.org: https://alioth.debian.org/
|
||||
|
||||
The replacement of placeholders is performed in the
|
||||
|
|
Loading…
Reference in a new issue