Skip to content

Commit 64aea37

Browse files
authored
Merge pull request #36 from Fabio101/v2.x
Fix Bootstrap is not defined on 2FA modal
2 parents 62cb12d + d653d9e commit 64aea37

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

stubs/inertia/resources/js/Jetstream/ConfirmsPassword.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
6969
data() {
7070
return {
71-
modal: null,
71+
bootstrap: null,
7272
7373
form: this.$inertia.form({
7474
password: '',
@@ -82,13 +82,13 @@
8282
methods: {
8383
startConfirmingPassword() {
8484
this.form.error = '';
85-
this.modal = new Bootstrap.Modal(document.getElementById('confirmingPasswordModal'))
85+
this.bootstrap = $('#confirmingPasswordModal');
8686
8787
axios.get(route('password.confirmation')).then(response => {
8888
if (response.data.confirmed) {
8989
this.$emit('confirmed');
9090
} else {
91-
this.modal.show()
91+
this.bootstrap.modal('toggle');
9292
this.form.password = '';
9393
9494
setTimeout(() => {
@@ -104,7 +104,7 @@
104104
axios.post(route('password.confirm'), {
105105
password: this.form.password,
106106
}).then(response => {
107-
this.modal.hide()
107+
this.bootstrap.modal('hide');
108108
this.form.password = '';
109109
this.form.error = '';
110110
this.form.processing = false;

0 commit comments

Comments
 (0)