mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-17 23:13:10 +00:00
Expose the vocabularyName to the submission form definition
This commit is contained in:
@@ -115,7 +115,8 @@ public class SubmissionFormConverter implements DSpaceConverter<DCInputSet, Subm
|
|||||||
String inputType = dcinput.getInputType();
|
String inputType = dcinput.getInputType();
|
||||||
|
|
||||||
SelectableMetadata selMd = new SelectableMetadata();
|
SelectableMetadata selMd = new SelectableMetadata();
|
||||||
if (authorityUtils.isChoice(dcinput.getSchema(), dcinput.getElement(), dcinput.getQualifier())) {
|
if (isChoice(dcinput.getSchema(), dcinput.getElement(), dcinput.getQualifier(),
|
||||||
|
dcinput.getPairsType(), dcinput.getVocabulary())) {
|
||||||
inputRest.setType(getPresentation(dcinput.getSchema(), dcinput.getElement(),
|
inputRest.setType(getPresentation(dcinput.getSchema(), dcinput.getElement(),
|
||||||
dcinput.getQualifier(), inputType));
|
dcinput.getQualifier(), inputType));
|
||||||
selMd.setControlledVocabulary(getAuthorityName(dcinput.getSchema(), dcinput.getElement(),
|
selMd.setControlledVocabulary(getAuthorityName(dcinput.getSchema(), dcinput.getElement(),
|
||||||
@@ -212,6 +213,14 @@ public class SubmissionFormConverter implements DSpaceConverter<DCInputSet, Subm
|
|||||||
return authorityUtils.isClosed(schema, element, qualifier);
|
return authorityUtils.isClosed(schema, element, qualifier);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private boolean isChoice(String schema, String element, String qualifier, String valuePairsName,
|
||||||
|
String vocabularyName) {
|
||||||
|
if (StringUtils.isNotBlank(valuePairsName) || StringUtils.isNotBlank(vocabularyName)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return authorityUtils.isChoice(schema, element, qualifier);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Class<DCInputSet> getModelClass() {
|
public Class<DCInputSet> getModelClass() {
|
||||||
return DCInputSet.class;
|
return DCInputSet.class;
|
||||||
|
@@ -160,7 +160,7 @@ public class SubmissionFormsControllerIT extends AbstractControllerIntegrationTe
|
|||||||
null, true,
|
null, true,
|
||||||
"Select the type(s) of content of the item. To select more than one value in the " +
|
"Select the type(s) of content of the item. To select more than one value in the " +
|
||||||
"list, you may have to hold down the \"CTRL\" or \"Shift\" key.",
|
"list, you may have to hold down the \"CTRL\" or \"Shift\" key.",
|
||||||
"dc.type")
|
null, "dc.type", "common_types")
|
||||||
)))
|
)))
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user