DEV: Temporarily hide form when editing topic with template (#22099)

This commit is contained in:
Keegan George 2023-06-14 11:16:39 -07:00 committed by GitHub
parent 8b39125985
commit cd6183de93
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions

View File

@ -18,6 +18,7 @@
@popupMenuOptions={{this.popupMenuOptions}}
@formTemplateIds={{this.formTemplateIds}}
@replyingToTopic={{this.composer.replyingToTopic}}
@editingPost={{this.composer.editingPost}}
@disabled={{this.disableTextarea}}
@outletArgs={{hash composer=this.composer editorType="composer"}}
>

View File

@ -247,9 +247,10 @@ export default Component.extend(TextareaTextManipulation, {
this.selectedFormTemplateId = formTemplateId;
},
@discourseComputed("formTemplateIds", "replyingToTopic")
showFormTemplateForm(formTemplateIds, replyingToTopic) {
if (formTemplateIds?.length > 0 && !replyingToTopic) {
@discourseComputed("formTemplateIds", "replyingToTopic", "editingPost")
showFormTemplateForm(formTemplateIds, replyingToTopic, editingPost) {
// TODO(@keegan): Remove !editingPost once we add edit/draft support for form templates
if (formTemplateIds?.length > 0 && !replyingToTopic && !editingPost) {
return true;
}