-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
358 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<!-- | ||
Generated template for the ChangepassPage page. | ||
See http://ionicframework.com/docs/components/#navigation for more info on | ||
Ionic pages and navigation. | ||
--> | ||
<ion-header> | ||
|
||
<ion-navbar color="myapp1"> | ||
<ion-title>Change Password</ion-title> | ||
</ion-navbar> | ||
|
||
</ion-header> | ||
|
||
|
||
<ion-content padding> | ||
<ion-list> | ||
<ion-item> | ||
<ion-label floating>Enter Current Password</ion-label> | ||
<ion-input type="password" [(ngModel)]="pass" name="pass" placeholder=""></ion-input> | ||
</ion-item> | ||
<ion-item> | ||
<ion-label floating>Enter New Password</ion-label> | ||
<ion-input type="password" [(ngModel)]="pass" name="pass" placeholder=""></ion-input> | ||
</ion-item> | ||
<ion-item> | ||
<ion-label floating>Confirm Password</ion-label> | ||
<ion-input type="password" [(ngModel)]="pass" name="pass" placeholder=""></ion-input> | ||
</ion-item> | ||
|
||
<br/> | ||
| ||
| ||
| ||
| ||
| ||
|
||
<div padding> | ||
<button ion-button round (click)="onChangePassClick()" color="myapp1" block>Change Password</button> | ||
</div> | ||
</ion-list> | ||
</ion-content> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { NgModule } from '@angular/core'; | ||
import { IonicPageModule } from 'ionic-angular'; | ||
import { ChangepassPage } from './changepass'; | ||
|
||
@NgModule({ | ||
declarations: [ | ||
ChangepassPage, | ||
], | ||
imports: [ | ||
IonicPageModule.forChild(ChangepassPage), | ||
], | ||
}) | ||
export class ChangepassPageModule {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
page-changepass { | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import { Component } from '@angular/core'; | ||
import { IonicPage, NavController, NavParams } from 'ionic-angular'; | ||
import { UserPage } from "../user/user"; | ||
import { UserlogProvider } from "../../providers/userlog/userlog"; | ||
import { User_Class } from "../../providers/userlog/user_class"; | ||
import { TabsPage } from "../../pages/tabs/tabs"; | ||
/** | ||
* Generated class for the ChangepassPage page. | ||
* | ||
* See https://ionicframework.com/docs/components/#navigation for more info on | ||
* Ionic pages and navigation. | ||
*/ | ||
|
||
@IonicPage() | ||
@Component({ | ||
selector: 'page-changepass', | ||
templateUrl: 'changepass.html', | ||
}) | ||
export class ChangepassPage { | ||
|
||
constructor(public navCtrl: NavController, public navParams: NavParams) { | ||
} | ||
|
||
ionViewDidLoad() { | ||
console.log('ionViewDidLoad ChangepassPage'); | ||
} | ||
onChangePassClick() | ||
{ | ||
|
||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<!-- | ||
Generated template for the ForgetpassPage page. | ||
See http://ionicframework.com/docs/components/#navigation for more info on | ||
Ionic pages and navigation. | ||
--> | ||
<ion-header> | ||
|
||
<ion-navbar color="myapp1"> | ||
<ion-title align="left"color="black">Forget Password</ion-title> | ||
</ion-navbar> | ||
|
||
</ion-header> | ||
|
||
|
||
<ion-content padding> | ||
<ion-list> | ||
<ion-item> | ||
<ion-label floating>Email Id</ion-label> | ||
<ion-input type="email" [(ngModel)]="email_id" name="email"></ion-input> | ||
</ion-item> | ||
|
||
| ||
| ||
| ||
| ||
| ||
|
||
|
||
<button ion-button round (click)="onClick()"color="myapp1" block>Send Mail</button> | ||
|
||
</ion-list> | ||
</ion-content> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { NgModule } from '@angular/core'; | ||
import { IonicPageModule } from 'ionic-angular'; | ||
import { ForgetpassPage } from './forgetpass'; | ||
|
||
@NgModule({ | ||
declarations: [ | ||
ForgetpassPage, | ||
], | ||
imports: [ | ||
IonicPageModule.forChild(ForgetpassPage), | ||
], | ||
}) | ||
export class ForgetpassPageModule {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
page-forgetpass { | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
import { Component } from '@angular/core'; | ||
import { IonicPage, NavController, NavParams } from 'ionic-angular'; | ||
import { UserlogProvider } from "../../providers/userlog/userlog"; | ||
import { User_Class } from "../../providers/userlog/user_class"; | ||
import { email_class } from "../../providers/userlog/email"; | ||
|
||
|
||
/** | ||
* Generated class for the ForgetpassPage page. | ||
* | ||
* See https://ionicframework.com/docs/components/#navigation for more info on | ||
* Ionic pages and navigation. | ||
*/ | ||
|
||
@IonicPage() | ||
@Component({ | ||
selector: 'page-forgetpass', | ||
templateUrl: 'forgetpass.html', | ||
}) | ||
export class ForgetpassPage { | ||
|
||
constructor(public navCtrl: NavController, public navParams: NavParams,public _db:UserlogProvider) { | ||
} | ||
email_id:string=''; | ||
password:string=''; | ||
usr:User_Class[]; | ||
mailobj:email_class[]=[]; | ||
msg:string=''; | ||
ionViewDidLoad() { | ||
console.log('ionViewDidLoad ForgetpassPage'); | ||
} | ||
forgotPassword() | ||
{ | ||
|
||
|
||
|
||
|
||
//let item=new Users(this.id,this.email,this.name,this.mobno,this.img,this.pass,this.dpass); | ||
// alert(this.email); | ||
// let item=new Users(this.id,this.email,this.name,this.mobno,this.img,this.pass,this.dpass); | ||
alert("ywaa"); | ||
this._db.getUser(this.email_id).subscribe( | ||
(data:User_Class[])=>{ | ||
// alert("hiii"); | ||
if(data.length===1) | ||
{ | ||
alert("hello"); | ||
var message="Hello "+data[0].usr_name+". You have requested to reset the password. your password is '"+data[0].usr_pass+"'. Password is one of the confidential thing, Don't share it with anyone."; | ||
this._db.sendemail(new email_class(message,this.email_id,"Resetting the password of Expense Tracker.")).subscribe( | ||
(data1:any)=>{ | ||
console.log("mail sent"); | ||
alert("The Password has been sent to "+this.email_id); | ||
}, | ||
|
||
); | ||
} | ||
else | ||
{ | ||
this.msg="You have entered incorrect email id. Please enter the email id you used to login with."; | ||
} | ||
}, | ||
function(err){}, | ||
function(){} | ||
); | ||
} | ||
onClick() | ||
{ | ||
|
||
this.forgotPassword(); | ||
/*buttons: [ | ||
{ | ||
text: 'Cancel', | ||
handler: data => { | ||
console.log('Cancel clicked'); | ||
} | ||
}, | ||
{ | ||
text: 'Send', | ||
handler: data => { | ||
this.email_id = data.name; | ||
//this.forgotPassword(); | ||
} | ||
} | ||
]*/ | ||
|
||
} | ||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.