gd-sprest-bs 10.2.6 → 10.2.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -63,6 +63,18 @@ var renderDisplay = function (fieldName, props) {
|
|
|
63
63
|
var html = props.info.fieldValuesAsHtml[fieldName] || props.info.fieldValuesAsHtml[fieldName.replace(/\_/g, "_x005f_")] || "";
|
|
64
64
|
// Ensure the field exists
|
|
65
65
|
if (field == null) {
|
|
66
|
+
// See if a value was found
|
|
67
|
+
if (value || html) {
|
|
68
|
+
// Return a read-only control
|
|
69
|
+
return {
|
|
70
|
+
data: value || html,
|
|
71
|
+
isDisabled: true,
|
|
72
|
+
label: fieldName,
|
|
73
|
+
name: fieldName,
|
|
74
|
+
type: core_1.Components.FormControlTypes.Readonly,
|
|
75
|
+
value: value || html
|
|
76
|
+
};
|
|
77
|
+
}
|
|
66
78
|
// Log
|
|
67
79
|
console.warn("[List Form] Field '" + fieldName + "' does not exist. Check the list or query.");
|
|
68
80
|
return control;
|
|
@@ -800,6 +812,11 @@ exports.ListForm.renderEditForm = function (props) {
|
|
|
800
812
|
}
|
|
801
813
|
// Get the field value
|
|
802
814
|
var fieldValue = formField.getValue();
|
|
815
|
+
// See if an event exists
|
|
816
|
+
if (formField.controlProps.onGetValue) {
|
|
817
|
+
// Update the value
|
|
818
|
+
fieldValue.value = formField.controlProps.onGetValue(formField.controlProps);
|
|
819
|
+
}
|
|
803
820
|
// Set the item value
|
|
804
821
|
values[fieldValue.name] = fieldValue.value;
|
|
805
822
|
// See if this is the file leaf ref
|
|
@@ -892,6 +909,12 @@ exports.ListForm.renderEditForm = function (props) {
|
|
|
892
909
|
}
|
|
893
910
|
// Validate the form field and update the status flag
|
|
894
911
|
var controlIsValid = formField.isValid();
|
|
912
|
+
// See if there is a custom method
|
|
913
|
+
if (formField.controlProps.onValidate) {
|
|
914
|
+
// Call the event
|
|
915
|
+
controlIsValid = formField.controlProps.onValidate(formField.controlProps, formField.getValue());
|
|
916
|
+
}
|
|
917
|
+
// Update the flag
|
|
895
918
|
isValid = isValid && controlIsValid;
|
|
896
919
|
}
|
|
897
920
|
// Parse the custom controls
|