Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/polls.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordartcafe <github@dartcafe.de>2020-12-14 00:31:38 +0300
committerdartcafe <github@dartcafe.de>2020-12-14 00:31:38 +0300
commit2151559ea89aed11cd44be208da48cacea2bc585 (patch)
tree52b63cb4c27a0ab15288fec9e2377f935acabb38 /src/js/views/Administration.vue
parent91e25ca155db3cd1cb0f0066ac233c30f3fea6be (diff)
Add notifications to original poll owner
Diffstat (limited to 'src/js/views/Administration.vue')
-rw-r--r--src/js/views/Administration.vue12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/js/views/Administration.vue b/src/js/views/Administration.vue
index 0bdd484a..722a26e8 100644
--- a/src/js/views/Administration.vue
+++ b/src/js/views/Administration.vue
@@ -72,6 +72,7 @@
<Modal v-if="takeOverModal" @close="takeOverModal = false">
<div class="modal__content">
<h2>{{ t('polls', 'Do you want to take over this poll from {username} and change the ownership?', {username: takeOverOwner}) }}</h2>
+ <div>{{ t('polls', 'The original owner will be notified.') }}</div>
<div class="modal__buttons">
<ButtonDiv :title="t('polls', 'No')"
@click="takeOverModal = false" />
@@ -84,11 +85,12 @@
<div class="modal__content">
<h2>{{ t('polls', 'Do you want to delete this poll?') }}</h2>
<div>{{ t('polls', 'This action cannot be reverted.') }}</div>
+ <div>{{ t('polls', 'The original owner will be notified.') }}</div>
<div class="modal__buttons">
<ButtonDiv :title="t('polls', 'No')"
@click="deleteModal = false" />
<ButtonDiv :primary="true" :title="t('polls', 'Yes')"
- @click="takeOver()" />
+ @click="deletePermanently()" />
</div>
</div>
</Modal>
@@ -194,14 +196,16 @@ export default {
})
},
- deletePermanently(pollId) {
+ deletePermanently() {
this.$store
- .dispatch('poll/delete', { pollId: pollId })
+ .dispatch('poll/delete', { pollId: this.deletePollId })
.then(() => {
emit('update-polls')
+ this.deleteModal = false
})
.catch(() => {
showError(t('polls', 'Error deleting poll.'))
+ this.deleteModal = false
})
},
@@ -210,9 +214,11 @@ export default {
.dispatch('pollsAdmin/takeOver', { pollId: this.takeOverPollId })
.then(() => {
emit('update-polls')
+ this.takeOverModal = false
})
.catch(() => {
showError(t('polls', 'Error overtaking poll.'))
+ this.takeOverModal = false
})
},