UX: avoid flashing error when loading form template (#28700)

This commit is contained in:
Renato Atilio 2024-09-03 17:41:20 -03:00 committed by GitHub
parent 460b875d03
commit 289249303c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 6 deletions

View File

@ -276,11 +276,7 @@ export default class DEditor extends Component.extend(
@discourseComputed("formTemplateIds", "replyingToTopic", "editingPost") @discourseComputed("formTemplateIds", "replyingToTopic", "editingPost")
showFormTemplateForm(formTemplateIds, replyingToTopic, editingPost) { showFormTemplateForm(formTemplateIds, replyingToTopic, editingPost) {
// TODO(@keegan): Remove !editingPost once we add edit/draft support for form templates // TODO(@keegan): Remove !editingPost once we add edit/draft support for form templates
if (formTemplateIds?.length > 0 && !replyingToTopic && !editingPost) { return formTemplateIds?.length > 0 && !replyingToTopic && !editingPost;
return true;
}
return false;
} }
@discourseComputed("placeholder") @discourseComputed("placeholder")

View File

@ -87,7 +87,7 @@ export default class FormTemplateFieldWrapper extends Component {
/> />
{{/each}} {{/each}}
</div> </div>
{{else}} {{else if this.error}}
<div class="alert alert-error"> <div class="alert alert-error">
{{this.error}} {{this.error}}
</div> </div>