Browse Source

remove validate textfield's status image

pull/1/head
InKwon James Kim 5 years ago
parent
commit
8a0e9b8c9a
  1. 10
      GMERemittance/Module/Home/User Interface/View/HomeViewController.swift
  2. 13
      GMERemittance/Module/RegisterModules/KYC/kycForm1/User Interface/View/kycForm1ViewController.swift
  3. 8
      GMERemittance/Module/RegisterModules/KYC/kycForm2/User Interface/View/kycForm2ViewController.swift
  4. 18
      GMERemittance/Module/RegisterModules/Register/User Interface/View/Register.storyboard
  5. 12
      GMERemittance/Module/RegisterModules/Register/User Interface/View/RegisterViewController.swift
  6. 4
      GMERemittance/Module/SplashScreen/User Interface/View/SplashScreenViewController.swift
  7. 1
      GMERemittance/Utility/Database/GMEDB.swift
  8. 4
      Pods/ValidationTextField/ValidationTextField/Classes/ValidationTextField.swift
  9. 5
      en.lproj/Localizable.strings

10
GMERemittance/Module/Home/User Interface/View/HomeViewController.swift

@ -145,12 +145,12 @@ class HomeViewController: UIViewController, UICollectionViewDelegateFlowLayout {
@IBAction func touchSupportBarButton(_ sender: UIBarButtonItem) {
let alert = UIAlertController(title: nil, message: "help_you_text".localized(), preferredStyle: .actionSheet)
let liveChat = UIAlertAction(title: "Live Chat", style: .default) { UIAlertAction in
let liveChat = UIAlertAction(title: "live_chat_text".localized(), style: .default) { UIAlertAction in
self.alertWithOkCancel(
message: "Do you wanna start chat?",
title: "Chat",
okTitle: "Yes",
cancelTitle: "No",
message: "check_start_chat_text".localized(),
title: "check_start_chat_title_text".localized(),
okTitle: "yes_text".localized(),
cancelTitle: "no_text".localized(),
okAction: {
if !ChannelIO.isBooted {
self.setChannelIO()

13
GMERemittance/Module/RegisterModules/KYC/kycForm1/User Interface/View/kycForm1ViewController.swift

@ -66,7 +66,7 @@ class KycForm1ViewController: UIViewController {
let email = "email_text_optional".localized()
let emailPlaceholder = "placeholder_enter_receiver_email_text".localized()
let dob = "dob_text".localized()
let dobPlaceholder = "select_dob_text".localized()
let dobPlaceholder = "dob_valid_error".localized()
let gender = "gender_text".localized()
let genderPlacholder = "gender_placeholder_text".localized()
let addressInKorea = "address_in_korea_text".localized()
@ -277,6 +277,15 @@ class KycForm1ViewController: UIViewController {
self.provinceTextField.titleFont = titleFont
self.occupationTextField.titleFont = titleFont
self.referralCodeTextField.titleFont = titleFont
self.firstNameTextField.statusImageView.isHidden = true
self.emailTextField.statusImageView.isHidden = true
self.dobTextField.statusImageView.isHidden = true
self.genderTextField.statusImageView.isHidden = true
self.addressTextField.statusImageView.isHidden = true
self.provinceTextField.statusImageView.isHidden = true
self.occupationTextField.statusImageView.isHidden = true
self.referralCodeTextField.statusImageView.isHidden = true
}
private func setError(){
@ -549,7 +558,7 @@ extension KycForm1ViewController {
dob: dobTextField.text ?? "",
mobile: GMEDB.shared.user.string(.mobileNumber) ?? "",
email: emailTextField.text ?? "",
nativeCountry: GMEDB.shared.user.string(.country) ?? "",
nativeCountry: GMEDB.shared.user.string(.countryID) ?? "",
country: addressTextField.text ?? "",
province: selectedProvience?.id ?? "",
occupation: selectedOccupation?.id ?? "",

8
GMERemittance/Module/RegisterModules/KYC/kycForm2/User Interface/View/kycForm2ViewController.swift

@ -321,6 +321,14 @@ class KycForm2ViewController: UIViewController {
self.headerTitleLabel.text = StringConstants().headerTitle
self.saveAndContinueButton.setTitle("save_and_continue_text".localized(), for: UIControl.State.normal)
bankTextField.statusImageView.isHidden = true
accountNumberTextField.statusImageView.isHidden = true
verificationIdTextField.statusImageView.isHidden = true
verificationIdNumberTextField.statusImageView.isHidden = true
issueDateTextField.statusImageView.isHidden = true
expiryDateTextField.statusImageView.isHidden = true
sourceOfFundTextField.statusImageView.isHidden = true
}
private func setupHiddenFields() {

18
GMERemittance/Module/RegisterModules/Register/User Interface/View/Register.storyboard

@ -33,7 +33,7 @@
<rect key="frame" x="0.0" y="20" width="375" height="647"/>
<subviews>
<view contentMode="scaleToFill" placeholderIntrinsicWidth="375" placeholderIntrinsicHeight="647" translatesAutoresizingMaskIntoConstraints="NO" id="3OB-6d-dKP">
<rect key="frame" x="0.0" y="0.0" width="375" height="653"/>
<rect key="frame" x="0.0" y="0.0" width="375" height="647"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Register to
Global Money Express" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="B0J-XU-dgc">
<rect key="frame" x="20" y="10" width="345" height="70"/>
@ -123,16 +123,16 @@
</constraints>
</view>
<stackView opaque="NO" contentMode="scaleToFill" spacing="7" translatesAutoresizingMaskIntoConstraints="NO" id="ZBz-Fk-d28">
<rect key="frame" x="90.5" y="419" width="194.5" height="29"/>
<rect key="frame" x="84.5" y="419" width="206" height="29"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Already have an Account?" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="YgA-Df-6ht">
<rect key="frame" x="0.0" y="0.0" width="153.5" height="29"/>
<rect key="frame" x="0.0" y="0.0" width="164" height="29"/>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Regular" family="San Francisco Display" pointSize="14"/>
<color key="textColor" red="0.2901960784" green="0.2901960784" blue="0.2901960784" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="6Ho-mR-LaI">
<rect key="frame" x="160.5" y="0.0" width="34" height="29"/>
<rect key="frame" x="171" y="0.0" width="35" height="29"/>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Regular" family="San Francisco Display" pointSize="14"/>
<state key="normal" title="Login">
<color key="titleColor" red="0.18039215689999999" green="0.19215686269999999" blue="0.57254901960000004" alpha="1" colorSpace="calibratedRGB"/>
@ -163,7 +163,7 @@
</connections>
</button>
<imageView hidden="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="page1_image" translatesAutoresizingMaskIntoConstraints="NO" id="tyu-eZ-ROR">
<rect key="frame" x="15" y="578" width="345" height="75"/>
<rect key="frame" x="15" y="578" width="345" height="69"/>
</imageView>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
@ -209,11 +209,11 @@
<connections>
<outlet property="alreadyHaveAccountLabel" destination="YgA-Df-6ht" id="EgR-97-xak"/>
<outlet property="headerLabel" destination="B0J-XU-dgc" id="K2o-53-lm5"/>
<outlet property="idTextField" destination="wCs-hK-db8" id="Ogo-4f-5gq"/>
<outlet property="idTextField" destination="wCs-hK-db8" id="haW-kl-Qvx"/>
<outlet property="loginButton" destination="6Ho-mR-LaI" id="xmf-uO-jBq"/>
<outlet property="mobileTextField" destination="VWH-eY-0B8" id="xSV-Af-GL0"/>
<outlet property="nativeCountryTextField" destination="iE3-T8-5se" id="PfO-YC-hWd"/>
<outlet property="passwordTextField" destination="IAX-yY-Q4P" id="tGu-Pz-itg"/>
<outlet property="mobileTextField" destination="VWH-eY-0B8" id="rjR-nc-qYZ"/>
<outlet property="nativeCountryTextField" destination="iE3-T8-5se" id="HWM-l7-se9"/>
<outlet property="passwordTextField" destination="IAX-yY-Q4P" id="bU8-6I-oFv"/>
<outlet property="registerButton" destination="UTk-Hw-z4V" id="yVS-bH-Ga0"/>
<outlet property="subHeaderLabel" destination="boR-7r-ieU" id="jO0-2C-r06"/>
</connections>

12
GMERemittance/Module/RegisterModules/Register/User Interface/View/RegisterViewController.swift

@ -18,7 +18,7 @@ class RegisterViewController: UIViewController {
let useridError = "userid_error_text".localized()
let passwordTitle = "password_text".localized()
let passwordPlaceholder = "create_password_text".localized()
let passwordPlaceholder = "password_policy_error".localized()
let passwordError = "password_policy_error".localized()
let confirmPasswordTitle = "confirm_password_text".localized()
@ -150,12 +150,16 @@ class RegisterViewController: UIViewController {
subHeaderLabel.text = StringConstants().registerSubtitle
alreadyHaveAccountLabel.text = StringConstants().alreadyHaveAccountText
idTextField.statusImageView.isHidden = true
passwordTextField.statusImageView.isHidden = true
nativeCountryTextField.statusImageView.isHidden = true
mobileTextField.statusImageView.isHidden = true
idTextField.titleText = StringConstants().userIdTitle
idTextField.titleFont = font
idTextField.placeholder = StringConstants().useridPlaceholder
idTextField.errorMessage = StringConstants().useridError
idTextField.validCondition = {$0.count > 5}
idTextField.validCondition = {3 < $0.count && $0.count < 16}
passwordTextField.titleText = StringConstants().passwordTitle
passwordTextField.titleFont = font
@ -232,6 +236,10 @@ extension RegisterViewController: RegisterViewInterface {
func show(message: String) {
self.alertWithOk(type: .normal, message: message, title: "Success", okTitle: "Ok") {
//TODO: save native country and mobile number at GMEDB
GMEDB.shared.user.set(self.selectedNativeCountry?.code, .countryID)
GMEDB.shared.user.set(self.mobileTextField.text, .mobileNumber)
self.presenter?.login()
}
}

4
GMERemittance/Module/SplashScreen/User Interface/View/SplashScreenViewController.swift

@ -190,8 +190,8 @@ class SplashScreenViewController: UIViewController {
self.alertWithOkCancel(
message: "Do you wanna start chat?",
title: "Chat",
okTitle: "Yes",
cancelTitle: "No",
okTitle: "yes_text".localized(),
cancelTitle: "no_text".localized(),
okAction: {
if !ChannelIO.isBooted {
self.setChannelIO()

1
GMERemittance/Utility/Database/GMEDB.swift

@ -51,6 +51,7 @@ class GMEDB {
case idType
case idNumber
case countryCode
case countryID
case ErrorCode
case hasRequestedPennyTest
case isPennyTestPending

4
Pods/ValidationTextField/ValidationTextField/Classes/ValidationTextField.swift

@ -136,6 +136,8 @@ open class ValidationTextField: UITextField {
open var errorImage: UIImage?
open lazy var statusImageView = UIImageView()
private lazy var titleLabel = UILabel()
private lazy var errorLabel = UILabel()
@ -144,8 +146,6 @@ open class ValidationTextField: UITextField {
private lazy var containerView = UIStackView()
private lazy var statusImageView = UIImageView()
private var validateStatus: ValidateType = .ready {
didSet {
switch validateStatus {

5
en.lproj/Localizable.strings

@ -513,6 +513,9 @@
// ChannelIO
"channelIO_error_message_text" = "Service not available.";
"check_start_chat_text" = "Do you wanna start chat?";
"check_start_chat_title_text" = "Chat";
"live_chat_text" = "Live Chat";
// Thunes for Myanmar
"id_type_title_text" = "ID Type (Optional)";
@ -523,4 +526,4 @@
// New Register
"userid_title_text" = "User ID";
"userid_placeholder_text" = "Enter your ID for using GME";
"userid_error_text" = "ID must be at least 6 characters";
"userid_error_text" = "ID must be at least 4 characters to 15 character";
Loading…
Cancel
Save