BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
ec784b1e
Commit
ec784b1e
authored
Aug 25, 2017
by
Tim Zallmann
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '36937-fix-invite-by-email-text' into 'master'
Fix invite by email address duplication Closes #36937 See merge request !13826
parents
6c372152
2ad3dcc5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
3 deletions
+9
-3
users_select.js
app/assets/javascripts/users_select.js
+4
-3
36937-fix-invite-by-email-text.yml
changelogs/unreleased/36937-fix-invite-by-email-text.yml
+5
-0
No files found.
app/assets/javascripts/users_select.js
View file @
ec784b1e
...
...
@@ -588,9 +588,10 @@ function UsersSelect(currentUser, els) {
if
(
showEmailUser
&&
data
.
results
.
length
===
0
&&
query
.
term
.
match
(
/^
[^
@
]
+@
[^
@
]
+$/
))
{
var
trimmed
=
query
.
term
.
trim
();
emailUser
=
{
name
:
"Invite
\"
"
+
query
.
term
+
"
\"
"
,
name
:
"Invite
\"
"
+
query
.
term
+
"
\"
by email
"
,
username
:
trimmed
,
id
:
trimmed
id
:
trimmed
,
invite
:
true
};
data
.
results
.
unshift
(
emailUser
);
}
...
...
@@ -642,7 +643,7 @@ UsersSelect.prototype.formatResult = function(user) {
}
else
{
avatar
=
gon
.
default_avatar_url
;
}
return
"<div class='user-result "
+
(
!
user
.
username
?
'no-username'
:
void
0
)
+
"'> <div class='user-image'><img class='avatar avatar-inline s32' src='"
+
avatar
+
"'></div> <div class='user-name dropdown-menu-user-full-name'>"
+
user
.
name
+
"</div> <div class='user-username dropdown-menu-user-username'>"
+
(
"@"
+
user
.
username
||
""
)
+
"</div> </div>"
;
return
"<div class='user-result "
+
(
!
user
.
username
?
'no-username'
:
void
0
)
+
"'> <div class='user-image'><img class='avatar avatar-inline s32' src='"
+
avatar
+
"'></div> <div class='user-name dropdown-menu-user-full-name'>"
+
user
.
name
+
"</div> <div class='user-username dropdown-menu-user-username'>"
+
(
!
user
.
invite
?
"@"
+
_
.
escape
(
user
.
username
)
:
""
)
+
"</div> </div>"
;
};
UsersSelect
.
prototype
.
formatSelection
=
function
(
user
)
{
...
...
changelogs/unreleased/36937-fix-invite-by-email-text.yml
0 → 100644
View file @
ec784b1e
---
title
:
Fix invite by email address duplication
merge_request
:
author
:
type
:
fixed
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment