IOS-1561 for imap and smtp port fields we only allow numbers IOS-1561
authorXavier Algarra <xavier@pep-project.org>
Mon, 05 Aug 2019 16:35:22 +0200
branchIOS-1561
changeset 954056a1b52cae43
parent 9539 cbd1ed0f98f4
child 9566 1124f1e12118
IOS-1561 for imap and smtp port fields we only allow numbers
pEpForiOS.xcodeproj/project.pbxproj
pEpForiOS/UI/Settings/Setting/AccountSettings/AccountSettingsTableViewController.swift
     1.1 --- a/pEpForiOS.xcodeproj/project.pbxproj	Mon Aug 05 16:34:16 2019 +0200
     1.2 +++ b/pEpForiOS.xcodeproj/project.pbxproj	Mon Aug 05 16:35:22 2019 +0200
     1.3 @@ -419,6 +419,7 @@
     1.4  		B722EC4D1E5B01B300A2B9D5 /* FolderCellViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = B722EC4C1E5B01B300A2B9D5 /* FolderCellViewModel.swift */; };
     1.5  		B722EC651E5B49BA00A2B9D5 /* FolderSectionViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = B722EC641E5B49BA00A2B9D5 /* FolderSectionViewModel.swift */; };
     1.6  		B722EC7A1E5C879000A2B9D5 /* FolderUiProtocols.swift in Sources */ = {isa = PBXBuildFile; fileRef = B722EC791E5C879000A2B9D5 /* FolderUiProtocols.swift */; };
     1.7 +		B73BEEB122F874B1006E6BFC /* String+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = B73BEEB022F874B1006E6BFC /* String+Extension.swift */; };
     1.8  		B74F81021EB0E20000519FCC /* LoginViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = B74F81011EB0E20000519FCC /* LoginViewModel.swift */; };
     1.9  		B75FF00B1EFD420F00C57289 /* EmailListViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = B75FF00A1EFD420F00C57289 /* EmailListViewModel.swift */; };
    1.10  		B76CF8B320D2739B002429A8 /* MoveToFolderViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = B76CF8B220D2739B002429A8 /* MoveToFolderViewModel.swift */; };
    1.11 @@ -930,6 +931,7 @@
    1.12  		B722EC4C1E5B01B300A2B9D5 /* FolderCellViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = FolderCellViewModel.swift; path = Folder/ViewModel/FolderCellViewModel.swift; sourceTree = "<group>"; };
    1.13  		B722EC641E5B49BA00A2B9D5 /* FolderSectionViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = FolderSectionViewModel.swift; path = Folder/ViewModel/FolderSectionViewModel.swift; sourceTree = "<group>"; };
    1.14  		B722EC791E5C879000A2B9D5 /* FolderUiProtocols.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FolderUiProtocols.swift; sourceTree = "<group>"; };
    1.15 +		B73BEEB022F874B1006E6BFC /* String+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "String+Extension.swift"; sourceTree = "<group>"; };
    1.16  		B74F81011EB0E20000519FCC /* LoginViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LoginViewModel.swift; sourceTree = "<group>"; };
    1.17  		B75FF00A1EFD420F00C57289 /* EmailListViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EmailListViewModel.swift; sourceTree = "<group>"; };
    1.18  		B76CF8B220D2739B002429A8 /* MoveToFolderViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MoveToFolderViewModel.swift; sourceTree = "<group>"; };
    1.19 @@ -1762,6 +1764,7 @@
    1.20  				1574D079211464CC00FEDC93 /* URL+MailTo.swift */,
    1.21  				B7DFEA55225397AB0080A2BA /* Folder+LocalizedName.swift */,
    1.22  				B7F676BC227C4B26007E5E3A /* MessageQueryResultsFilter+FilterButtonTitle.swift */,
    1.23 +				B73BEEB022F874B1006E6BFC /* String+Extension.swift */,
    1.24  			);
    1.25  			path = Extensions;
    1.26  			sourceTree = "<group>";
    1.27 @@ -2880,6 +2883,7 @@
    1.28  				155050F01FE82356009CEAD2 /* UserNotificationTool.swift in Sources */,
    1.29  				430D73671E9CC54000EA6FA9 /* AttachmentToLocalURLOperation.swift in Sources */,
    1.30  				4351C2D21F4441190053381F /* html.c in Sources */,
    1.31 +				B73BEEB122F874B1006E6BFC /* String+Extension.swift in Sources */,
    1.32  				152A39DE21905C3E00D9F8E4 /* AccountCellViewModel.swift in Sources */,
    1.33  				4304FD001EBB8EBB0086DADA /* LanguageListViewController.swift in Sources */,
    1.34  				430E5F201EBC87A700E5D5D3 /* LanguageListTableViewCell.swift in Sources */,
     2.1 --- a/pEpForiOS/UI/Settings/Setting/AccountSettings/AccountSettingsTableViewController.swift	Mon Aug 05 16:34:16 2019 +0200
     2.2 +++ b/pEpForiOS/UI/Settings/Setting/AccountSettings/AccountSettingsTableViewController.swift	Mon Aug 05 16:35:22 2019 +0200
     2.3 @@ -285,6 +285,12 @@
     2.4          if textField == passwordTextfield {
     2.5              passWordChanged = true
     2.6          }
     2.7 +        if textField == smtpPortTextfield || textField == imapPortTextfield {
     2.8 +
     2.9 +            return string.isDigits
    2.10 +
    2.11 +        }
    2.12 +
    2.13          return true
    2.14      }
    2.15