First step reset password

This commit is contained in:
CHIEFSOFT\ameye
2023-08-04 11:20:22 -04:00
parent 91485afe13
commit cfbd078921
4 changed files with 43 additions and 20 deletions
+16
View File
@@ -29,6 +29,22 @@
<ion-label class="welcome_lbl">Forgot password</ion-label>
<ion-label class="simp_lbl">Enter your registered email</ion-label>
<ion-item lines="none">
<ion-input type="email" placeholder="Your username" [(ngModel)]='username'></ion-input>
</ion-item>
<ion-button (click)="onEnterEmail()" expand="block">
Continue
</ion-button>
</div>
<div *ngIf="tab == 3" class="ion-padding">
<ion-label class="welcome_lbl">Forgot password</ion-label>
<ion-label class="simp_lbl">Code has been sent to the your registered email</ion-label>
<ion-item lines="none">
+25 -3
View File
@@ -7,7 +7,7 @@
Copyright and Good Faith Purchasers © 2021-present initappz.
*/
import { Router } from '@angular/router';
import { Component, OnInit } from '@angular/core';
import {Component, OnInit, ViewChild} from '@angular/core';
@Component({
selector: 'app-forgot',
@@ -15,8 +15,8 @@ import { Component, OnInit } from '@angular/core';
styleUrls: ['./forgot.page.scss'],
})
export class ForgotPage implements OnInit {
@ViewChild('username') username;
@ViewChild('password') password;
tab = 1
constructor(
@@ -26,10 +26,32 @@ export class ForgotPage implements OnInit {
ngOnInit() {
}
onEnterEmail(){
if (this.username == null || this.username == '' || this.validateEmail(this.username) == false) {
this.showAlert('Invalid Login', 'Enter username(email) to continue');
return;
}
this.tab =3;
}
onPassword() {
this.router.navigate(['new-password']);
}
onLogin(){
this.router.navigate(['login']);
}
validateEmail(email) {
var re = /\S+@\S+\.\S+/;
return re.test(email);
}
showAlert(mtitle: string, amessage: string) {
/* let alert = this.alertCtrl.create({
title: mtitle,
subTitle: amessage,
buttons: ['OK']
});
alert.present();*/
alert(amessage);
}
}