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

Commit 297ae613 authored by Ronak Patel's avatar Ronak Patel
Browse files

reverted

parent 55ed30cd
Loading
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -71,10 +71,9 @@ class AccountController extends Controller {
	 * @NoCSRFRequired
	 *
	 * @param string $lang Language code (default: 'en')
	 * @param string $recoveryEmail recoveryemail (default: '')
	 *
	 */
	public function index(string $lang = 'en', string $recoveryEmail = '') {
	public function index(string $lang = 'en') {
		if ($this->userSession->isLoggedIn()) {
			return new RedirectResponse($this->urlGenerator->linkToDefaultPageUrl());
		}
@@ -84,7 +83,7 @@ class AccountController extends Controller {
		return new TemplateResponse(
			Application::APP_ID,
			'signup',
			['appName' => Application::APP_ID, 'lang' => $lang, 'recoveryEmail' => $recoveryEmail],
			['appName' => Application::APP_ID, 'lang' => $lang],
			TemplateResponse::RENDER_AS_GUEST
		);
	}
+9 −13
Original line number Diff line number Diff line
@@ -2,13 +2,6 @@
	<div>
		<section id="main" class="register-page">
			<div id="registration">
				<p v-if="recoveryEmail">
					Recovery Email: {{ recoveryEmail }}
				</p>
				<p v-else>
					No recovery email provided.
				</p>

				<RegistrationForm v-if="showRegistrationForm" v-model="formData" @form-submitted="submitRegistrationForm" />
				<CaptchaForm v-if="showCaptchaForm" v-model="formData" @form-submitted="submitCaptchaForm" />
				<RecoveryEmailForm v-if="showRecoveryEmailForm" v-model="formData" @form-submitted="submitRecoveryEmailForm" />
@@ -37,12 +30,6 @@ export default {
		RecoveryEmailForm,
		SuccessSection,
	},
	props: {
		recoveryEmail: {
			type: String,
			default: '',
		},
	},
	data() {
		return {
			formData: {
@@ -62,8 +49,17 @@ export default {
			showCaptchaForm: false,
			showRecoveryEmailForm: false,
			showSuccessSection: false,
			recoveryEmail: '',
		}
	},
	mounted() {
		// Extracting the recovery email from the URL when the component is mounted
		const urlParams = new URLSearchParams(window.location.search)
		this.recoveryEmail = urlParams.get('recoveryEmail')

		// Set formData.email directly to recoveryEmail
		this.formData.email = this.recoveryEmail
	},
	methods: {
		submitRegistrationForm(data) {
			if (data.isFormValid) {
+1 −8
Original line number Diff line number Diff line
@@ -2,14 +2,7 @@ import Vue from 'vue'
import './common.js'
import Signup from './Signup.vue'

const urlParams = new URLSearchParams(window.location.search)
const recoveryEmail = urlParams.get('recoveryEmail') ?? ''

export default new Vue({
	el: '#ecloud-accounts-signup',
	render: h => h(Signup, {
		props: {
		  recoveryEmail,
		},
	  }),
	render: h => h(Signup),
})