Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This release fixes a bug which, in the JSF UI, the 'Cancel' button on the Guestbook Response dialog/preview tab does not close the dialog/tab. With this fix the dialog will close or, when in the preview tab, the tab will go back to the 'Files' tab.
241 changes: 125 additions & 116 deletions src/main/webapp/guestbook-terms-popup-fragment.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -25,123 +25,123 @@
</p>
</ui:fragment>
<div class="form-horizontal terms">
<div class="form-group">
<label jsf:for="fdLicense" class="col-sm-3 control-label">
#{bundle['file.dataFilesTab.terms.list.license']} </label>
<div class="col-sm-9">
<p class="help-block">
<h:outputText
value="#{bundle['file.dataFilesTab.terms.list.license.view.description']}"
escape="false" />
</p>
<p>
<o:importFunctions
type="edu.harvard.iq.dataverse.dataset.DatasetUtil" />
<img
src="#{DatasetUtil:getLicenseIcon(workingVersion)}"
title="#{DatasetUtil:getLicenseDescription(workingVersion)}"
style="display: none" onload="this.style.display='inline'" />
<a
href="#{DatasetUtil:getLicenseURI(workingVersion)}"
title="#{DatasetUtil:getLicenseDescription(workingVersion)}"
target="_blank">#{DatasetUtil:getLicenseName(workingVersion)}
</a>
<ui:fragment
rendered="#{empty workingVersion.termsOfUseAndAccess.license}">
<h:outputText rendered="#{!datasetVersionServiceBean.isVersionDefaultCustomTerms(workingVersion)}"
value="#{bundle['file.dataFilesTab.terms.list.license.customterms.txt']}"
<div class="form-group">
<label jsf:for="fdLicense" class="col-sm-3 control-label">
#{bundle['file.dataFilesTab.terms.list.license']} </label>
<div class="col-sm-9">
<p class="help-block">
<h:outputText
value="#{bundle['file.dataFilesTab.terms.list.license.view.description']}"
escape="false" />
</ui:fragment>
</p>
</p>
<p>
<o:importFunctions
type="edu.harvard.iq.dataverse.dataset.DatasetUtil" />
<img
src="#{DatasetUtil:getLicenseIcon(workingVersion)}"
title="#{DatasetUtil:getLicenseDescription(workingVersion)}"
style="display: none" onload="this.style.display='inline'" />
<a
href="#{DatasetUtil:getLicenseURI(workingVersion)}"
title="#{DatasetUtil:getLicenseDescription(workingVersion)}"
target="_blank">#{DatasetUtil:getLicenseName(workingVersion)}
</a>
<ui:fragment
rendered="#{empty workingVersion.termsOfUseAndAccess.license}">
<h:outputText rendered="#{!datasetVersionServiceBean.isVersionDefaultCustomTerms(workingVersion)}"
value="#{bundle['file.dataFilesTab.terms.list.license.customterms.txt']}"
escape="false" />
</ui:fragment>
</p>
</div>
</div>
</div>

<ui:fragment rendered="#{empty workingVersion.termsOfUseAndAccess.license}">
<div class="form-group"
jsf:rendered="#{!empty workingVersion.termsOfUseAndAccess.termsOfUse}">
<label jsf:for="fdTermsOfuse" class="col-sm-3 control-label">
#{bundle['file.dataFilesTab.terms.list.termsOfUse.termsOfUse']}
</label>
<h:outputText id="fdTermsOfUse" class="col-sm-6"
value="#{MarkupChecker:sanitizeBasicHTML(workingVersion.termsOfUseAndAccess.termsOfUse)}"
escape="false" />
</div>
<div class="form-group"
jsf:rendered="#{!empty workingVersion.termsOfUseAndAccess.confidentialityDeclaration}">
<label jsf:for="fdConfidentialityDeclaration"
class="col-sm-3 control-label">
#{bundle['file.dataFilesTab.terms.list.termsOfUse.addInfo.declaration']}
</label>
<h:outputText id="fdConfidentialityDeclaration" class="col-sm-6"
value="#{MarkupChecker:sanitizeBasicHTML(workingVersion.termsOfUseAndAccess.confidentialityDeclaration)}"
escape="false" />
</div>
<div class="form-group"
jsf:rendered="#{!empty workingVersion.termsOfUseAndAccess.specialPermissions}">
<label jsf:for="fdSpecialPermissions" class="col-sm-3 control-label">
#{bundle['file.dataFilesTab.terms.list.termsOfUse.addInfo.permissions']}
</label>
<h:outputText id="fdSpecialPermissions" class="col-sm-6"
value="#{MarkupChecker:sanitizeBasicHTML(workingVersion.termsOfUseAndAccess.specialPermissions)}"
escape="false" />
</div>
<div class="form-group"
jsf:rendered="#{!empty workingVersion.termsOfUseAndAccess.restrictions}">
<label jsf:for="fdRestrictions" class="col-sm-3 control-label">
#{bundle['file.dataFilesTab.terms.list.termsOfUse.addInfo.restrictions']}
</label>
<h:outputText id="fdRestrictions" class="col-sm-6"
value="#{MarkupChecker:sanitizeBasicHTML(workingVersion.termsOfUseAndAccess.restrictions)}"
escape="false" />
</div>
<div class="form-group"
jsf:rendered="#{!empty workingVersion.termsOfUseAndAccess.citationRequirements}">
<label jsf:for="fdCitationRequirements"
class="col-sm-3 control-label">
#{bundle['file.dataFilesTab.terms.list.termsOfUse.addInfo.citationRequirements']}
</label>
<h:outputText id="fdCitationRequirements" class="col-sm-6"
value="#{MarkupChecker:sanitizeBasicHTML(workingVersion.termsOfUseAndAccess.citationRequirements)}"
escape="false" />
</div>
<div class="form-group"
jsf:rendered="#{!empty workingVersion.termsOfUseAndAccess.depositorRequirements}">
<label jsf:for="fdDepositorRequirements"
class="col-sm-3 control-label">
#{bundle['file.dataFilesTab.terms.list.termsOfUse.addInfo.depositorRequirements']}
</label>
<h:outputText id="fdDepositorRequirements" class="col-sm-6"
value="#{MarkupChecker:sanitizeBasicHTML(workingVersion.termsOfUseAndAccess.depositorRequirements)}"
escape="false" />
</div>
<div class="form-group"
jsf:rendered="#{!empty workingVersion.termsOfUseAndAccess.conditions}">
<label jsf:for="fdConditions" class="col-sm-3 control-label">
#{bundle['file.dataFilesTab.terms.list.termsOfUse.addInfo.conditions']}
</label>
<h:outputText id="fdConditions" class="col-sm-6"
value="#{MarkupChecker:sanitizeBasicHTML(workingVersion.termsOfUseAndAccess.conditions)}"
escape="false" />
</div>
<ui:fragment rendered="#{empty workingVersion.termsOfUseAndAccess.license}">
<div class="form-group"
jsf:rendered="#{!empty workingVersion.termsOfUseAndAccess.termsOfUse}">
<label jsf:for="fdTermsOfuse" class="col-sm-3 control-label">
#{bundle['file.dataFilesTab.terms.list.termsOfUse.termsOfUse']}
</label>
<h:outputText id="fdTermsOfUse" class="col-sm-6"
value="#{MarkupChecker:sanitizeBasicHTML(workingVersion.termsOfUseAndAccess.termsOfUse)}"
escape="false" />
</div>
<div class="form-group"
jsf:rendered="#{!empty workingVersion.termsOfUseAndAccess.confidentialityDeclaration}">
<label jsf:for="fdConfidentialityDeclaration"
class="col-sm-3 control-label">
#{bundle['file.dataFilesTab.terms.list.termsOfUse.addInfo.declaration']}
</label>
<h:outputText id="fdConfidentialityDeclaration" class="col-sm-6"
value="#{MarkupChecker:sanitizeBasicHTML(workingVersion.termsOfUseAndAccess.confidentialityDeclaration)}"
escape="false" />
</div>
<div class="form-group"
jsf:rendered="#{!empty workingVersion.termsOfUseAndAccess.specialPermissions}">
<label jsf:for="fdSpecialPermissions" class="col-sm-3 control-label">
#{bundle['file.dataFilesTab.terms.list.termsOfUse.addInfo.permissions']}
</label>
<h:outputText id="fdSpecialPermissions" class="col-sm-6"
value="#{MarkupChecker:sanitizeBasicHTML(workingVersion.termsOfUseAndAccess.specialPermissions)}"
escape="false" />
</div>
<div class="form-group"
jsf:rendered="#{!empty workingVersion.termsOfUseAndAccess.restrictions}">
<label jsf:for="fdRestrictions" class="col-sm-3 control-label">
#{bundle['file.dataFilesTab.terms.list.termsOfUse.addInfo.restrictions']}
</label>
<h:outputText id="fdRestrictions" class="col-sm-6"
value="#{MarkupChecker:sanitizeBasicHTML(workingVersion.termsOfUseAndAccess.restrictions)}"
escape="false" />
</div>
<div class="form-group"
jsf:rendered="#{!empty workingVersion.termsOfUseAndAccess.citationRequirements}">
<label jsf:for="fdCitationRequirements"
class="col-sm-3 control-label">
#{bundle['file.dataFilesTab.terms.list.termsOfUse.addInfo.citationRequirements']}
</label>
<h:outputText id="fdCitationRequirements" class="col-sm-6"
value="#{MarkupChecker:sanitizeBasicHTML(workingVersion.termsOfUseAndAccess.citationRequirements)}"
escape="false" />
</div>
<div class="form-group"
jsf:rendered="#{!empty workingVersion.termsOfUseAndAccess.depositorRequirements}">
<label jsf:for="fdDepositorRequirements"
class="col-sm-3 control-label">
#{bundle['file.dataFilesTab.terms.list.termsOfUse.addInfo.depositorRequirements']}
</label>
<h:outputText id="fdDepositorRequirements" class="col-sm-6"
value="#{MarkupChecker:sanitizeBasicHTML(workingVersion.termsOfUseAndAccess.depositorRequirements)}"
escape="false" />
</div>
<div class="form-group"
jsf:rendered="#{!empty workingVersion.termsOfUseAndAccess.conditions}">
<label jsf:for="fdConditions" class="col-sm-3 control-label">
#{bundle['file.dataFilesTab.terms.list.termsOfUse.addInfo.conditions']}
</label>
<h:outputText id="fdConditions" class="col-sm-6"
value="#{MarkupChecker:sanitizeBasicHTML(workingVersion.termsOfUseAndAccess.conditions)}"
escape="false" />
</div>
<div class="form-group"
jsf:rendered="#{!empty workingVersion.termsOfUseAndAccess.disclaimer}">
<label jsf:for="fdDisclaimer" class="col-sm-3 control-label">
#{bundle['file.dataFilesTab.terms.list.termsOfUse.addInfo.disclaimer']}
</label>
<h:outputText id="fdDisclaimer" class="col-sm-6"
value="#{MarkupChecker:sanitizeBasicHTML(workingVersion.termsOfUseAndAccess.disclaimer)}"
escape="false" />
</div>
</ui:fragment>
<div class="form-group"
jsf:rendered="#{!empty workingVersion.termsOfUseAndAccess.disclaimer}">
<label jsf:for="fdDisclaimer" class="col-sm-3 control-label">
#{bundle['file.dataFilesTab.terms.list.termsOfUse.addInfo.disclaimer']}
jsf:rendered="#{!empty workingVersion.termsOfUseAndAccess.termsOfAccess and (hasRestrictedFile or !empty fileDownloadHelper.filesForRequestAccess)}">
<label jsf:for="fdTermsOfAccess" class="col-sm-3 control-label">
#{bundle['file.dataFilesTab.terms.list.termsOfAccess.termsOfsAccess']}
</label>
<h:outputText id="fdDisclaimer" class="col-sm-6"
value="#{MarkupChecker:sanitizeBasicHTML(workingVersion.termsOfUseAndAccess.disclaimer)}"
<h:outputText id="fdTermsOfAccess" class="col-sm-6"
value="#{MarkupChecker:sanitizeBasicHTML(workingVersion.termsOfUseAndAccess.termsOfAccess)}"
escape="false" />
</div>
</ui:fragment>
<div class="form-group"
jsf:rendered="#{!empty workingVersion.termsOfUseAndAccess.termsOfAccess and (hasRestrictedFile or !empty fileDownloadHelper.filesForRequestAccess)}">
<label jsf:for="fdTermsOfAccess" class="col-sm-3 control-label">
#{bundle['file.dataFilesTab.terms.list.termsOfAccess.termsOfsAccess']}
</label>
<h:outputText id="fdTermsOfAccess" class="col-sm-6"
value="#{MarkupChecker:sanitizeBasicHTML(workingVersion.termsOfUseAndAccess.termsOfAccess)}"
escape="false" />
</div>
<p:fragment rendered="#{guestbookAndTermsPopupRequired and (((termsGuestbookPopupAction != bundle.download) != guestbookPopupRequiredAtDownload) and guestbookPopupRequired)}" id="guestbookUIFragment">
<div class="container messagePanel">
<iqbs:messages collapsible="true" />
Expand Down Expand Up @@ -288,7 +288,7 @@
update="guestbookUIFragment">
<f:param name="DO_GB_VALIDATION_#{popupContext}" value="true"/>
</p:commandButton>
<!--PREVIEW TAB BUTTON-->
<!--PREVIEW TAB BUTTON-->
<p:commandButton styleClass="btn btn-default" value="#{bundle.acceptTerms}"
rendered="#{popupContext == 'previewTab'}"
actionListener="#{FilePage.showPreview(guestbookResponse)}"
Expand All @@ -309,9 +309,17 @@
update="guestbookUIFragment">
<f:param name="DO_GB_VALIDATION_#{popupContext}" value="true"/>
</p:commandButton>
<button class="btn btn-link" onclick="PF('guestbookAndTermsPopup').hide();PF('blockDatasetForm').hide();" type="button">
#{bundle.cancel}
</button>
<!--PREVIEW TAB CANCEL BUTTON-->
<p:commandButton styleClass="btn btn-default" value="#{bundle.cancel}"
rendered="#{popupContext == 'previewTab'}"
onclick="history.back();"
update="fileForm:tabView">
</p:commandButton>
<!--DIALOG CANCEL BUTTON-->
<p:commandButton styleClass="btn btn-default" value="#{bundle.cancel}"
rendered="#{popupContext != 'previewTab'}"
onclick="PF('guestbookAndTermsPopup').hide();">
</p:commandButton>
</div>
<div class="button-block" jsf:rendered="#{termsGuestbookPopupAction == bundle['file.requestAccess']}">
<!--TODO - add "Accept and" if ToA exist?-->
Expand All @@ -328,8 +336,9 @@
oncomplete="if (!args || (args &amp;&amp; !args.validationFailed)){PF('guestbookAndTermsPopup').hide();window.location.replace(window.location.href);}">
<f:param name="DO_GB_VALIDATION_#{popupContext}" value="true"/>
</p:commandLink>

<button type="button" class="btn btn-default" onclick="PF('guestbookAndTermsPopup').hide();PF('blockDatasetForm').hide();" value="#{bundle.cancel}">#{bundle.cancel}</button>
<p:commandButton styleClass="btn btn-default" value="#{bundle.cancel}"
onclick="PF('guestbookAndTermsPopup').hide();">
</p:commandButton>
</div>
</ui:fragment>
</ui:composition>
Loading