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);
}
}
-8
View File
@@ -1,11 +1,3 @@
/*
Authors : initappz (Rahul Jograna)
Website : https://initappz.com/
App Name : E-Learning App Template
This App Template Source code is licensed as per the
terms found in the Website https://initappz.com/license
Copyright and Good Faith Purchasers © 2021-present initappz.
*/
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
+2 -9
View File
@@ -1,11 +1,4 @@
<!--
Authors : initappz (Rahul Jograna)
Website : https://initappz.com/
App Name : E-Learning App Template
This App Template Source code is licensed as per the
terms found in the Website https://initappz.com/license
Copyright and Good Faith Purchasers © 2021-present initappz.
-->
<ion-header mode="ios" class="ion-no-border">
<ion-toolbar>
<ion-buttons slot="start" (click)="onBack()">
@@ -23,7 +16,7 @@
</ion-header>
<ion-content class="ion-padding">
<div class="bg_image back_image" [style.backgroundImage]="'url(assets/images/barcode.png)'"></div>
<!-- <div class="bg_image back_image" [style.backgroundImage]="'url(assets/images/barcode.png)'"></div>-->
<div class="bg_white">
<div class="flex">