mirror of
https://github.com/discourse/discourse.git
synced 2025-02-22 04:07:27 +00:00
UX: Don't match emails in user selector in group add members modal.
https://meta.discourse.org/t/cant-add-members-to-a-group/85738?u=tgxworld
This commit is contained in:
parent
70d181bff8
commit
116ddec22e
@ -33,7 +33,8 @@ export default TextField.extend({
|
||||
excludeCurrentUser = bool('excludeCurrentUser'),
|
||||
single = bool('single'),
|
||||
allowAny = bool('allowAny'),
|
||||
disabled = bool('disabled');
|
||||
disabled = bool('disabled'),
|
||||
disallowEmails = bool('disallowEmails');
|
||||
|
||||
function excludedUsernames() {
|
||||
// hack works around some issues with allowAny eventing
|
||||
@ -64,7 +65,8 @@ export default TextField.extend({
|
||||
allowedUsers,
|
||||
includeMentionableGroups,
|
||||
includeMessageableGroups,
|
||||
group: self.get("group")
|
||||
group: self.get("group"),
|
||||
disallowEmails,
|
||||
});
|
||||
|
||||
return results;
|
||||
|
@ -61,7 +61,7 @@ function organizeResults(r, options) {
|
||||
});
|
||||
}
|
||||
|
||||
if (options.term.match(/@/)) {
|
||||
if (!options.disallowEmails && options.term.match(/@/)) {
|
||||
let e = { username: options.term };
|
||||
emails = [ e ];
|
||||
results.push(e);
|
||||
|
@ -9,7 +9,8 @@
|
||||
class="input-xxlarge"
|
||||
usernames=model.usernames
|
||||
placeholderKey="groups.selector_placeholder"
|
||||
id="group-add-members-user-selector"}}
|
||||
id="group-add-members-user-selector"
|
||||
disallowEmails=true}}
|
||||
</div>
|
||||
|
||||
{{#if currentUser.admin}}
|
||||
|
Loading…
x
Reference in New Issue
Block a user