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

Commit b36e01c7 authored by theronakpatel's avatar theronakpatel
Browse files

Recovery email is mandatory and later is hidden

parent 5668753a
Loading
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -11,10 +11,11 @@
				<div class="control">
					<label>{{ t(appName,'Recovery Email') }}</label>
					<input id="email"
						v-model="formData.email"
						v-model.trim="formData.email"
						name="email"
						type="email"
						class="form-input"
						required
						:placeholder="t(appName,'Use an alternative email')"
						@input="validateForm(['email'])">
					<p v-if="validation.isEmailEmpty" class="validation-warning">
@@ -39,7 +40,8 @@
				@click.prevent="submitRecoveryEmailForm(true)">
				{{ t(appName,'Set My Recovery Email Now') }}
			</button>
			<button :wide="true"
			<button v-if="false"
				:wide="true"
				class="btn-default w-50 mx-10"
				type="primary"
				:disabled="processingCreation"
@@ -78,7 +80,8 @@ export default {
	methods: {
		validateForm(fieldsToValidate) {
			fieldsToValidate.forEach(field => {
				this.validation[`is${field.charAt(0).toUpperCase() + field.slice(1)}Empty`] = this.formData[field] === ''
				const value = (this.formData[field] ?? '').toString().trim()
				this.validation[`is${field.charAt(0).toUpperCase() + field.slice(1)}Empty`] = value.length === 0
			})
		},
		submitRecoveryEmailForm(setrecoveryemail) {