FIX: explicit assign on user selection (#184)
Also drops autofocus as it's the first item in the form
This commit is contained in:
parent
39fa568593
commit
92a1167a68
|
@ -46,7 +46,8 @@ export default Controller.extend({
|
|||
"model.username": user.username,
|
||||
"model.allowedGroups": this.taskActions.allowedGroups,
|
||||
});
|
||||
this.send("assign");
|
||||
|
||||
return this.assign();
|
||||
},
|
||||
|
||||
@action
|
||||
|
@ -80,7 +81,7 @@ export default Controller.extend({
|
|||
},
|
||||
|
||||
@action
|
||||
updateUsername(selected) {
|
||||
this.set("model.username", selected.firstObject);
|
||||
assignUsername(selected) {
|
||||
this.assignUser({ username: selected.firstObject });
|
||||
},
|
||||
});
|
||||
|
|
|
@ -3,15 +3,15 @@
|
|||
{{i18n "discourse_assign.assign_modal.description"}}
|
||||
{{email-group-user-chooser
|
||||
autocomplete="off"
|
||||
autofocus="autofocus"
|
||||
value=model.username
|
||||
onChange=(action "updateUsername")
|
||||
onChange=(action "assignUsername")
|
||||
options=(hash
|
||||
filterPlaceholder=placeholderKey
|
||||
includeGroups=false
|
||||
groupMembersOf=allowedGroups
|
||||
maximum=1
|
||||
autofocus=autofocus
|
||||
tabindex=1
|
||||
)
|
||||
}}
|
||||
<div class="assign-suggestions">
|
||||
|
@ -27,7 +27,8 @@
|
|||
<div class="modal-footer">
|
||||
{{d-button
|
||||
label="discourse_assign.assign_modal.assign"
|
||||
icon=inviteIcon action=(action "assign")
|
||||
icon=inviteIcon
|
||||
action=(action "assign")
|
||||
class="btn-primary"
|
||||
disabled=disabled
|
||||
}}
|
||||
|
|
Loading…
Reference in New Issue