From 84214a24b394330b331ef8fcc63ee275b02fb4eb Mon Sep 17 00:00:00 2001
From: Priyanka Upadhye <92uppr1mst@hft-stuttgart.de>
Date: Mon, 6 Jan 2020 17:08:19 +0100
Subject: [PATCH] reset password bug fix
---
.../reset-password/reset-password.page.html | 9 +++-
.../reset-password/reset-password.page.ts | 4 +-
.../reset-password/reset-password.page.html | 42 -------------------
src/app/reset-password/reset-password.page.ts | 15 -------
4 files changed, 10 insertions(+), 60 deletions(-)
delete mode 100644 src/app/reset-password/reset-password.page.html
delete mode 100644 src/app/reset-password/reset-password.page.ts
diff --git a/src/app/auth/reset-password/reset-password.page.html b/src/app/auth/reset-password/reset-password.page.html
index 0a035ab..5645b59 100644
--- a/src/app/auth/reset-password/reset-password.page.html
+++ b/src/app/auth/reset-password/reset-password.page.html
@@ -1,6 +1,11 @@
-
- Reset Password
+
+
+
+
+
+ Change Password
+
diff --git a/src/app/auth/reset-password/reset-password.page.ts b/src/app/auth/reset-password/reset-password.page.ts
index 8951327..bc4080e 100644
--- a/src/app/auth/reset-password/reset-password.page.ts
+++ b/src/app/auth/reset-password/reset-password.page.ts
@@ -31,7 +31,9 @@ export class ResetPasswordPage implements OnInit {
this.router.navigateByUrl('/login');
}
resetPassword(){
- if(this.confirmPassword!=this.newPassword)
+ if(this.oldPassword=="" || this.confirmPassword=="" || this.newPassword=="")
+ this.toastService.showToast("All Feilds are mandatory");
+ else if(this.confirmPassword!=this.newPassword)
this.toastService.showToast("Please Confirm Password Again");
else{
this.storage.get('token').then((token) => {
diff --git a/src/app/reset-password/reset-password.page.html b/src/app/reset-password/reset-password.page.html
deleted file mode 100644
index 055104b..0000000
--- a/src/app/reset-password/reset-password.page.html
+++ /dev/null
@@ -1,42 +0,0 @@
-
-
- Reset Password
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/app/reset-password/reset-password.page.ts b/src/app/reset-password/reset-password.page.ts
deleted file mode 100644
index f0395c2..0000000
--- a/src/app/reset-password/reset-password.page.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-import { Component, OnInit } from '@angular/core';
-
-@Component({
- selector: 'app-reset-password',
- templateUrl: './reset-password.page.html',
- styleUrls: ['./reset-password.page.scss'],
-})
-export class ResetPasswordPage implements OnInit {
-
- constructor() { }
-
- ngOnInit() {
- }
-
-}
--
GitLab