mirror of
https://github.com/discourse/discourse.git
synced 2024-11-28 13:43:44 +08:00
e300945879
FIX: clear the user-selector when adding new members
21 lines
497 B
JavaScript
21 lines
497 B
JavaScript
export default Discourse.Route.extend({
|
|
|
|
model: function(params) {
|
|
var groups = this.modelFor('adminGroupsType'),
|
|
group = groups.findProperty('name', params.name);
|
|
|
|
if (!group) { return this.transitionTo('adminGroups.index'); }
|
|
|
|
return group;
|
|
},
|
|
|
|
setupController: function(controller, model) {
|
|
controller.set("model", model);
|
|
// clear the user selector
|
|
controller.set("usernames", null);
|
|
// load the members of the group
|
|
model.findMembers();
|
|
}
|
|
|
|
});
|