diff --git a/contentcuration/contentcuration/frontend/accounts/pages/Create.vue b/contentcuration/contentcuration/frontend/accounts/pages/Create.vue index e4e28d6d08..d6badbba25 100644 --- a/contentcuration/contentcuration/frontend/accounts/pages/Create.vue +++ b/contentcuration/contentcuration/frontend/accounts/pages/Create.vue @@ -227,6 +227,7 @@ }, data() { return { + submitting: false, valid: true, registrationFailed: false, form: { @@ -448,6 +449,10 @@ return id === uses.OTHER && this.form.uses.includes(id); }, submit() { + if (this.submitting) { + return; + } + this.submitting = true; // We need to check the "acceptedAgreement" here explicitly because it is not a // Vuetify form field and does not trigger the form validation. if (this.$refs.form.validate() && this.acceptedAgreement) { @@ -486,10 +491,12 @@ this.registrationFailed = true; this.valid = false; } + this.submitting = false; }); } else if (this.$refs.top.scrollIntoView) { this.$refs.top.scrollIntoView({ behavior: 'smooth' }); } + this.submitting = false; return Promise.resolve(); }, resetErrors(field) {