commit
c644eeb1e1
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
@ -17,12 +17,8 @@
|
|||
</ion-toolbar>
|
||||
</ion-header>
|
||||
<ion-content>
|
||||
<ion-refresher slot="fixed" [disabled]="!settingsLoaded || isMinor" (ionRefresh)="refreshSettings($event.target)">
|
||||
<ion-refresher-content pullingText="{{ 'core.pulltorefresh' | translate }}"></ion-refresher-content>
|
||||
</ion-refresher>
|
||||
<div class="list-item-limited-width">
|
||||
|
||||
<core-loading [hideUntil]="settingsLoaded" *ngIf="!isMinor">
|
||||
<div class="list-item-limited-width">
|
||||
|
||||
<!-- Site has an unsupported required field. -->
|
||||
<ion-list *ngIf="!allRequiredSupported">
|
||||
|
@ -36,9 +32,9 @@
|
|||
</ion-button>
|
||||
</ion-list>
|
||||
|
||||
<ng-container *ngIf="allRequiredSupported && settingsLoaded && settings">
|
||||
<!-- Age verification. -->
|
||||
<form *ngIf="allRequiredSupported && settingsLoaded && settings && ageDigitalConsentVerification"
|
||||
[formGroup]="ageVerificationForm" (ngSubmit)="verifyAge($event)" #ageForm>
|
||||
<form *ngIf="ageDigitalConsentVerification" [formGroup]="ageVerificationForm" (ngSubmit)="verifyAge($event)" #ageForm>
|
||||
|
||||
<ion-item-divider class="ion-text-wrap">
|
||||
<ion-label>
|
||||
|
@ -78,8 +74,7 @@
|
|||
</form>
|
||||
|
||||
<!-- Signup form. -->
|
||||
<form *ngIf="allRequiredSupported && settingsLoaded && settings && !ageDigitalConsentVerification" [formGroup]="signupForm"
|
||||
(ngSubmit)="create($event)" #signupFormEl>
|
||||
<form *ngIf="!ageDigitalConsentVerification" [formGroup]="signupForm" (ngSubmit)="create($event)" #signupFormEl>
|
||||
|
||||
<ion-item class="ion-text-wrap ion-text-center">
|
||||
<ion-label>
|
||||
|
@ -103,8 +98,8 @@
|
|||
<ion-label position="stacked">
|
||||
<span core-mark-required="true">{{ 'core.login.username' | translate }}</span>
|
||||
</ion-label>
|
||||
<ion-input type="text" name="username" placeholder="{{ 'core.login.username' | translate }}" formControlName="username"
|
||||
autocapitalize="none" autocorrect="off">
|
||||
<ion-input type="text" name="username" placeholder="{{ 'core.login.username' | translate }}"
|
||||
formControlName="username" autocapitalize="none" autocorrect="off">
|
||||
</ion-input>
|
||||
<core-input-errors [control]="signupForm.controls.username" [errorMessages]="usernameErrors"></core-input-errors>
|
||||
</ion-item>
|
||||
|
@ -223,8 +218,11 @@
|
|||
<!-- Remove this once Ionic fixes this bug: https://github.com/ionic-team/ionic-framework/issues/19368 -->
|
||||
<input type="submit" class="core-submit-hidden-enter" />
|
||||
</form>
|
||||
</ng-container>
|
||||
</div>
|
||||
</core-loading>
|
||||
|
||||
<div class="list-item-limited-width">
|
||||
<ion-list *ngIf="allRequiredSupported && isMinor">
|
||||
<ion-item-divider class="ion-text-wrap">
|
||||
<ion-label>
|
||||
|
|
|
@ -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';
|
||||
|
@ -55,7 +54,7 @@ export class CoreLoginEmailSignupPage implements OnInit {
|
|||
siteUrl!: string;
|
||||
siteConfig?: CoreSitePublicConfigResponse;
|
||||
siteName?: string;
|
||||
authInstructions?: string;
|
||||
authInstructions = '';
|
||||
settings?: AuthEmailSignupSettings;
|
||||
countries?: CoreCountry[];
|
||||
categories?: AuthEmailSignupProfileFieldsCategory[];
|
||||
|
@ -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.
|
||||
*
|
||||
|
@ -377,7 +365,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 +407,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 +416,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 {
|
||||
|
|
Loading…
Reference in New Issue