-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathForgotPassword
72 lines (59 loc) · 2.5 KB
/
ForgotPassword
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
//
// ForgotPasswordViewController.swift
// RentAdate
//
// Created by Kassandra Capretta on 12/19/19.
// Copyright © 2019 Kassandra Capretta. All rights reserved.
//
import UIKit
// import Firebase
// import FirebaseAuth
// import ProgressHUD
class ForgotPasswordViewController: UIViewController {
@IBOutlet weak var forgotPassword: UIButton!
@IBOutlet weak var forgotEmailTextField: UITextField!
override func viewDidLoad() {
super.viewDidLoad()
Utilities.styleFilledButton(forgotPassword)
let backButton = UIBarButtonItem()
backButton.title = ""
self.navigationController?.navigationBar.topItem?.backBarButtonItem = backButton
// func sendPasswordReset(withEmail email: String, _ callback: ((Error?) -> ())? = nil){
// Auth.auth().sendPasswordReset(withEmail: email) { error in
// callback?(error)
// }
// }
}
// Forgot Password Tapped
@IBAction func forgotPasswordTapped(_ sender: Any) {
// guard let email = forgotEmailTextField.text, email != "" else {
// ProgressHUD.showError(ERROR_EMPTY_EMAIL_RESET)
// return
}
// Auth.auth().sendPasswordReset(withEmail: "email@email") { error in //User.
// Radius.resetPasswordTapped(email: email, onSuccess: {
// self.view.endEditing(true)
// ProgressHUD.showSuccess(SUCCESS_EMAIL_RESET)
// self.navigationController?.popViewController(animated: true)
// }) { (errorMessage) in
// ProgressHUD.showError(errorMessage)
// }
// }
// @IBAction func sendForgotPW(_ sender: UIButton) {
// let storyboard = UIStoryboard(name: "Main", bundle: nil)
// let loginVC = storyboard.instantiateViewController(identifier: "ViewController")
// self.navigationController?.pushViewController(loginVC, animated: true)
//
//
// let vc = ViewController()
// self.navigationController?.pushViewController(vc, animated: true)
// }
//
// // Process information, save and move to next View Controller
// @IBAction func forgotPasswordNext(_ sender: UIButton) {
// let storyboard = UIStoryboard(name: "Main", bundle: nil)
// let backToLogin = storyboard.instantiateViewController(identifier: "loginViewController")
// self.navigationController?.pushViewController(backToLogin, animated: true)
// }
// }
}