FIX: should not disable topic inputs while creating new topic.
31577b2131
This commit is contained in:
parent
726bf37a12
commit
0dcb4bef20
|
@ -187,8 +187,15 @@ export default Controller.extend({
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
||||||
disableCategoryChooser: Ember.computed.not("model.topic.details.can_edit"),
|
@computed("model.editingPost", "model.topic.details.can_edit")
|
||||||
disableTagsChooser: Ember.computed.not("model.topic.canEditTags"),
|
disableCategoryChooser(editingPost, canEditTopic) {
|
||||||
|
return editingPost && !canEditTopic;
|
||||||
|
},
|
||||||
|
|
||||||
|
@computed("model.editingPost", "model.topic.canEditTags")
|
||||||
|
disableTagsChooser(editingPost, canEditTags) {
|
||||||
|
return editingPost && !canEditTags;
|
||||||
|
},
|
||||||
|
|
||||||
isStaffUser: Ember.computed.reads("currentUser.staff"),
|
isStaffUser: Ember.computed.reads("currentUser.staff"),
|
||||||
|
|
||||||
|
|
|
@ -141,7 +141,11 @@ const Composer = RestModel.extend({
|
||||||
creatingPrivateMessage: Ember.computed.equal("action", PRIVATE_MESSAGE),
|
creatingPrivateMessage: Ember.computed.equal("action", PRIVATE_MESSAGE),
|
||||||
notCreatingPrivateMessage: Ember.computed.not("creatingPrivateMessage"),
|
notCreatingPrivateMessage: Ember.computed.not("creatingPrivateMessage"),
|
||||||
notPrivateMessage: Ember.computed.not("privateMessage"),
|
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")
|
@computed("privateMessage", "archetype.hasOptions")
|
||||||
showCategoryChooser(isPrivateMessage, hasOptions) {
|
showCategoryChooser(isPrivateMessage, hasOptions) {
|
||||||
|
|
Loading…
Reference in New Issue