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" "save": "Save"
}, },
"confirm": { "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": { "validation": {

View File

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

View File

@ -52,6 +52,7 @@ return [
], ],
'confirm' => [ '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?'
], ],
]; ];