mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-07 01:54:22 +00:00
DS-1736 Impossible remove the Creative Commons in JSPUI / jump using the progress bar
also restylish CCLicenseStep using bootstrap
This commit is contained in:
@@ -100,7 +100,8 @@ public class CCLicenseStep extends AbstractProcessingStep
|
|||||||
session.setAttribute("inProgress", "TRUE");
|
session.setAttribute("inProgress", "TRUE");
|
||||||
// check what submit button was pressed in User Interface
|
// check what submit button was pressed in User Interface
|
||||||
String buttonPressed = Util.getSubmitButton(request, NEXT_BUTTON);
|
String buttonPressed = Util.getSubmitButton(request, NEXT_BUTTON);
|
||||||
if (buttonPressed.equals("submit_grant"))
|
if ("submit_grant".equalsIgnoreCase(buttonPressed)
|
||||||
|
|| "submit_no_cc".equalsIgnoreCase(buttonPressed))
|
||||||
{
|
{
|
||||||
return processCC(context, request, response, subInfo);
|
return processCC(context, request, response, subInfo);
|
||||||
}
|
}
|
||||||
|
@@ -25,5 +25,5 @@
|
|||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
the_form = parent.document.getElementById("license_form");
|
the_form = parent.document.getElementById("license_form");
|
||||||
the_form.cc_license_url.value = "<%= cc_license_url %>";
|
the_form.cc_license_url.value = "<%= cc_license_url %>";
|
||||||
the_form.submit();
|
parent.document.getElementById("submit_grant").click();
|
||||||
</script>
|
</script>
|
||||||
|
@@ -62,7 +62,8 @@
|
|||||||
licenseURL = CreativeCommons.getLicenseURL(subInfo.getSubmissionItem().getItem());
|
licenseURL = CreativeCommons.getLicenseURL(subInfo.getSubmissionItem().getItem());
|
||||||
%>
|
%>
|
||||||
|
|
||||||
<dspace:layout locbar="off"
|
<dspace:layout style="submission"
|
||||||
|
locbar="off"
|
||||||
navbar="off"
|
navbar="off"
|
||||||
titlekey="jsp.submit.creative-commons.title"
|
titlekey="jsp.submit.creative-commons.title"
|
||||||
nocache="true">
|
nocache="true">
|
||||||
@@ -73,7 +74,6 @@
|
|||||||
|
|
||||||
<%-- <h1>Submit: Use a Creative Commons License</h1> --%>
|
<%-- <h1>Submit: Use a Creative Commons License</h1> --%>
|
||||||
<h1><fmt:message key="jsp.submit.creative-commons.heading"/></h1>
|
<h1><fmt:message key="jsp.submit.creative-commons.heading"/></h1>
|
||||||
<br />
|
|
||||||
|
|
||||||
<%
|
<%
|
||||||
if (licenseExists)
|
if (licenseExists)
|
||||||
@@ -81,13 +81,13 @@
|
|||||||
%>
|
%>
|
||||||
<%-- <p>You have already chosen a Creative Commons license and added it to this item.
|
<%-- <p>You have already chosen a Creative Commons license and added it to this item.
|
||||||
You may:</p> --%>
|
You may:</p> --%>
|
||||||
<p><fmt:message key="jsp.submit.creative-commons.info1"/></p>
|
<p class="help-block"><fmt:message key="jsp.submit.creative-commons.info1"/></p>
|
||||||
<%-- <ul>
|
<%-- <ul>
|
||||||
<li>Press the 'Next' button below to <em>keep</em> the license previously chosen.</li>
|
<li>Press the 'Next' button below to <em>keep</em> the license previously chosen.</li>
|
||||||
<li>Press the 'Skip Creative Commons' button below to <em>remove</em> the current choice, and forego a Creative Commons license.</li>
|
<li>Press the 'Skip Creative Commons' button below to <em>remove</em> the current choice, and forego a Creative Commons license.</li>
|
||||||
<li>Complete the selection process below to <em>replace</em> the current choice.</li>
|
<li>Complete the selection process below to <em>replace</em> the current choice.</li>
|
||||||
</ul> --%>
|
</ul> --%>
|
||||||
<ul>
|
<ul class="alert alert-info">
|
||||||
<li><fmt:message key="jsp.submit.creative-commons.choice1"/></li>
|
<li><fmt:message key="jsp.submit.creative-commons.choice1"/></li>
|
||||||
<li><fmt:message key="jsp.submit.creative-commons.choice2"/></li>
|
<li><fmt:message key="jsp.submit.creative-commons.choice2"/></li>
|
||||||
<li><fmt:message key="jsp.submit.creative-commons.choice3"/></li>
|
<li><fmt:message key="jsp.submit.creative-commons.choice3"/></li>
|
||||||
@@ -113,37 +113,28 @@
|
|||||||
<%= SubmissionController.getSubmissionParameters(context, request) %>
|
<%= SubmissionController.getSubmissionParameters(context, request) %>
|
||||||
|
|
||||||
<input type="hidden" name="cc_license_url" value="<%=licenseURL %>" />
|
<input type="hidden" name="cc_license_url" value="<%=licenseURL %>" />
|
||||||
<input type="hidden" name="submit_grant" value="I Grant the License" />
|
<input type="submit" id="submit_grant" name="submit_grant" value="submit_grant" style="display: none;" />
|
||||||
<center>
|
<%
|
||||||
<table border="0" width="80%">
|
int numButton = 2 + (!SubmissionController.isFirstStep(request, subInfo)?1:0) + (licenseExists?1:0);
|
||||||
<tr>
|
|
||||||
<td width="100%"> </td>
|
%>
|
||||||
|
<div class="row col-md-<%= 2*numButton %> pull-right btn-group">
|
||||||
<% //if not first step, show "Previous" button
|
<% //if not first step, show "Previous" button
|
||||||
if(!SubmissionController.isFirstStep(request, subInfo))
|
if(!SubmissionController.isFirstStep(request, subInfo))
|
||||||
{ %>
|
{ %>
|
||||||
<td>
|
<input class="btn btn-default col-md-<%= 12 / numButton %>" type="submit" name="<%=AbstractProcessingStep.PREVIOUS_BUTTON%>" value="<fmt:message key="jsp.submit.general.previous"/>" />
|
||||||
<input type="submit" name="<%=AbstractProcessingStep.PREVIOUS_BUTTON%>" value="<fmt:message key="jsp.submit.general.previous"/>" />
|
|
||||||
</td>
|
|
||||||
<% } %>
|
<% } %>
|
||||||
|
|
||||||
|
<input class="btn btn-default col-md-<%= 12 / numButton %>" type="submit" name="<%=AbstractProcessingStep.CANCEL_BUTTON%>" value="<fmt:message key="jsp.submit.general.cancel-or-save.button"/>"/>
|
||||||
|
<input class="btn btn-warning col-md-<%= 12 / numButton %>" type="submit" name="submit_no_cc" value="<fmt:message key="jsp.submit.creative-commons.skip.button"/>"/>
|
||||||
<%
|
<%
|
||||||
if (licenseExists)
|
if (licenseExists)
|
||||||
{
|
{
|
||||||
%>
|
%>
|
||||||
<td>
|
<input class="btn btn-primary col-md-<%= 12 / numButton %>" type="submit" name="<%=AbstractProcessingStep.NEXT_BUTTON%>" value="<fmt:message key="jsp.submit.general.next"/>" />
|
||||||
<input type="submit" name="<%=AbstractProcessingStep.NEXT_BUTTON%>" value="<fmt:message key="jsp.submit.general.next"/>" />
|
|
||||||
</td>
|
|
||||||
<%
|
<%
|
||||||
}
|
}
|
||||||
%>
|
%>
|
||||||
<td>
|
</div>
|
||||||
<input type="submit" name="submit_no_cc" value="<fmt:message key="jsp.submit.creative-commons.skip.button"/>"/>
|
|
||||||
</td>
|
|
||||||
<td> </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>
|
</form>
|
||||||
</dspace:layout>
|
</dspace:layout>
|
||||||
|
Reference in New Issue
Block a user