allow to cancel editing link

This commit is contained in:
Alina Beck 2019-07-10 12:57:43 +02:00
parent d200b822db
commit 22c673f47e

View File

@ -54,6 +54,9 @@
<ds-button primary :disabled="disabled"> <ds-button primary :disabled="disabled">
{{ editingLink === '' ? $t('settings.social-media.submit') : $t('actions.save') }} {{ editingLink === '' ? $t('settings.social-media.submit') : $t('actions.save') }}
</ds-button> </ds-button>
<ds-button v-if="editingLink !== ''" ghost @click="handleCancel()">
{{ $t('actions.cancel') }}
</ds-button>
</ds-space> </ds-space>
</ds-space> </ds-space>
</ds-card> </ds-card>
@ -99,6 +102,11 @@ export default {
...mapMutations({ ...mapMutations({
setCurrentUser: 'auth/SET_USER', setCurrentUser: 'auth/SET_USER',
}), }),
handleCancel() {
this.editingLink = ''
this.formData.socialMediaLink = ''
this.disabled = true
},
async handleInput(data) { async handleInput(data) {
this.disabled = true this.disabled = true
}, },