Archived / Obsolete Documentation

Documentation in this space is no longer accurate.
Looking for official DSpace documentation? See all documentation

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Current »

<%@ page contentType="text/html;charset=UTF-8" %>

<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt"
    prefix="fmt" %>

<%@ page import="org.dspace.core.Context" %>
<%@ page import="org.dspace.app.webui.servlet.SubmissionController" %>
<%@ page import="org.dspace.app.webui.util.UIUtil" %>
<%@ page import="org.dspace.content.Item" %>
<%@ page import="org.apache.commons.lang.StringUtils" %>
<%@ page import="org.dspace.content.DCValue"%>
<%@ page import="org.dspace.app.util.SubmissionInfo" %>
<%@ page import="org.dspace.submit.AbstractProcessingStep" %>

<%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %>

<%
	// Obtain DSpace context
    Context context = UIUtil.obtainContext(request);

	// get submission information object
    SubmissionInfo subInfo = SubmissionController.getSubmissionInfo(context, request);
	Item item = subInfo.getSubmissionItem().getItem();

	// Retrieve error message
	Boolean identifierError = (Boolean)request.getAttribute("identifier.error");
	Boolean identifierInfo  = (Boolean)request.getAttribute("identifier.info");

	// Get search value, first check request
	String pmidValue = request.getParameter("identifier_pmid");

    // Obtain a PubMed ID from the item's metadata if we don't have one in the attributes
	if (item != null && StringUtils.isEmpty(pmidValue))
    {
		DCValue[] values = item.getMetadata("dc","identifier","pmid",Item.ANY);
		pmidValue = ((values == null || values.length < 1) ? "" : values[0].value);
	}

%>
<dspace:layout locbar="off"
               navbar="off"
               titlekey="jsp.submit.pubmed-prefill.title"
               nocache="true">

    <form action="<%= request.getContextPath() %>/submit" method="post" onkeydown="return disableEnterKey(event);">

        <jsp:include page="/submit/progressbar.jsp" />

        <%-- <h1>Submit: Describe Your Item</h1> --%>
		<h1><fmt:message key="jsp.submit.pubmed-prefill.heading"/></h1>
		<p><fmt:message key="jsp.submit.pubmed-prefill.elem1"/></p>
		<p><fmt:message key="jsp.submit.pubmed-prefill.elem4"/></p>
        <br/>

        <ul>
		<li>
        <%-- If you have a PubMed ID you can enter it below... --%>
        <fmt:message key="jsp.submit.pubmed-prefill.elem2"/><br><br>
            <table class="miscTable">
<%
            if ((identifierError != null) && identifierError.booleanValue())
            {
%>				<tr>
	 		 		<td>
           		  		 <span class="submitFormWarn"><fmt:message key="jsp.submit.pubmed-prefill.error.identifier"/></span>
					</td>
				</tr>
<%
            }

            if ((identifierInfo !=null) && identifierInfo.booleanValue())
            {
%>
				<tr>
					<td>
						 <span class="submitFormWarn"><fmt:message key="jsp.submit.pubmed-prefill.info.identifier"/></span>
					</td>
				</tr>
<%
            }
%>
			    <tr><td align="center">
                    <table border="0"><tbody>
                        <tr>
                            <td class="submitFormValue" align="right" valign="middle">
                                <fmt:message key="jsp.submit.pubmed-prefill.pubmid.label" />
                            </td>
                            <td class="submitFormValue" align="left" valign="middle">
                                <input name="identifier_pmid" type="text"   value="<%= (pmidValue == null ? "":pmidValue) %>" onchange="disableInput(this,identifier_doi)" />
                                <input name="original_pmid"   type="hidden" value="<%= (pmidValue == null ? "":pmidValue) %>" />
                            </td>
                        </tr>
                    </tbody></table>
                </td></tr>
            </table>
<%
            // If we are prefilling the PubMed ID (ie. the submission or item has a PMID already
            // output a 'force refresh' checkbox - we won't overwrite the existing metadata on submission
            // unless this is selected
            if (!StringUtils.isEmpty(pmidValue))
			{
%>
				<p>
					<input name="force_refresh" type="checkbox" value="true" />
					<fmt:message key="jsp.submit.pubmed-prefill.forcerefresh.label" />
				</p>
<%
			}
%>
            <br/>
            </li>
	        <li>
	        <%-- If you want to enter your own metadata or do not have one of the above IDs then simply use the "Next&gt;" button below to go straight to the submission form. --%>
			<fmt:message key="jsp.submit.pubmed-prefill.elem3"/><br/><br/>
			</li>
            </ul>


		<%-- Hidden fields needed for SubmissionController servlet to know which step is next--%>
        <%= SubmissionController.getSubmissionParameters(context, request) %>
        <center>
            <table border="0" width="80%">
                <tr>
					<td width="100%">&nbsp;</td>
				<%  //if not first step, show "Previous" button
					if(!SubmissionController.isFirstStep(request, subInfo))
					{ %>
                    <td>
                        <input type="submit" name="<%=AbstractProcessingStep.PREVIOUS_BUTTON%>" value="<fmt:message key="jsp.submit.general.previous"/>" />
                    </td>
				<%  } %>
                    <td>
                        <input type="submit" name="<%=AbstractProcessingStep.NEXT_BUTTON%>" value="<fmt:message key="jsp.submit.general.next"/>" />
                    </td>
                    <td>&nbsp;&nbsp;&nbsp;</td>
                    <td align="right">
                        <input type="submit" name="<%=AbstractProcessingStep.CANCEL_BUTTON%>" value="<fmt:message key="jsp.submit.general.cancel-or-save.button"/>" />
                    </td>
                </tr>
            </table>
        </center>





    </form>
<script language="javascript">
function disableInput(activeField, disabledField){
	if(activeField.value !=''){
		disabledField.value ='';
		disabledField.disabled = true;
	}else{
		disabledField.disabled = false;
	}
}
</script>
</dspace:layout>

  • No labels