fixes
This commit is contained in:
parent
10fe33748f
commit
a212dff80f
@ -669,7 +669,7 @@
|
||||
|
||||
- (void)setWithJSON:(NSDictionary *)json delegateObject:(MVMCoreUIDelegateObject *)delegateObject additionalData:(NSDictionary *)additionalData {
|
||||
|
||||
self.validationRequired = [json boolForKey:@"validationRequired"];
|
||||
self.validationRequired = [json boolForKey:@"required"];
|
||||
self.requiredGroupsList = [json array:@"requiredGroups"];
|
||||
[FormValidator setupValidationWithMolecule:self delegate:delegateObject.formValidationProtocol];
|
||||
|
||||
|
||||
@ -19,6 +19,7 @@ import MVMCore
|
||||
// Form Validation
|
||||
var isRequired = false
|
||||
var fieldKey: String?
|
||||
var fieldValue: String?
|
||||
var groupName: String?
|
||||
var delegateObject: MVMCoreUIDelegateObject?
|
||||
|
||||
@ -407,6 +408,7 @@ import MVMCore
|
||||
guard let dictionary = json else { return }
|
||||
|
||||
groupName = dictionary.optionalStringForKey("groupName")
|
||||
fieldValue = dictionary.optionalStringForKey("value")
|
||||
if let fieldKey = dictionary[KeyFieldKey] as? String {
|
||||
self.fieldKey = fieldKey
|
||||
}
|
||||
@ -475,6 +477,6 @@ extension Checkbox: FormValidationFormFieldProtocol {
|
||||
}
|
||||
|
||||
public func formFieldValue() -> Any? {
|
||||
return NSNumber(value: isSelected)
|
||||
return isSelected ? fieldValue : nil
|
||||
}
|
||||
}
|
||||
|
||||
@ -423,6 +423,10 @@ const CGFloat SwitchShakeIntensity = 2;
|
||||
return UIAccessibilityTraitButton;
|
||||
}
|
||||
|
||||
- (NSString * _Nullable)formFieldGroupName {
|
||||
return [self.json string:@"groupName"];
|
||||
}
|
||||
|
||||
- (NSString *)accessibilityHint {
|
||||
return [MVMCoreUIUtility hardcodedStringWithKey:@"AccToggleHint"];
|
||||
}
|
||||
|
||||
@ -39,7 +39,7 @@
|
||||
@"textField" : MFTextField.class,
|
||||
@"digitTextField" : MFDigitTextField.class,
|
||||
@"checkbox" : Checkbox.class,
|
||||
@"checkboxWithLabelView" : CheckboxWithLabelView.class,
|
||||
@"checkboxWithLabel" : CheckboxWithLabelView.class,
|
||||
@"cornerLabels" : CornerLabels.class,
|
||||
@"progressbar": ProgressBar.class,
|
||||
@"circleProgress": GraphView.class,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user