mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-08 02:24:11 +00:00
Merge branch 'master' into metadata-and-relationships-combined-in-submission
This commit is contained in:
@@ -110,12 +110,12 @@ export class FormBuilderService extends DynamicFormService {
|
||||
if (isString(controlValue)) {
|
||||
return new FormFieldMetadataValueObject(controlValue, controlLanguage, null, null, controlModelIndex);
|
||||
} else if (isObject(controlValue)) {
|
||||
const authority = controlValue.authority || controlValue.id || null;
|
||||
const place = controlModelIndex || controlValue.place;
|
||||
const authority = (controlValue as any).authority || (controlValue as any).id || null;
|
||||
const place = controlModelIndex || (controlValue as any).place;
|
||||
if (isNgbDateStruct(controlValue)) {
|
||||
return new FormFieldMetadataValueObject(controlValue, controlLanguage, authority, controlValue, place);
|
||||
return new FormFieldMetadataValueObject(controlValue, controlLanguage, authority, controlValue as any, place);
|
||||
} else {
|
||||
return new FormFieldMetadataValueObject(controlValue.value, controlLanguage, authority, controlValue.display, place, controlValue.confidence);
|
||||
return new FormFieldMetadataValueObject((controlValue as any).value, controlLanguage, authority, (controlValue as any).display, place, (controlValue as any).confidence);
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -175,13 +175,13 @@ export class FormBuilderService extends DynamicFormService {
|
||||
}
|
||||
}
|
||||
});
|
||||
})
|
||||
});
|
||||
} else if (isNotUndefined((controlModel as any).value) && isNotEmpty((controlModel as any).value)) {
|
||||
const controlArrayValue = [];
|
||||
// Normalize control value as an array of FormFieldMetadataValueObject
|
||||
const values = Array.isArray((controlModel as any).value) ? (controlModel as any).value : [(controlModel as any).value];
|
||||
values.forEach((controlValue) => {
|
||||
controlArrayValue.push(normalizeValue(controlModel, controlValue, controlModelIndex))
|
||||
controlArrayValue.push(normalizeValue(controlModel, controlValue, controlModelIndex));
|
||||
});
|
||||
|
||||
if (controlId && iterateResult.hasOwnProperty(controlId) && isNotNull(iterateResult[controlId])) {
|
||||
|
Reference in New Issue
Block a user