Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b61e697a authored by Akhil's avatar Akhil 🙂
Browse files

Disable buttons in first page during API call

parent 9b715d61
Loading
Loading
Loading
Loading
Loading
+11 −2
Original line number Diff line number Diff line
@@ -150,8 +150,14 @@
			<div id="groups" class="aliases-info">
				<button :wide="true"
					class="btn-primary"
					type="primary">
					type="primary"
					:disabled="!processing">
					<template v-if="!processing">
						{{ t(appName,'Create My Account') }}
					</template>
					<template v-else>
						...
					</template>
				</button>
			</div>
		</form>
@@ -199,6 +205,7 @@ export default {
				{ message: t(this.appName, 'Incorrect password length: Required length is 8 to 32'), regex: /.{8,32}/ },
			],
			isUsernameAvailable: false,
			processing: false,
		}
	},
	computed: {
@@ -285,6 +292,7 @@ export default {
			}
		},
		async submitRegistrationForm() {
			this.processing = true
			this.validateForm(['displayname', 'username', 'password', 'repassword', 'termsandservices'])
			await this.checkUsername()
			const isFormValid = Object.values(this.validation).every(value => !value)
@@ -292,6 +300,7 @@ export default {
			if (isFormValid) {
				this.$emit('form-submitted', { isFormValid })
			}
			this.processing = false
		},
		onLanguageChange() {
			window.location.href = window.location.origin + '/apps/' + APPLICATION_NAME + '/accounts/' + this.formData.selectedLanguage + '/signup'