diff --git a/admin/src/components/ContributionLink/ContributionLink.vue b/admin/src/components/ContributionLink/ContributionLink.vue index b21d82b55..a2d171d56 100644 --- a/admin/src/components/ContributionLink/ContributionLink.vue +++ b/admin/src/components/ContributionLink/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/ContributionLink/ContributionLinkForm.spec.js b/admin/src/components/ContributionLink/ContributionLinkForm.spec.js index 92d40c7ad..089ef90ad 100644 --- a/admin/src/components/ContributionLink/ContributionLinkForm.spec.js +++ b/admin/src/components/ContributionLink/ContributionLinkForm.spec.js @@ -9,6 +9,7 @@ global.alert = jest.fn() const propsData = { contributionLinkData: {}, + editContributionLink: false, } const apolloMutateMock = jest.fn().mockResolvedValue() @@ -108,6 +109,7 @@ describe('ContributionLinkForm', () => { cycle: 'ONCE', maxPerCycle: 1, maxAmountPerMonth: '0', + id: null, }, }) }) diff --git a/admin/src/components/ContributionLink/ContributionLinkForm.vue b/admin/src/components/ContributionLink/ContributionLinkForm.vue index c21a7f17c..05f5dac8b 100644 --- a/admin/src/components/ContributionLink/ContributionLinkForm.vue +++ b/admin/src/components/ContributionLink/ContributionLinkForm.vue @@ -102,7 +102,11 @@ -->
- {{ $t('contributionLink.create') }} + + {{ + editContributionLink ? $t('contributionLink.saveChange') : $t('contributionLink.create') + }} + {{ $t('contributionLink.clear') }} @@ -112,6 +116,8 @@