mirror of
https://github.com/Bubka/2FAuth.git
synced 2025-01-23 06:38:34 +01:00
Add confirm dialog when an account creation is canceled
This commit is contained in:
parent
1820dd1ddc
commit
1218105b99
3
resources/js/langs/locales.js
vendored
3
resources/js/langs/locales.js
vendored
@ -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": {
|
||||
|
@ -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()
|
||||
|
||||
|
@ -52,6 +52,7 @@
|
||||
],
|
||||
'confirm' => [
|
||||
'delete' => 'Are you sure you want to delete this account?',
|
||||
'cancel' => 'The account will be lost. Are you sure?'
|
||||
],
|
||||
|
||||
];
|
Loading…
Reference in New Issue
Block a user