DS-2604 add right way to manage selected value from CC dropdown, change admin button message for add/edit CC, fix resolution of conflict

This commit is contained in:
Luigi Andrea Pascarelli
2016-09-22 21:55:43 +02:00
parent 9086a1ecf2
commit 5ba08ade7f
4 changed files with 39 additions and 27 deletions

View File

@@ -175,10 +175,10 @@ public class CCLicenseStep extends AbstractProcessingStep
map.put("sampling", request.getParameter("sampling_chooser"));
}
map.put("jurisdiction", jurisdiction);
CCLookup ccLookup = new CCLookup();
LicenseMetadataValue uriField = creativeCommonsService.getCCField("uri");
LicenseMetadataValue nameField = creativeCommonsService.getCCField("name");
ccLookup.issue(licenseclass, map, configurationService.getProperty("cc.license.locale"));
Item item = subInfo.getSubmissionItem().getItem();
if (licenseclass.equals("webui.Submission.submit.CCLicenseStep.no_license"))
{
@@ -189,13 +189,16 @@ public class CCLicenseStep extends AbstractProcessingStep
removeRequiredAttributes(session);
return STATUS_COMPLETE;
}
else if (StringUtils.isBlank(licenseclass) || licenseclass.equals("webui.Submission.submit.CCLicenseStep.select_change"))
} else if (StringUtils.isBlank(licenseclass) || licenseclass.equals("webui.Submission.submit.CCLicenseStep.select_change"))
{
removeRequiredAttributes(session);
return STATUS_COMPLETE;
}
else if (ccLookup.isSuccess())
CCLookup ccLookup = new CCLookup();
ccLookup.issue(licenseclass, map, configurationService.getProperty("cc.license.locale"));
if (ccLookup.isSuccess())
{
creativeCommonsService.removeLicense(context, uriField, nameField, item);