diff --git a/src/components/post_status_form/post_status_form.js b/src/components/post_status_form/post_status_form.js index f764a01be1..58c11fb9df 100644 --- a/src/components/post_status_form/post_status_form.js +++ b/src/components/post_status_form/post_status_form.js @@ -22,12 +22,14 @@ const PostStatusForm = { props: [ 'replyTo', 'repliedUser', - 'attentions' + 'attentions', + 'submitDisabled' ], components: { MediaUpload }, data () { + this.submitDisabled = false let statusText = '' if (this.replyTo) { @@ -58,6 +60,13 @@ const PostStatusForm = { }, addMediaFile (fileInfo) { this.newStatus.files.push(fileInfo) + this.enableSubmit() + }, + disableSubmit () { + this.submitDisabled = true + }, + enableSubmit () { + this.submitDisabled = false } } } diff --git a/src/components/post_status_form/post_status_form.vue b/src/components/post_status_form/post_status_form.vue index 14e353b741..3709a6f6fb 100644 --- a/src/components/post_status_form/post_status_form.vue +++ b/src/components/post_status_form/post_status_form.vue @@ -1,6 +1,6 @@