From c8611ca83ad96c8f4286759e8d56f2129cbe3ff3 Mon Sep 17 00:00:00 2001 From: "Suresh, Kamlesh" Date: Wed, 4 Sep 2019 14:39:19 -0400 Subject: [PATCH] fixes --- MVMCoreUI/Molecules/RadioButton.swift | 4 ++-- MVMCoreUI/Molecules/RadioButtonModel.swift | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/MVMCoreUI/Molecules/RadioButton.swift b/MVMCoreUI/Molecules/RadioButton.swift index b95b2ab7..53fbaefc 100644 --- a/MVMCoreUI/Molecules/RadioButton.swift +++ b/MVMCoreUI/Molecules/RadioButton.swift @@ -22,7 +22,7 @@ import UIKit var radioButtonModel: RadioButtonModel? - lazy var groupName: String? = { + lazy var radioGroupName: String? = { [unowned self] in return json?.optionalStringForKey("radioGroupName") ?? json?.optionalStringForKey("fieldKey") }() @@ -117,7 +117,7 @@ import UIKit } public func formFieldGroupName() -> String? { - return json?.optionalStringForKey("radioGroupName") + return json?.optionalStringForKey("groupName") } public func formFieldValue() -> Any? { diff --git a/MVMCoreUI/Molecules/RadioButtonModel.swift b/MVMCoreUI/Molecules/RadioButtonModel.swift index 812ea36a..68e95790 100644 --- a/MVMCoreUI/Molecules/RadioButtonModel.swift +++ b/MVMCoreUI/Molecules/RadioButtonModel.swift @@ -15,7 +15,7 @@ import UIKit private var fieldGroupName: String? public static func setupForRadioButtonGroup(radioButton: RadioButton, formValidator: FormValidator?) -> RadioButtonModel { - guard let groupName = radioButton.groupName, + guard let groupName = radioButton.radioGroupName, let formValidator = formValidator else { return RadioButtonModel() }