|
|
@ -7,7 +7,7 @@ |
|
|
|
// |
|
|
|
|
|
|
|
import UIKit |
|
|
|
|
|
|
|
import Localize_Swift |
|
|
|
|
|
|
|
// there is not time to take this to viper archi. so applying mvc here. |
|
|
|
|
|
|
@ -37,6 +37,10 @@ class ProfileChangePasswordViewController: UIViewController { |
|
|
|
@IBOutlet weak var topLabel: UILabel! |
|
|
|
@IBOutlet weak var contentView: UIView! |
|
|
|
|
|
|
|
@IBOutlet weak var currentPasswowrdTitleLabel: UILabel! |
|
|
|
@IBOutlet weak var newPasswordTitleLabel: UILabel! |
|
|
|
@IBOutlet weak var confirmPasswordTitlelabel: UILabel! |
|
|
|
@IBOutlet weak var saveButton: UIButton! |
|
|
|
|
|
|
|
// MARK:- Properties |
|
|
|
// keyboard |
|
|
@ -90,7 +94,7 @@ class ProfileChangePasswordViewController: UIViewController { |
|
|
|
self.textFieldNewPassword.delegate = self |
|
|
|
self.textFieldConfirmPassword.delegate = self |
|
|
|
self.textFieldCurrentPassword.delegate = self |
|
|
|
|
|
|
|
configureLanguage() |
|
|
|
} |
|
|
|
|
|
|
|
override func viewWillAppear(_ animated: Bool) { |
|
|
@ -103,6 +107,19 @@ class ProfileChangePasswordViewController: UIViewController { |
|
|
|
self.navigationItem.title = "" |
|
|
|
} |
|
|
|
|
|
|
|
func configureLanguage() { |
|
|
|
self.topLabel.text = "password_policy_text".localized() |
|
|
|
self.textFieldCurrentPassword.placeholder = "current_password_placeholder_text".localized() |
|
|
|
self.textFieldNewPassword.placeholder = "new_password_placeholder_text".localized() |
|
|
|
self.textFieldConfirmPassword.placeholder = "confirm_password_text".localized() |
|
|
|
self.newPasswordTitleLabel.text = "new_password_text".localized() |
|
|
|
self.currentPasswowrdTitleLabel.text = "current_password_placeholder_text".localized() |
|
|
|
self.confirmPasswordTitlelabel.text = "confirm_password_text".localized() |
|
|
|
self.saveButton.setTitle("save_text", for: UIControlState.normal) |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@IBAction func savePasswordChanges(_ sender: Any) { |
|
|
|
let currentPassword = self.encryptedOldPassword ?? "" |
|
|
|
let newPassword = self.encryptedPassword ?? "" |
|
|
|