mobile-ios/CovidSafe/UnderSixteenViewController.swift

58 lines
1.8 KiB
Swift
Raw Normal View History

2020-05-08 07:49:14 +00:00
//
// IsolationSuccessViewController.swift
// CovidSafe
//
// Created on 20/4/20.
// Copyright © 2020 Australian Government. All rights reserved.
//
import UIKit
import SafariServices
class UnderSixteenViewController: UIViewController, RegistrationHandler {
public var registrationInfo: RegistrationRequest?
2020-11-10 00:51:00 +00:00
public var reauthenticating: Bool = false
2020-08-03 06:01:39 +00:00
@IBOutlet weak var stepCounterLabel: UILabel!
2021-12-10 08:05:42 +00:00
@IBOutlet weak var introLabel: UILabel!
2020-08-03 06:01:39 +00:00
override func viewDidLoad() {
super.viewDidLoad()
stepCounterLabel.text = String.localizedStringWithFormat( "stepCounter".localizedString(),
1,
4
)
2021-12-10 08:05:42 +00:00
guard let attributedString = introLabel.attributedText else {
return
}
let mutableString = NSMutableAttributedString(attributedString: attributedString)
mutableString.parseItalicTags()
introLabel.attributedText = mutableString
2020-08-03 06:01:39 +00:00
}
2020-05-08 07:49:14 +00:00
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
if var vc = segue.destination as? RegistrationHandler {
vc.registrationInfo = self.registrationInfo
}
}
@IBAction func onBackTapped(_ sender: UIButton) {
self.navigationController?.popViewController(animated: true)
}
@IBAction func doneOntap(_ sender: Any) {
performSegue(withIdentifier: "under16Consent", sender: nil)
}
2021-12-10 08:05:42 +00:00
@IBAction func dontAgreeTapped(_ sender: Any) {
let errorAlert = UIAlertController(title: "",
message: "non_consent_popup".localizedString(),
preferredStyle: .alert)
errorAlert.addAction(UIAlertAction(title: "global_OK".localizedString(), style: .default))
present(errorAlert, animated: true)
}
2020-05-08 07:49:14 +00:00
}