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.username": user.username,
|
||||||
"model.allowedGroups": this.taskActions.allowedGroups,
|
"model.allowedGroups": this.taskActions.allowedGroups,
|
||||||
});
|
});
|
||||||
this.send("assign");
|
|
||||||
|
return this.assign();
|
||||||
},
|
},
|
||||||
|
|
||||||
@action
|
@action
|
||||||
|
@ -80,7 +81,7 @@ export default Controller.extend({
|
||||||
},
|
},
|
||||||
|
|
||||||
@action
|
@action
|
||||||
updateUsername(selected) {
|
assignUsername(selected) {
|
||||||
this.set("model.username", selected.firstObject);
|
this.assignUser({ username: selected.firstObject });
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
|
@ -3,15 +3,15 @@
|
||||||
{{i18n "discourse_assign.assign_modal.description"}}
|
{{i18n "discourse_assign.assign_modal.description"}}
|
||||||
{{email-group-user-chooser
|
{{email-group-user-chooser
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
autofocus="autofocus"
|
|
||||||
value=model.username
|
value=model.username
|
||||||
onChange=(action "updateUsername")
|
onChange=(action "assignUsername")
|
||||||
options=(hash
|
options=(hash
|
||||||
filterPlaceholder=placeholderKey
|
filterPlaceholder=placeholderKey
|
||||||
includeGroups=false
|
includeGroups=false
|
||||||
groupMembersOf=allowedGroups
|
groupMembersOf=allowedGroups
|
||||||
maximum=1
|
maximum=1
|
||||||
autofocus=autofocus
|
autofocus=autofocus
|
||||||
|
tabindex=1
|
||||||
)
|
)
|
||||||
}}
|
}}
|
||||||
<div class="assign-suggestions">
|
<div class="assign-suggestions">
|
||||||
|
@ -27,7 +27,8 @@
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
{{d-button
|
{{d-button
|
||||||
label="discourse_assign.assign_modal.assign"
|
label="discourse_assign.assign_modal.assign"
|
||||||
icon=inviteIcon action=(action "assign")
|
icon=inviteIcon
|
||||||
|
action=(action "assign")
|
||||||
class="btn-primary"
|
class="btn-primary"
|
||||||
disabled=disabled
|
disabled=disabled
|
||||||
}}
|
}}
|
||||||
|
|
Loading…
Reference in New Issue