mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-17 06:53:09 +00:00
Fix tag closure in edit-metadata submission
This commit is contained in:
@@ -145,21 +145,27 @@
|
||||
|
||||
String confidenceSymbol = confidenceValue == unknownConfidence ? "blank" : Choices.getConfidenceText(confidenceValue).toLowerCase();
|
||||
String confIndID = fieldInput+"_confidence_indicator_id";
|
||||
|
||||
if (authority)
|
||||
{
|
||||
sb.append(" <img id=\""+confIndID+"\" title=\"")
|
||||
{
|
||||
sb.append("<span class=\"col-md-1\">")
|
||||
.append(" <img id=\""+confIndID+"\" title=\"")
|
||||
.append(LocaleSupport.getLocalizedMessage(pageContext, "jsp.authority.confidence.description."+confidenceSymbol))
|
||||
.append("\" class=\"ds-authority-confidence cf-")
|
||||
.append("\" class=\"ds-authority-confidence cf-")
|
||||
// set confidence to cf-blank if authority is empty
|
||||
.append(authorityValue==null||authorityValue.length()==0 ? "blank" : confidenceSymbol)
|
||||
.append(" \" src=\"").append(contextPath).append("/image/confidence/invisible.gif\" />")
|
||||
.append("<input type=\"text\" value=\"").append(authorityValue!=null?authorityValue:"")
|
||||
.append("</span>");
|
||||
sb.append("<span class=\"col-md-2\">")
|
||||
.append("<input class=\"form-control\" type=\"text\" value=\"").append(authorityValue!=null?authorityValue:"")
|
||||
.append("\" id=\"").append(authorityName)
|
||||
.append("\" name=\"").append(authorityName).append("\" class=\"ds-authority-value\"/>")
|
||||
.append("<input type=\"hidden\" value=\"").append(confidenceSymbol)
|
||||
.append("\" id=\"").append(confidenceName)
|
||||
.append("\" name=\"").append(confidenceName)
|
||||
.append("\" class=\"ds-authority-confidence-input\"/>");
|
||||
.append("\" class=\"ds-authority-confidence-input\"/>")
|
||||
.append("</span>");
|
||||
|
||||
}
|
||||
|
||||
// suggest is not supported for name input type
|
||||
@@ -216,7 +222,8 @@
|
||||
{
|
||||
if (inputBlock != null)
|
||||
sb.insert(0, inputBlock);
|
||||
sb.append("<button name=\"").append(fieldInput).append("_lookup\" ")
|
||||
sb.append("<span class=\"col-md-1\">")
|
||||
.append("<button class=\"form-control\" name=\"").append(fieldInput).append("_lookup\" ")
|
||||
.append("onclick=\"javascript: return DSpaceChoiceLookup('")
|
||||
.append(contextPath).append("/tools/lookup.jsp','")
|
||||
.append(fieldName).append("','edit_metadata','")
|
||||
@@ -226,8 +233,9 @@
|
||||
.append(String.valueOf(isName)).append(",false);\"")
|
||||
.append(" title=\"")
|
||||
.append(LocaleSupport.getLocalizedMessage(pageContext, "jsp.tools.lookup.lookup"))
|
||||
.append(" src=\""+contextPath+"/image/authority/zoom.png\"><span class=\".glyphicon .glyphicon-search\"></span>");
|
||||
.append("\"><span class=\"glyphicon glyphicon-search\"></span></button></span>");
|
||||
}
|
||||
|
||||
}
|
||||
else if (inputBlock != null)
|
||||
sb = inputBlock;
|
||||
@@ -282,7 +290,7 @@
|
||||
conf = unknownConfidence;
|
||||
}
|
||||
|
||||
sb.append("<span class=\"col-md-5\"><input placeholder=\"")
|
||||
sb.append("<span class=\"col-md-4\"><input placeholder=\"")
|
||||
.append(Utils.addEntities(LocaleSupport.getLocalizedMessage(pageContext, "jsp.submit.edit-metadata.lastname")))
|
||||
.append("\" class=\"form-control\" type=\"text\" name=\"")
|
||||
.append(last.toString())
|
||||
@@ -293,7 +301,7 @@
|
||||
}
|
||||
sb.append("value=\"")
|
||||
.append(dpn.getLastName().replaceAll("\"", """)) // Encode "
|
||||
.append("\"/></span><span class=\"col-md-5\"><input placeholder=\"")
|
||||
.append("\"/></span><span class=\"col-md-4\"><input placeholder=\"")
|
||||
.append(Utils.addEntities(LocaleSupport.getLocalizedMessage(pageContext, "jsp.submit.edit-metadata.firstname")))
|
||||
.append("\" class=\"form-control\" type=\"text\" name=\"")
|
||||
.append(first.toString())
|
||||
@@ -314,7 +322,7 @@
|
||||
.append(' ')
|
||||
.append(Utils.addEntities(dpn.getFirstNames()));
|
||||
// put a remove button next to filled in values
|
||||
sb.append("<input class=\"btn btn-danger col-md-2\" type=\"submit\" name=\"submit_")
|
||||
sb.append("<input class=\"btn btn-danger pull-right col-md-2\" type=\"submit\" name=\"submit_")
|
||||
.append(fieldName)
|
||||
.append("_remove_")
|
||||
.append(i)
|
||||
@@ -325,7 +333,7 @@
|
||||
else if (repeatable && !readonly && i == fieldCount - 1)
|
||||
{
|
||||
// put a 'more' button next to the last space
|
||||
sb.append("<input class=\"btn btn-default col-md-2\" type=\"submit\" name=\"submit_")
|
||||
sb.append("<input class=\"btn btn-default pull-right col-md-2\" type=\"submit\" name=\"submit_")
|
||||
.append(fieldName)
|
||||
.append("_add\" value=\"")
|
||||
.append(LocaleSupport.getLocalizedMessage(pageContext, "jsp.submit.edit-metadata.button.add"))
|
||||
@@ -1126,6 +1134,12 @@
|
||||
}
|
||||
%>
|
||||
|
||||
<c:set var="dspace.layout.head.last" scope="request">
|
||||
<script type="text/javascript" src="<%= request.getContextPath() %>/static/js/scriptaculous/prototype.js"></script>
|
||||
<script type="text/javascript" src="<%= request.getContextPath() %>/static/js/scriptaculous/builder.js"></script>
|
||||
<script type="text/javascript" src="<%= request.getContextPath() %>/static/js/scriptaculous/control.js"></script>
|
||||
<script type="text/javascript" src="<%= request.getContextPath() %>/static/js/scriptaculous/effects.js"></script>
|
||||
</c:set>
|
||||
<dspace:layout style="submission" locbar="off" navbar="off" titlekey="jsp.submit.edit-metadata.title">
|
||||
|
||||
<%
|
||||
|
@@ -121,7 +121,7 @@
|
||||
// put up a SELECT element containing all choices
|
||||
if ("select".equals(cam.getPresentation(fieldName)))
|
||||
{
|
||||
sb.append("<select id=\"").append(fieldNameIdx)
|
||||
sb.append("<select class=\"form-control\" id=\"").append(fieldNameIdx)
|
||||
.append("\" name=\"").append(fieldNameIdx)
|
||||
.append("\" size=\"1\">");
|
||||
Choices cs = cam.getMatches(fieldName, dcv.value, collectionID, 0, 0, null);
|
||||
@@ -142,7 +142,7 @@
|
||||
else
|
||||
{
|
||||
String confidenceIndicator = "indicator_"+confidenceName;
|
||||
sb.append("<textarea id=\"").append(fieldNameIdx).append("\" name=\"").append(fieldNameIdx)
|
||||
sb.append("<textarea class=\"form-control\" id=\"").append(fieldNameIdx).append("\" name=\"").append(fieldNameIdx)
|
||||
.append("\" rows=\"3\" cols=\"50\">")
|
||||
.append(dcv.value).append("</textarea>\n<br/>\n");
|
||||
|
||||
@@ -153,7 +153,7 @@
|
||||
.append(LocaleSupport.getLocalizedMessage(pageContext, "jsp.authority.confidence.description."+confidenceSymbol))
|
||||
.append("\" class=\"ds-authority-confidence cf-"+ confidenceSymbol)
|
||||
.append("\" src=\"").append(contextPath).append("/image/confidence/invisible.gif\" />")
|
||||
.append("<input type=\"text\" readonly value=\"")
|
||||
.append("<input type=\"text\" readonly value=\"")
|
||||
.append(dcv.authority != null ? dcv.authority : "")
|
||||
.append("\" id=\"").append(authorityName)
|
||||
.append("\" onChange=\"javascript: return DSpaceAuthorityOnChange(this, '")
|
||||
@@ -188,6 +188,10 @@
|
||||
%>
|
||||
|
||||
<c:set var="dspace.layout.head.last" scope="request">
|
||||
<script type="text/javascript" src="<%= request.getContextPath() %>/static/js/scriptaculous/prototype.js"></script>
|
||||
<script type="text/javascript" src="<%= request.getContextPath() %>/static/js/scriptaculous/builder.js"></script>
|
||||
<script type="text/javascript" src="<%= request.getContextPath() %>/static/js/scriptaculous/control.js"></script>
|
||||
<script type="text/javascript" src="<%= request.getContextPath() %>/static/js/scriptaculous/effects.js"></script>
|
||||
<script type="text/javascript" src="<%= request.getContextPath() %>/dspace-admin/js/bitstream-ordering.js"></script>
|
||||
</c:set>
|
||||
|
||||
@@ -661,17 +665,14 @@
|
||||
%>
|
||||
</table>
|
||||
</div>
|
||||
<p> </p>
|
||||
|
||||
|
||||
<%-- <p align="center"><input type="submit" name="submit_addbitstream" value="Add Bitstream"></p> --%>
|
||||
<center>
|
||||
<table width="70%" align="center">
|
||||
<tr>
|
||||
<td>
|
||||
<div class="btn-group col-md-12">
|
||||
<%
|
||||
if (bCreateBits) {
|
||||
%>
|
||||
<input class="btn btn-primary" type="submit" name="submit_addbitstream" value="<fmt:message key="jsp.tools.edit-item-form.addbit.button"/>"/>
|
||||
if (bCreateBits) {
|
||||
%>
|
||||
<input class="btn btn-primary col-md-2" type="submit" name="submit_addbitstream" value="<fmt:message key="jsp.tools.edit-item-form.addbit.button"/>"/>
|
||||
<% }
|
||||
if(breOrderBitstreams){
|
||||
%>
|
||||
@@ -685,26 +686,23 @@
|
||||
Bundle[] ccBundle = item.getBundles("CC-LICENSE");
|
||||
s = ccBundle.length > 0 ? LocaleSupport.getLocalizedMessage(pageContext, "jsp.tools.edit-item-form.replacecc.button") : LocaleSupport.getLocalizedMessage(pageContext, "jsp.tools.edit-item-form.addcc.button");
|
||||
%>
|
||||
<input class="btn btn-primary" type="submit" name="submit_addcc" value="<%= s %>" />
|
||||
<input class="btn btn-primary col-md-2" type="submit" name="submit_addcc" value="<%= s %>" />
|
||||
<input type="hidden" name="handle" value="<%= ConfigurationManager.getProperty("handle.prefix") %>"/>
|
||||
<input type="hidden" name="item_id" value="<%= item.getID() %>"/>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center>
|
||||
|
||||
<%
|
||||
}
|
||||
%>
|
||||
|
||||
|
||||
<p> </p>
|
||||
|
||||
<input type="hidden" name="item_id" value="<%= item.getID() %>"/>
|
||||
<input type="hidden" name="action" value="<%= EditItemServlet.UPDATE_ITEM %>"/>
|
||||
<div class="btn-group pull-right col-md-6 col-md-offset-5">
|
||||
|
||||
<%-- <input type="submit" name="submit" value="Update" /> --%>
|
||||
<input class="btn btn-success col-md-6" type="submit" name="submit" value="<fmt:message key="jsp.tools.general.update"/>" />
|
||||
<input class="btn btn-success pull-right col-md-3" type="submit" name="submit" value="<fmt:message key="jsp.tools.general.update"/>" />
|
||||
<%-- <input type="submit" name="submit_cancel" value="Cancel" /> --%>
|
||||
<input class="btn btn-default col-md-6" type="submit" name="submit_cancel" value="<fmt:message key="jsp.tools.general.cancel"/>" />
|
||||
<input class="btn btn-default pull-right col-md-3" type="submit" name="submit_cancel" value="<fmt:message key="jsp.tools.general.cancel"/>" />
|
||||
</div>
|
||||
</form>
|
||||
</dspace:layout>
|
||||
|
Reference in New Issue
Block a user