pass reset
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { Router } from '@angular/router';
|
||||
import {LoadingController, NavController} from '@ionic/angular';
|
||||
import {AlertController, LoadingController, NavController} from '@ionic/angular';
|
||||
import {Component, OnInit, ViewChild} from '@angular/core';
|
||||
import {WrenchService} from "../../services/wrench.service";
|
||||
import {SessionDataProviderService} from "../../store/session-data-provider.service";
|
||||
@@ -19,7 +19,8 @@ export class NewPasswordPage implements OnInit {
|
||||
private router: Router,
|
||||
private wrenchService: WrenchService,
|
||||
public sessionDataProviderService:SessionDataProviderService,
|
||||
private loadingCtrl: LoadingController
|
||||
private loadingCtrl: LoadingController,
|
||||
private alertController: AlertController
|
||||
) {
|
||||
this.resetResult = this.router.getCurrentNavigation().extras.state;
|
||||
if ( this.resetResult != null
|
||||
@@ -64,7 +65,7 @@ export class NewPasswordPage implements OnInit {
|
||||
});
|
||||
|
||||
if (this.new_password.length < 8 || (this.new_password != this.confirm_new_password) ){
|
||||
this.showAlert('Error', 'Enter new password to continue, must be 8 or more alphanumeric');
|
||||
this.showAlert('Password Reset Error', 'Enter new password to continue, must be 8 or more alphanumeric');
|
||||
return;
|
||||
}
|
||||
this.postData = {
|
||||
@@ -88,13 +89,13 @@ export class NewPasswordPage implements OnInit {
|
||||
}
|
||||
);
|
||||
}
|
||||
showAlert(mtitle: string, amessage: string) {
|
||||
/* let alert = this.alertCtrl.create({
|
||||
title: mtitle,
|
||||
subTitle: amessage,
|
||||
buttons: ['OK']
|
||||
});
|
||||
alert.present();*/
|
||||
alert(amessage);
|
||||
async showAlert(mtitle: string, amessage: string) {
|
||||
const alert = await this.alertController.create({
|
||||
header: 'WrenchBoard',
|
||||
subHeader: mtitle,
|
||||
message: amessage,
|
||||
buttons: ['OK'],
|
||||
});
|
||||
await alert.present();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user