mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06: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'),
|
excludeCurrentUser = bool('excludeCurrentUser'),
|
||||||
single = bool('single'),
|
single = bool('single'),
|
||||||
allowAny = bool('allowAny'),
|
allowAny = bool('allowAny'),
|
||||||
disabled = bool('disabled');
|
disabled = bool('disabled'),
|
||||||
|
disallowEmails = bool('disallowEmails');
|
||||||
|
|
||||||
function excludedUsernames() {
|
function excludedUsernames() {
|
||||||
// hack works around some issues with allowAny eventing
|
// hack works around some issues with allowAny eventing
|
||||||
@ -64,7 +65,8 @@ export default TextField.extend({
|
|||||||
allowedUsers,
|
allowedUsers,
|
||||||
includeMentionableGroups,
|
includeMentionableGroups,
|
||||||
includeMessageableGroups,
|
includeMessageableGroups,
|
||||||
group: self.get("group")
|
group: self.get("group"),
|
||||||
|
disallowEmails,
|
||||||
});
|
});
|
||||||
|
|
||||||
return results;
|
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 };
|
let e = { username: options.term };
|
||||||
emails = [ e ];
|
emails = [ e ];
|
||||||
results.push(e);
|
results.push(e);
|
||||||
|
@ -9,7 +9,8 @@
|
|||||||
class="input-xxlarge"
|
class="input-xxlarge"
|
||||||
usernames=model.usernames
|
usernames=model.usernames
|
||||||
placeholderKey="groups.selector_placeholder"
|
placeholderKey="groups.selector_placeholder"
|
||||||
id="group-add-members-user-selector"}}
|
id="group-add-members-user-selector"
|
||||||
|
disallowEmails=true}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{#if currentUser.admin}}
|
{{#if currentUser.admin}}
|
||||||
|
Loading…
Reference in New Issue
Block a user