Skip to content

Commit

Permalink
Merge pull request #291 from merefield/master
Browse files Browse the repository at this point in the history
FIX: broken admin chat interface
  • Loading branch information
angusmcleod authored Mar 23, 2020
2 parents d8df91b + 9bd7265 commit aedba3f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
3 changes: 2 additions & 1 deletion assets/javascripts/discourse/controllers/admin-chat.js.es6
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { ajax } from 'discourse/lib/ajax'
import Topic from "discourse/models/topic";

export default Ember.Controller.extend({
adminChats: Ember.inject.controller(),
Expand Down Expand Up @@ -35,7 +36,7 @@ export default Ember.Controller.extend({
topic: topicAttrs
}
}).then(function(saved) {
saved = Discourse.Topic.create(saved)
saved = Topic.create(saved)
if (topic.id) {
var topicIndex = _.map(allTopics, 'id').indexOf(topic.id)
Ember.set(allTopics.objectAt(topicIndex), 'title', saved.title)
Expand Down
6 changes: 5 additions & 1 deletion assets/javascripts/discourse/templates/admin/chat.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@
{{else}}
<div>
<label for="allowed_groups">{{i18n 'babble.admin.allowed_groups_label'}}</label>
{{multi-select allowAny=false content=available values=model.allowed_group_ids}}
{{multi-select
allowAny=false
content=available
value=model.allowed_group_ids
}}
</div>
<div>
<label for="title">{{i18n 'babble.admin.title'}}</label>
Expand Down

0 comments on commit aedba3f

Please sign in to comment.