FIX: makes user-selector use real booleans (#8909)
This commit is contained in:
parent
567b7263fd
commit
78a0ca53bf
|
@ -5,7 +5,7 @@
|
|||
<label for='last-seen'>{{i18n 'admin.email.last_seen_user'}}</label>
|
||||
{{date-picker-past value=lastSeen id="last-seen"}}
|
||||
<label>{{i18n 'admin.email.user'}}:</label>
|
||||
{{user-selector single="true" usernames=username canReceiveUpdates="true"}}
|
||||
{{user-selector single="true" usernames=username canReceiveUpdates=true}}
|
||||
{{d-button
|
||||
class="btn-primary digest-refresh-button"
|
||||
action=(action "refresh")
|
||||
|
|
|
@ -8,9 +8,13 @@ export default TextField.extend({
|
|||
autocorrect: false,
|
||||
autocapitalize: false,
|
||||
name: "user-selector",
|
||||
canReceiveUpdates: false,
|
||||
single: false,
|
||||
fullWidthWrap: false,
|
||||
|
||||
init() {
|
||||
this._super();
|
||||
this._super(...arguments);
|
||||
|
||||
this._paste = e => {
|
||||
let pastedText = "";
|
||||
if (window.clipboardData && window.clipboardData.getData) {
|
||||
|
@ -28,9 +32,10 @@ export default TextField.extend({
|
|||
};
|
||||
},
|
||||
|
||||
@observes("usernames")
|
||||
_update() {
|
||||
if (this.canReceiveUpdates === "true") {
|
||||
didUpdateAttrs() {
|
||||
this._super(...arguments);
|
||||
|
||||
if (this.canReceiveUpdates) {
|
||||
this._createAutocompleteInstance({ updateData: true });
|
||||
}
|
||||
},
|
||||
|
@ -167,7 +172,8 @@ export default TextField.extend({
|
|||
}
|
||||
});
|
||||
this.set("usernames", usernames.uniq().join(","));
|
||||
if (this.canReceiveUpdates !== "true") {
|
||||
|
||||
if (!this.canReceiveUpdates) {
|
||||
this._createAutocompleteInstance({ updateData: true });
|
||||
}
|
||||
},
|
||||
|
|
|
@ -31,9 +31,9 @@
|
|||
usernames=emailOrUsername
|
||||
placeholderKey=placeholderKey
|
||||
allowEmails=true
|
||||
canReceiveUpdates=(if showContactPicker "true" "false")
|
||||
class="invite-user-input"
|
||||
autocomplete="discourse"}}
|
||||
autocomplete="discourse"
|
||||
}}
|
||||
{{else}}
|
||||
{{text-field
|
||||
class="email-or-username-input"
|
||||
|
|
|
@ -5,11 +5,12 @@
|
|||
<label class="control-label" for="search-posted-by">{{i18n "search.advanced.posted_by.label"}}</label>
|
||||
<div class="controls">
|
||||
{{user-selector
|
||||
excludeCurrentUser=false
|
||||
usernames=searchedTerms.username
|
||||
class="user-selector"
|
||||
single="true"
|
||||
canReceiveUpdates="true"}}
|
||||
excludeCurrentUser=false
|
||||
usernames=searchedTerms.username
|
||||
single=true
|
||||
canReceiveUpdates=true
|
||||
class="user-selector"
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group pull-left">
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
<div class="controls tracking-controls">
|
||||
<label>{{d-icon "far-eye-slash" class="icon"}} {{i18n "user.user_notifications.ignore_duration_username"}}</label>
|
||||
{{user-selector excludeCurrentUser=true
|
||||
single="true"
|
||||
usernames=ignoredUsername
|
||||
class="user-selector"}}
|
||||
single=true
|
||||
class="user-selector"
|
||||
usernames=ignoredUsername}}
|
||||
</div>
|
||||
{{future-date-input
|
||||
label="user.user_notifications.ignore_duration_when"
|
||||
|
|
|
@ -63,10 +63,10 @@
|
|||
{{user-selector
|
||||
excludeCurrentUser=false
|
||||
usernames=filterUsername
|
||||
fullWidthWrap="true"
|
||||
fullWidthWrap=true
|
||||
single=true
|
||||
class="user-selector"
|
||||
single="true"
|
||||
canReceiveUpdates="true"}}
|
||||
canReceiveUpdates=true}}
|
||||
</div>
|
||||
|
||||
{{#if filterTopic}}
|
||||
|
|
Loading…
Reference in New Issue