From 3627e3fde536e80898018dbba47272ed82ddf05d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Ferrer=20Oca=C3=B1a?= Date: Thu, 21 Apr 2022 14:00:27 +0200 Subject: [PATCH 1/2] MOBILE-3833 signup: Fix min date on datetime user profile --- .../userprofilefield/datetime/component/datetime.ts | 2 +- .../features/login/pages/email-signup/email-signup.ts | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/addons/userprofilefield/datetime/component/datetime.ts b/src/addons/userprofilefield/datetime/component/datetime.ts index d494cf549..c26355ce0 100644 --- a/src/addons/userprofilefield/datetime/component/datetime.ts +++ b/src/addons/userprofilefield/datetime/component/datetime.ts @@ -75,7 +75,7 @@ export class AddonUserProfileFieldDatetimeComponent extends CoreUserProfileField this.max = field.param2; } - this.max = this.max || CoreTimeUtils.getDatetimeDefaultMin(); + this.min = this.min || CoreTimeUtils.getDatetimeDefaultMin(); this.max = this.max || CoreTimeUtils.getDatetimeDefaultMax(); } diff --git a/src/core/features/login/pages/email-signup/email-signup.ts b/src/core/features/login/pages/email-signup/email-signup.ts index 8f130cd45..8aa65028e 100644 --- a/src/core/features/login/pages/email-signup/email-signup.ts +++ b/src/core/features/login/pages/email-signup/email-signup.ts @@ -55,7 +55,7 @@ export class CoreLoginEmailSignupPage implements OnInit { siteUrl!: string; siteConfig?: CoreSitePublicConfigResponse; siteName?: string; - authInstructions?: string; + authInstructions = ''; settings?: AuthEmailSignupSettings; countries?: CoreCountry[]; categories?: AuthEmailSignupProfileFieldsCategory[]; @@ -377,7 +377,7 @@ export class CoreLoginEmailSignupPage implements OnInit { * Show authentication instructions. */ showAuthInstructions(): void { - CoreTextUtils.viewText(Translate.instant('core.login.instructions'), this.authInstructions!); + CoreTextUtils.viewText(Translate.instant('core.login.instructions'), this.authInstructions); } /** @@ -419,7 +419,7 @@ export class CoreLoginEmailSignupPage implements OnInit { if (!result.status) { if (this.countryControl.value) { - this.signUpCountryControl!.setValue(this.countryControl.value); + this.signUpCountryControl?.setValue(this.countryControl.value); } // Not a minor, go ahead. @@ -428,7 +428,7 @@ export class CoreLoginEmailSignupPage implements OnInit { // Is a minor. this.isMinor = true; } - } catch (error) { + } catch { // Something wrong, redirect to the site. CoreDomUtils.showErrorModal('There was an error verifying your age, please try again using the browser.'); } finally { From e502c7339250758922b0517f2f62302407e20bee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Ferrer=20Oca=C3=B1a?= Date: Thu, 21 Apr 2022 15:16:24 +0200 Subject: [PATCH 2/2] MOBILE-3833 signup: Add a wrapper container and remove refresher --- .../pages/email-signup/email-signup.html | 346 +++++++++--------- .../login/pages/email-signup/email-signup.ts | 12 - 2 files changed, 172 insertions(+), 186 deletions(-) diff --git a/src/core/features/login/pages/email-signup/email-signup.html b/src/core/features/login/pages/email-signup/email-signup.html index 1308598e1..6037c7519 100644 --- a/src/core/features/login/pages/email-signup/email-signup.html +++ b/src/core/features/login/pages/email-signup/email-signup.html @@ -17,12 +17,8 @@ - - - -
- - + +
@@ -36,195 +32,197 @@ - -
+ + + - - -

{{ 'core.agelocationverification' | translate }}

-
-
+ + +

{{ 'core.agelocationverification' | translate }}

+
+
- - - {{ 'core.whatisyourage' | translate }} - - - - - - - - {{ 'core.wheredoyoulive' | translate }} - - - {{ 'core.login.selectacountry' | translate }} - {{country.name}} - - - - - - {{ 'core.proceed' | translate }} - - - - -

{{ 'core.whyisthisrequired' | translate }}

-

{{ 'core.explanationdigitalminor' | translate }}

-
-
- - - -
- - - - -

{{siteUrl}}

- -

- -

-

{{siteUrl}}

-
-
- - - - -

{{ 'core.login.createuserandpass' | translate }}

-
-
- - - {{ 'core.login.username' | translate }} - - - - - - - - {{ 'core.login.password' | translate }} - - - + + + {{ 'core.whatisyourage' | translate }} + + - -

- {{settings.passwordpolicy}} -

- -
+ - - - -

{{ 'core.login.supplyinfo' | translate }}

-
-
- - - {{ 'core.user.email' | translate }} - - - - - - - - {{ 'core.user.emailagain' | translate }} - - - - - - - - {{ 'core.user.' + nameField | translate }} - - - - - - - - {{ 'core.user.city' | translate }} - - - - - {{ 'core.user.country' | translate }} - - - {{ 'core.login.selectacountry' | translate }} - {{country.name}} - - - - - - - -

{{ category.name }}

+ + + {{ 'core.wheredoyoulive' | translate }} -
- -
+ + {{ 'core.login.selectacountry' | translate }} + {{country.name}} + + - - - + + + {{ 'core.proceed' | translate }} + + + -

{{ 'core.login.security_question' | translate }}

+

{{ 'core.whyisthisrequired' | translate }}

+

{{ 'core.explanationdigitalminor' | translate }}

-
- -
+ +
- - + +
+ + + + +

{{siteUrl}}

+ +

+ +

+

{{siteUrl}}

+
+
+ + -

{{ 'core.login.policyagreement' | translate }}

+

{{ 'core.login.createuserandpass' | translate }}

- - - {{ 'core.login.policyagreementclick' | translate }} - + + {{ 'core.login.username' | translate }} + + + - - {{ 'core.login.policyacceptmandatory' | translate }} - - + + {{ 'core.login.password' | translate }} - + + + + +

+ {{settings.passwordpolicy}} +

+
- - - {{ 'core.login.createaccount' | translate }} - - -
- + + + +

{{ 'core.login.supplyinfo' | translate }}

+
+
+ + + {{ 'core.user.email' | translate }} + + + + + + + + {{ 'core.user.emailagain' | translate }} + + + + + + + + {{ 'core.user.' + nameField | translate }} + + + + + + + + {{ 'core.user.city' | translate }} + + + + + {{ 'core.user.country' | translate }} + + {{ 'core.login.selectacountry' | translate }} + {{country.name}} + + + + + + + +

{{ category.name }}

+
+
+ +
+ + + + + +

{{ 'core.login.security_question' | translate }}

+
+
+ +
+ + + + + +

{{ 'core.login.policyagreement' | translate }}

+
+
+ + + + {{ 'core.login.policyagreementclick' | translate }} + + + + + + {{ 'core.login.policyacceptmandatory' | translate }} + + + + + +
+ + + {{ 'core.login.createaccount' | translate }} + + + +
+
+
+ +
diff --git a/src/core/features/login/pages/email-signup/email-signup.ts b/src/core/features/login/pages/email-signup/email-signup.ts index 8aa65028e..5e1616980 100644 --- a/src/core/features/login/pages/email-signup/email-signup.ts +++ b/src/core/features/login/pages/email-signup/email-signup.ts @@ -14,7 +14,6 @@ import { Component, ViewChild, ElementRef, OnInit, ChangeDetectorRef } from '@angular/core'; import { FormBuilder, FormGroup, Validators, FormControl } from '@angular/forms'; -import { IonRefresher } from '@ionic/angular'; import { CoreSites } from '@services/sites'; import { CoreDomUtils } from '@services/utils/dom'; @@ -256,17 +255,6 @@ export class CoreLoginEmailSignupPage implements OnInit { } } - /** - * Pull to refresh. - * - * @param event Event. - */ - refreshSettings(event?: IonRefresher): void { - this.fetchData().finally(() => { - event?.complete(); - }); - } - /** * Create account. *