Skip to content

Commit

Permalink
Merge pull request #80 from mderuijter/dd-484-empty-custom-license-on…
Browse files Browse the repository at this point in the history
…ly-fields-before-saving-standard-license

DD-484 empty custom license only fields before saving standard license
  • Loading branch information
janvanmansum authored Jun 3, 2021
2 parents 8f1969c + ec4fd30 commit 336359d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/main/java/edu/harvard/iq/dataverse/DatasetPage.java
Original file line number Diff line number Diff line change
Expand Up @@ -3606,6 +3606,7 @@ private void setLicense(DatasetVersion editVersion) throws FetchException {
} else {
License license = licenseServiceBean.getById(licenseId);
terms.setLicense(license);
terms.clearCustomTermsVariables();
}
}

Expand Down
11 changes: 11 additions & 0 deletions src/main/java/edu/harvard/iq/dataverse/TermsOfUseAndAccess.java
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,17 @@ public edu.harvard.iq.dataverse.License getCC0() {
edu.harvard.iq.dataverse.License license = new edu.harvard.iq.dataverse.License("CC0", shortDescription, uri, iconUrl, true);
return license;
}

public void clearCustomTermsVariables(){
termsOfUse = null;
confidentialityDeclaration = null;
specialPermissions = null;
restrictions = null;
citationRequirements = null;
depositorRequirements = null;
conditions = null;
disclaimer = null;
}

/**
* @todo What does the GUI use for a default license? What does the "native"
Expand Down

0 comments on commit 336359d

Please sign in to comment.