Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Porting document type-based submission to JSPUI #117

Merged
merged 1 commit into from
Dec 7, 2012
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions dspace-jspui/src/main/webapp/submit/edit-metadata.jsp
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -1208,6 +1208,13 @@


// owning Collection ID for choice authority calls // owning Collection ID for choice authority calls
int collectionID = si.getSubmissionItem().getCollection().getID(); int collectionID = si.getSubmissionItem().getCollection().getID();

// Fetch the document type (dc.type)
String documentType = "";
if( (item.getMetadata("dc.type") != null) && (item.getMetadata("dc.type").length >0) )
{
documentType = item.getMetadata("dc.type")[0].value;
}
%> %>


<dspace:layout locbar="off" navbar="off" titlekey="jsp.submit.edit-metadata.title"> <dspace:layout locbar="off" navbar="off" titlekey="jsp.submit.edit-metadata.title">
Expand Down Expand Up @@ -1254,6 +1261,13 @@
for (int z = 0; z < inputs.length; z++) for (int z = 0; z < inputs.length; z++)
{ {
boolean readonly = false; boolean readonly = false;

// Omit fields not allowed for this document type
if(!inputs[z].isAllowedFor(documentType))
{
continue;
}

// ignore inputs invisible in this scope // ignore inputs invisible in this scope
if (!inputs[z].isVisible(scope)) if (!inputs[z].isVisible(scope))
{ {
Expand Down