From 826ac2ba15f52c92cd6d26311aef31e34c3215a6 Mon Sep 17 00:00:00 2001 From: ogerly Date: Sun, 30 Oct 2022 14:42:05 +0100 Subject: [PATCH] add updateContributionLink on submit form createContributioForm --- admin/src/components/ContributionLink.vue | 3 ++ admin/src/components/ContributionLinkForm.vue | 45 +++++++++++++------ 2 files changed, 34 insertions(+), 14 deletions(-) diff --git a/admin/src/components/ContributionLink.vue b/admin/src/components/ContributionLink.vue index 5621e4330..0ae9c76b2 100644 --- a/admin/src/components/ContributionLink.vue +++ b/admin/src/components/ContributionLink.vue @@ -17,6 +17,7 @@

{{ $t('contributionLink.contributionLinks') }}

@@ -58,12 +59,14 @@ export default { return { visible: false, contributionLinkData: {}, + editContributionLink: false, } }, methods: { editContributionLinkData(data) { if (!this.visible) this.$root.$emit('bv::toggle::collapse', 'newContribution') this.contributionLinkData = data + this.editContributionLink = true }, }, } diff --git a/admin/src/components/ContributionLinkForm.vue b/admin/src/components/ContributionLinkForm.vue index c21a7f17c..72365dc51 100644 --- a/admin/src/components/ContributionLinkForm.vue +++ b/admin/src/components/ContributionLinkForm.vue @@ -102,7 +102,11 @@ -->
- {{ $t('contributionLink.create') }} + + {{ + editContributionLink ? $t('contributionLink.saveChange') : $t('contributionLink.create') + }} + {{ $t('contributionLink.clear') }} @@ -112,6 +116,8 @@