Skip to content

Commit

Permalink
Merge pull request #36 from Fabio101/v2.x
Browse files Browse the repository at this point in the history
Fix Bootstrap is not defined on 2FA modal
  • Loading branch information
tsommie authored Mar 29, 2021
2 parents 62cb12d + d653d9e commit 64aea37
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions stubs/inertia/resources/js/Jetstream/ConfirmsPassword.vue
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
data() {
return {
modal: null,
bootstrap: null,
form: this.$inertia.form({
password: '',
Expand All @@ -82,13 +82,13 @@
methods: {
startConfirmingPassword() {
this.form.error = '';
this.modal = new Bootstrap.Modal(document.getElementById('confirmingPasswordModal'))
this.bootstrap = $('#confirmingPasswordModal');
axios.get(route('password.confirmation')).then(response => {
if (response.data.confirmed) {
this.$emit('confirmed');
} else {
this.modal.show()
this.bootstrap.modal('toggle');
this.form.password = '';
setTimeout(() => {
Expand All @@ -104,7 +104,7 @@
axios.post(route('password.confirm'), {
password: this.form.password,
}).then(response => {
this.modal.hide()
this.bootstrap.modal('hide');
this.form.password = '';
this.form.error = '';
this.form.processing = false;
Expand Down

0 comments on commit 64aea37

Please sign in to comment.