fix(setup): 🐛 Form non veien inviato

This commit is contained in:
Maicol Battistini 2021-12-13 17:47:10 +01:00
parent 131ea07248
commit 3967a9593e
No known key found for this signature in database
GPG Key ID: 4FDB0F87CDB1D34A
1 changed files with 3 additions and 3 deletions

View File

@ -50,15 +50,14 @@ export default class AdminSetupPage extends Page {
this.loading = $(this.element).find('#login-button mwc-circular-progress');
$(this.element)
.find('#login-button')
.find('#create-account-button')
.on('click', this.onCreateAccountButtonClicked.bind(this));
}
async onCreateAccountButtonClicked() {
this.loading.show();
const formData = getFormData($(this.element)
.find('#login'));
const formData = getFormData($(this.element).find('#new-admin'));
formData._token = $('meta[name="csrf-token"]').attr('content');
@ -70,5 +69,6 @@ export default class AdminSetupPage extends Page {
}
Inertia.visit('/');
showSnackbar(__('Account creato con successo. Puoi ora accedere.'));
}
}