Add confirm dialog when an account creation is canceled

This commit is contained in:
Bubka 2020-02-05 14:21:46 +01:00
parent 1820dd1ddc
commit 1218105b99
3 changed files with 10 additions and 1 deletions

View File

@ -101,7 +101,8 @@ export default {
"save": "Save"
},
"confirm": {
"delete": "Are you sure you want to delete this account?"
"delete": "Are you sure you want to delete this account?",
"cancel": "The account will be lost. Are you sure?"
}
},
"validation": {

View File

@ -173,6 +173,13 @@
},
cancelCreation: function() {
if( this.form.service && this.form.uri ) {
if( confirm(this.$t('twofaccounts.confirm.cancel')) === false ) {
return
}
}
// clean possible uploaded temp icon
this.deleteIcon()

View File

@ -52,6 +52,7 @@
],
'confirm' => [
'delete' => 'Are you sure you want to delete this account?',
'cancel' => 'The account will be lost. Are you sure?'
],
];