commit
c644eeb1e1
|
@ -75,7 +75,7 @@ export class AddonUserProfileFieldDatetimeComponent extends CoreUserProfileField
|
||||||
this.max = field.param2;
|
this.max = field.param2;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.max = this.max || CoreTimeUtils.getDatetimeDefaultMin();
|
this.min = this.min || CoreTimeUtils.getDatetimeDefaultMin();
|
||||||
this.max = this.max || CoreTimeUtils.getDatetimeDefaultMax();
|
this.max = this.max || CoreTimeUtils.getDatetimeDefaultMax();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -17,12 +17,8 @@
|
||||||
</ion-toolbar>
|
</ion-toolbar>
|
||||||
</ion-header>
|
</ion-header>
|
||||||
<ion-content>
|
<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">
|
<core-loading [hideUntil]="settingsLoaded" *ngIf="!isMinor">
|
||||||
|
<div class="list-item-limited-width">
|
||||||
|
|
||||||
<!-- Site has an unsupported required field. -->
|
<!-- Site has an unsupported required field. -->
|
||||||
<ion-list *ngIf="!allRequiredSupported">
|
<ion-list *ngIf="!allRequiredSupported">
|
||||||
|
@ -36,9 +32,9 @@
|
||||||
</ion-button>
|
</ion-button>
|
||||||
</ion-list>
|
</ion-list>
|
||||||
|
|
||||||
|
<ng-container *ngIf="allRequiredSupported && settingsLoaded && settings">
|
||||||
<!-- Age verification. -->
|
<!-- Age verification. -->
|
||||||
<form *ngIf="allRequiredSupported && settingsLoaded && settings && ageDigitalConsentVerification"
|
<form *ngIf="ageDigitalConsentVerification" [formGroup]="ageVerificationForm" (ngSubmit)="verifyAge($event)" #ageForm>
|
||||||
[formGroup]="ageVerificationForm" (ngSubmit)="verifyAge($event)" #ageForm>
|
|
||||||
|
|
||||||
<ion-item-divider class="ion-text-wrap">
|
<ion-item-divider class="ion-text-wrap">
|
||||||
<ion-label>
|
<ion-label>
|
||||||
|
@ -78,8 +74,7 @@
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<!-- Signup form. -->
|
<!-- Signup form. -->
|
||||||
<form *ngIf="allRequiredSupported && settingsLoaded && settings && !ageDigitalConsentVerification" [formGroup]="signupForm"
|
<form *ngIf="!ageDigitalConsentVerification" [formGroup]="signupForm" (ngSubmit)="create($event)" #signupFormEl>
|
||||||
(ngSubmit)="create($event)" #signupFormEl>
|
|
||||||
|
|
||||||
<ion-item class="ion-text-wrap ion-text-center">
|
<ion-item class="ion-text-wrap ion-text-center">
|
||||||
<ion-label>
|
<ion-label>
|
||||||
|
@ -103,8 +98,8 @@
|
||||||
<ion-label position="stacked">
|
<ion-label position="stacked">
|
||||||
<span core-mark-required="true">{{ 'core.login.username' | translate }}</span>
|
<span core-mark-required="true">{{ 'core.login.username' | translate }}</span>
|
||||||
</ion-label>
|
</ion-label>
|
||||||
<ion-input type="text" name="username" placeholder="{{ 'core.login.username' | translate }}" formControlName="username"
|
<ion-input type="text" name="username" placeholder="{{ 'core.login.username' | translate }}"
|
||||||
autocapitalize="none" autocorrect="off">
|
formControlName="username" autocapitalize="none" autocorrect="off">
|
||||||
</ion-input>
|
</ion-input>
|
||||||
<core-input-errors [control]="signupForm.controls.username" [errorMessages]="usernameErrors"></core-input-errors>
|
<core-input-errors [control]="signupForm.controls.username" [errorMessages]="usernameErrors"></core-input-errors>
|
||||||
</ion-item>
|
</ion-item>
|
||||||
|
@ -223,8 +218,11 @@
|
||||||
<!-- Remove this once Ionic fixes this bug: https://github.com/ionic-team/ionic-framework/issues/19368 -->
|
<!-- Remove this once Ionic fixes this bug: https://github.com/ionic-team/ionic-framework/issues/19368 -->
|
||||||
<input type="submit" class="core-submit-hidden-enter" />
|
<input type="submit" class="core-submit-hidden-enter" />
|
||||||
</form>
|
</form>
|
||||||
|
</ng-container>
|
||||||
|
</div>
|
||||||
</core-loading>
|
</core-loading>
|
||||||
|
|
||||||
|
<div class="list-item-limited-width">
|
||||||
<ion-list *ngIf="allRequiredSupported && isMinor">
|
<ion-list *ngIf="allRequiredSupported && isMinor">
|
||||||
<ion-item-divider class="ion-text-wrap">
|
<ion-item-divider class="ion-text-wrap">
|
||||||
<ion-label>
|
<ion-label>
|
||||||
|
|
|
@ -14,7 +14,6 @@
|
||||||
|
|
||||||
import { Component, ViewChild, ElementRef, OnInit, ChangeDetectorRef } from '@angular/core';
|
import { Component, ViewChild, ElementRef, OnInit, ChangeDetectorRef } from '@angular/core';
|
||||||
import { FormBuilder, FormGroup, Validators, FormControl } from '@angular/forms';
|
import { FormBuilder, FormGroup, Validators, FormControl } from '@angular/forms';
|
||||||
import { IonRefresher } from '@ionic/angular';
|
|
||||||
|
|
||||||
import { CoreSites } from '@services/sites';
|
import { CoreSites } from '@services/sites';
|
||||||
import { CoreDomUtils } from '@services/utils/dom';
|
import { CoreDomUtils } from '@services/utils/dom';
|
||||||
|
@ -55,7 +54,7 @@ export class CoreLoginEmailSignupPage implements OnInit {
|
||||||
siteUrl!: string;
|
siteUrl!: string;
|
||||||
siteConfig?: CoreSitePublicConfigResponse;
|
siteConfig?: CoreSitePublicConfigResponse;
|
||||||
siteName?: string;
|
siteName?: string;
|
||||||
authInstructions?: string;
|
authInstructions = '';
|
||||||
settings?: AuthEmailSignupSettings;
|
settings?: AuthEmailSignupSettings;
|
||||||
countries?: CoreCountry[];
|
countries?: CoreCountry[];
|
||||||
categories?: AuthEmailSignupProfileFieldsCategory[];
|
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.
|
* Create account.
|
||||||
*
|
*
|
||||||
|
@ -377,7 +365,7 @@ export class CoreLoginEmailSignupPage implements OnInit {
|
||||||
* Show authentication instructions.
|
* Show authentication instructions.
|
||||||
*/
|
*/
|
||||||
showAuthInstructions(): void {
|
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 (!result.status) {
|
||||||
if (this.countryControl.value) {
|
if (this.countryControl.value) {
|
||||||
this.signUpCountryControl!.setValue(this.countryControl.value);
|
this.signUpCountryControl?.setValue(this.countryControl.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Not a minor, go ahead.
|
// Not a minor, go ahead.
|
||||||
|
@ -428,7 +416,7 @@ export class CoreLoginEmailSignupPage implements OnInit {
|
||||||
// Is a minor.
|
// Is a minor.
|
||||||
this.isMinor = true;
|
this.isMinor = true;
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch {
|
||||||
// Something wrong, redirect to the site.
|
// Something wrong, redirect to the site.
|
||||||
CoreDomUtils.showErrorModal('There was an error verifying your age, please try again using the browser.');
|
CoreDomUtils.showErrorModal('There was an error verifying your age, please try again using the browser.');
|
||||||
} finally {
|
} finally {
|
||||||
|
|
Loading…
Reference in New Issue