forked from AkkomaGang/admin-fe
Add confirmation message for enabling MRF policies from moderation dropdown
This commit is contained in:
parent
92079893fa
commit
58ba64b87a
3 changed files with 30 additions and 3 deletions
|
@ -274,7 +274,8 @@ export default {
|
||||||
registrationReason: 'Registration Reason',
|
registrationReason: 'Registration Reason',
|
||||||
service: 'Service',
|
service: 'Service',
|
||||||
person: 'Person',
|
person: 'Person',
|
||||||
enableTagPolicy: 'Enable MRF TagPolicy to manage user tags'
|
enableTagPolicy: 'Enable MRF TagPolicy to manage user tags',
|
||||||
|
confirmEnablingTagPolicy: 'Are you sure you want to add TagPolicy to the list of enabled MRF policies?'
|
||||||
},
|
},
|
||||||
statuses: {
|
statuses: {
|
||||||
statuses: 'Statuses',
|
statuses: 'Statuses',
|
||||||
|
|
|
@ -182,7 +182,20 @@ export default {
|
||||||
this.$store.dispatch('DisableMfa', nickname)
|
this.$store.dispatch('DisableMfa', nickname)
|
||||||
},
|
},
|
||||||
enableTagPolicy() {
|
enableTagPolicy() {
|
||||||
this.$store.dispatch('EnableTagPolicy')
|
this.$confirm(
|
||||||
|
this.$t('users.confirmEnablingTagPolicy'),
|
||||||
|
{
|
||||||
|
confirmButtonText: 'Yes',
|
||||||
|
cancelButtonText: 'Cancel',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
this.$store.dispatch('EnableTagPolicy')
|
||||||
|
}).catch(() => {
|
||||||
|
this.$message({
|
||||||
|
type: 'info',
|
||||||
|
message: 'Canceled'
|
||||||
|
})
|
||||||
|
})
|
||||||
},
|
},
|
||||||
getPasswordResetToken(nickname) {
|
getPasswordResetToken(nickname) {
|
||||||
this.$emit('open-reset-token-dialog')
|
this.$emit('open-reset-token-dialog')
|
||||||
|
|
|
@ -258,7 +258,20 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
enableTagPolicy() {
|
enableTagPolicy() {
|
||||||
this.$store.dispatch('EnableTagPolicy')
|
this.$confirm(
|
||||||
|
this.$t('users.confirmEnablingTagPolicy'),
|
||||||
|
{
|
||||||
|
confirmButtonText: 'Yes',
|
||||||
|
cancelButtonText: 'Cancel',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
this.$store.dispatch('EnableTagPolicy')
|
||||||
|
}).catch(() => {
|
||||||
|
this.$message({
|
||||||
|
type: 'info',
|
||||||
|
message: 'Canceled'
|
||||||
|
})
|
||||||
|
})
|
||||||
},
|
},
|
||||||
isLocalUser(user) {
|
isLocalUser(user) {
|
||||||
return user.nickname && user.local
|
return user.nickname && user.local
|
||||||
|
|
Loading…
Reference in a new issue