Skip to content

Commit 911a405

Browse files
committed
prevent users from choosing archived forms
1 parent a2a458f commit 911a405

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ All notable changes to this project will be documented in this file.
33
Adheres to [Semantic Versioning](http://semver.org/).
44

55
---
6+
## 3.0.3
7+
8+
##### Bug Fixes
9+
* archived forms are no longer shown in the form picker
10+
611
## 3.0.2
712

813
##### Bug Fixes

MAGE.xcodeproj/project.pbxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3578,7 +3578,7 @@
35783578
GCC_PREFIX_HEADER = "Mage/MAGE-Prefix.pch";
35793579
INFOPLIST_FILE = "Mage/MAGE-Info.plist";
35803580
IPHONEOS_DEPLOYMENT_TARGET = 13.4;
3581-
MARKETING_VERSION = 3.0.2;
3581+
MARKETING_VERSION = 3.0.3;
35823582
OTHER_LDFLAGS = "$(inherited)";
35833583
PRODUCT_BUNDLE_IDENTIFIER = mil.nga.mage;
35843584
PRODUCT_NAME = MAGE;
@@ -3612,7 +3612,7 @@
36123612
GCC_PREFIX_HEADER = "Mage/MAGE-Prefix.pch";
36133613
INFOPLIST_FILE = "Mage/MAGE-Info.plist";
36143614
IPHONEOS_DEPLOYMENT_TARGET = 13.4;
3615-
MARKETING_VERSION = 3.0.2;
3615+
MARKETING_VERSION = 3.0.3;
36163616
OTHER_LDFLAGS = "$(inherited)";
36173617
PRODUCT_BUNDLE_IDENTIFIER = mil.nga.mage;
36183618
PRODUCT_NAME = MAGE;

Mage/ObservationEditCoordinator.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,9 @@ extension ObservationEditCoordinator: ObservationEditCardDelegate {
249249
}
250250

251251
func addForm() {
252-
let forms: [[String: AnyHashable]] = event.forms as! [[String : AnyHashable]];
252+
let forms: [[String: AnyHashable]] = (event.forms as! [[String : AnyHashable]]).filter { form in
253+
return !(form[FormKey.archived.rawValue] as? Bool ?? false)
254+
};
253255
let formPicker: FormPickerViewController = FormPickerViewController(delegate: self, forms: forms, observation: observation, scheme: self.scheme);
254256
formPicker.applyTheme(withScheme: scheme);
255257
bottomSheet = MDCBottomSheetController(contentViewController: formPicker);

0 commit comments

Comments
 (0)