mirror of
https://github.com/Bubka/2FAuth.git
synced 2025-06-24 05:51:48 +02: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"
|
"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": {
|
||||||
|
@ -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()
|
||||||
|
|
||||||
|
@ -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?'
|
||||||
],
|
],
|
||||||
|
|
||||||
];
|
];
|
Loading…
x
Reference in New Issue
Block a user