Skip to content

Commit

Permalink
Merge pull request IQSS#10720
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulBoon committed Oct 21, 2024
1 parent 3eb3494 commit 2cdd7a6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -317,8 +317,8 @@ private void msg(String s){
}

public boolean isVersionDefaultCustomTerms(DatasetVersion datasetVersion) {

if (datasetVersion.getId() != null) {
//SEK - belt and suspenders here, but this is where the bug 10719 first manifested
if (datasetVersion != null && datasetVersion.getId() != null) {
try {
TermsOfUseAndAccess toua = (TermsOfUseAndAccess) em.createNamedQuery("TermsOfUseAndAccess.findByDatasetVersionIdAndDefaultTerms")
.setParameter("id", datasetVersion.getId()).setParameter("defaultTerms", TermsOfUseAndAccess.DEFAULT_NOTERMS).getSingleResult();
Expand Down
2 changes: 1 addition & 1 deletion src/main/webapp/dataset-license-terms.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
<h:outputText value="#{bundle['file.dataFilesTab.terms.list.license.view.description']}" escape="false"/>
</p>
</ui:fragment>
<ui:fragment rendered="#{empty editMode and empty termsOfUseAndAccess.license}">
<ui:fragment rendered="#{datasetPage == true and empty editMode and empty termsOfUseAndAccess.license}">
<p>
<h:outputText value="#{DatasetUtil:getLicenseName(DatasetPage.workingVersion).concat(' ')}" escape="false"/>
<h:outputText rendered="#{!datasetVersionServiceBean.isVersionDefaultCustomTerms(DatasetPage.workingVersion)}" value="#{bundle['file.dataFilesTab.terms.list.license.customterms.txt']}" escape="false"/>
Expand Down
2 changes: 1 addition & 1 deletion src/main/webapp/template.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
</ui:fragment>
<!-- Create/Save Dataset Button Panel -->
<div class="button-block" jsf:rendered="#{!empty TemplatePage.editMode}">
<p:commandButton styleClass="btn btn-default" action="#{TemplatePage.save('Terms')}" update=":@form,messagePanel"
<p:commandButton styleClass="btn btn-default" action="#{TemplatePage.save('Terms')}" update="@form,messagePanel"
value="#{bundle['dataset.create.add.terms']}"
rendered="#{TemplatePage.editMode == 'CREATE'}">
<f:ajax onerror="window.scrollTo(0, 0)"/>
Expand Down

0 comments on commit 2cdd7a6

Please sign in to comment.