FIX: should not disable topic inputs while creating new topic.

31577b2131
This commit is contained in:
Vinoth Kannan 2019-10-24 01:04:37 +05:30
parent 726bf37a12
commit 0dcb4bef20
2 changed files with 14 additions and 3 deletions

View File

@ -187,8 +187,15 @@ export default Controller.extend({
);
},
disableCategoryChooser: Ember.computed.not("model.topic.details.can_edit"),
disableTagsChooser: Ember.computed.not("model.topic.canEditTags"),
@computed("model.editingPost", "model.topic.details.can_edit")
disableCategoryChooser(editingPost, canEditTopic) {
return editingPost && !canEditTopic;
},
@computed("model.editingPost", "model.topic.canEditTags")
disableTagsChooser(editingPost, canEditTags) {
return editingPost && !canEditTags;
},
isStaffUser: Ember.computed.reads("currentUser.staff"),

View File

@ -141,7 +141,11 @@ const Composer = RestModel.extend({
creatingPrivateMessage: Ember.computed.equal("action", PRIVATE_MESSAGE),
notCreatingPrivateMessage: Ember.computed.not("creatingPrivateMessage"),
notPrivateMessage: Ember.computed.not("privateMessage"),
disableTitleInput: Ember.computed.not("topic.details.can_edit"),
@computed("editingPost", "topic.details.can_edit")
disableTitleInput(editingPost, canEditTopic) {
return editingPost && !canEditTopic;
},
@computed("privateMessage", "archetype.hasOptions")
showCategoryChooser(isPrivateMessage, hasOptions) {