|
25 | 25 | </p> |
26 | 26 | </ui:fragment> |
27 | 27 | <div class="form-horizontal terms"> |
28 | | - <div class="form-group"> |
29 | | - <label jsf:for="fdLicense" class="col-sm-3 control-label"> |
30 | | - #{bundle['file.dataFilesTab.terms.list.license']} </label> |
31 | | - <div class="col-sm-9"> |
32 | | - <p class="help-block"> |
33 | | - <h:outputText |
34 | | - value="#{bundle['file.dataFilesTab.terms.list.license.view.description']}" |
35 | | - escape="false" /> |
36 | | - </p> |
37 | | - <p> |
38 | | - <o:importFunctions |
39 | | - type="edu.harvard.iq.dataverse.dataset.DatasetUtil" /> |
40 | | - <img |
41 | | - src="#{DatasetUtil:getLicenseIcon(workingVersion)}" |
42 | | - title="#{DatasetUtil:getLicenseDescription(workingVersion)}" |
43 | | - style="display: none" onload="this.style.display='inline'" /> |
44 | | - <a |
45 | | - href="#{DatasetUtil:getLicenseURI(workingVersion)}" |
46 | | - title="#{DatasetUtil:getLicenseDescription(workingVersion)}" |
47 | | - target="_blank">#{DatasetUtil:getLicenseName(workingVersion)} |
48 | | - </a> |
49 | | - <ui:fragment |
50 | | - rendered="#{empty workingVersion.termsOfUseAndAccess.license}"> |
51 | | - <h:outputText rendered="#{!datasetVersionServiceBean.isVersionDefaultCustomTerms(workingVersion)}" |
52 | | - value="#{bundle['file.dataFilesTab.terms.list.license.customterms.txt']}" |
| 28 | + <div class="form-group"> |
| 29 | + <label jsf:for="fdLicense" class="col-sm-3 control-label"> |
| 30 | + #{bundle['file.dataFilesTab.terms.list.license']} </label> |
| 31 | + <div class="col-sm-9"> |
| 32 | + <p class="help-block"> |
| 33 | + <h:outputText |
| 34 | + value="#{bundle['file.dataFilesTab.terms.list.license.view.description']}" |
53 | 35 | escape="false" /> |
54 | | - </ui:fragment> |
55 | | - </p> |
| 36 | + </p> |
| 37 | + <p> |
| 38 | + <o:importFunctions |
| 39 | + type="edu.harvard.iq.dataverse.dataset.DatasetUtil" /> |
| 40 | + <img |
| 41 | + src="#{DatasetUtil:getLicenseIcon(workingVersion)}" |
| 42 | + title="#{DatasetUtil:getLicenseDescription(workingVersion)}" |
| 43 | + style="display: none" onload="this.style.display='inline'" /> |
| 44 | + <a |
| 45 | + href="#{DatasetUtil:getLicenseURI(workingVersion)}" |
| 46 | + title="#{DatasetUtil:getLicenseDescription(workingVersion)}" |
| 47 | + target="_blank">#{DatasetUtil:getLicenseName(workingVersion)} |
| 48 | + </a> |
| 49 | + <ui:fragment |
| 50 | + rendered="#{empty workingVersion.termsOfUseAndAccess.license}"> |
| 51 | + <h:outputText rendered="#{!datasetVersionServiceBean.isVersionDefaultCustomTerms(workingVersion)}" |
| 52 | + value="#{bundle['file.dataFilesTab.terms.list.license.customterms.txt']}" |
| 53 | + escape="false" /> |
| 54 | + </ui:fragment> |
| 55 | + </p> |
| 56 | + </div> |
56 | 57 | </div> |
57 | | - </div> |
58 | 58 |
|
59 | | - <ui:fragment rendered="#{empty workingVersion.termsOfUseAndAccess.license}"> |
60 | | - <div class="form-group" |
61 | | - jsf:rendered="#{!empty workingVersion.termsOfUseAndAccess.termsOfUse}"> |
62 | | - <label jsf:for="fdTermsOfuse" class="col-sm-3 control-label"> |
63 | | - #{bundle['file.dataFilesTab.terms.list.termsOfUse.termsOfUse']} |
64 | | - </label> |
65 | | - <h:outputText id="fdTermsOfUse" class="col-sm-6" |
66 | | - value="#{MarkupChecker:sanitizeBasicHTML(workingVersion.termsOfUseAndAccess.termsOfUse)}" |
67 | | - escape="false" /> |
68 | | - </div> |
69 | | - <div class="form-group" |
70 | | - jsf:rendered="#{!empty workingVersion.termsOfUseAndAccess.confidentialityDeclaration}"> |
71 | | - <label jsf:for="fdConfidentialityDeclaration" |
72 | | - class="col-sm-3 control-label"> |
73 | | - #{bundle['file.dataFilesTab.terms.list.termsOfUse.addInfo.declaration']} |
74 | | - </label> |
75 | | - <h:outputText id="fdConfidentialityDeclaration" class="col-sm-6" |
76 | | - value="#{MarkupChecker:sanitizeBasicHTML(workingVersion.termsOfUseAndAccess.confidentialityDeclaration)}" |
77 | | - escape="false" /> |
78 | | - </div> |
79 | | - <div class="form-group" |
80 | | - jsf:rendered="#{!empty workingVersion.termsOfUseAndAccess.specialPermissions}"> |
81 | | - <label jsf:for="fdSpecialPermissions" class="col-sm-3 control-label"> |
82 | | - #{bundle['file.dataFilesTab.terms.list.termsOfUse.addInfo.permissions']} |
83 | | - </label> |
84 | | - <h:outputText id="fdSpecialPermissions" class="col-sm-6" |
85 | | - value="#{MarkupChecker:sanitizeBasicHTML(workingVersion.termsOfUseAndAccess.specialPermissions)}" |
86 | | - escape="false" /> |
87 | | - </div> |
88 | | - <div class="form-group" |
89 | | - jsf:rendered="#{!empty workingVersion.termsOfUseAndAccess.restrictions}"> |
90 | | - <label jsf:for="fdRestrictions" class="col-sm-3 control-label"> |
91 | | - #{bundle['file.dataFilesTab.terms.list.termsOfUse.addInfo.restrictions']} |
92 | | - </label> |
93 | | - <h:outputText id="fdRestrictions" class="col-sm-6" |
94 | | - value="#{MarkupChecker:sanitizeBasicHTML(workingVersion.termsOfUseAndAccess.restrictions)}" |
95 | | - escape="false" /> |
96 | | - </div> |
97 | | - <div class="form-group" |
98 | | - jsf:rendered="#{!empty workingVersion.termsOfUseAndAccess.citationRequirements}"> |
99 | | - <label jsf:for="fdCitationRequirements" |
100 | | - class="col-sm-3 control-label"> |
101 | | - #{bundle['file.dataFilesTab.terms.list.termsOfUse.addInfo.citationRequirements']} |
102 | | - </label> |
103 | | - <h:outputText id="fdCitationRequirements" class="col-sm-6" |
104 | | - value="#{MarkupChecker:sanitizeBasicHTML(workingVersion.termsOfUseAndAccess.citationRequirements)}" |
105 | | - escape="false" /> |
106 | | - </div> |
107 | | - <div class="form-group" |
108 | | - jsf:rendered="#{!empty workingVersion.termsOfUseAndAccess.depositorRequirements}"> |
109 | | - <label jsf:for="fdDepositorRequirements" |
110 | | - class="col-sm-3 control-label"> |
111 | | - #{bundle['file.dataFilesTab.terms.list.termsOfUse.addInfo.depositorRequirements']} |
112 | | - </label> |
113 | | - <h:outputText id="fdDepositorRequirements" class="col-sm-6" |
114 | | - value="#{MarkupChecker:sanitizeBasicHTML(workingVersion.termsOfUseAndAccess.depositorRequirements)}" |
115 | | - escape="false" /> |
116 | | - </div> |
117 | | - <div class="form-group" |
118 | | - jsf:rendered="#{!empty workingVersion.termsOfUseAndAccess.conditions}"> |
119 | | - <label jsf:for="fdConditions" class="col-sm-3 control-label"> |
120 | | - #{bundle['file.dataFilesTab.terms.list.termsOfUse.addInfo.conditions']} |
121 | | - </label> |
122 | | - <h:outputText id="fdConditions" class="col-sm-6" |
123 | | - value="#{MarkupChecker:sanitizeBasicHTML(workingVersion.termsOfUseAndAccess.conditions)}" |
124 | | - escape="false" /> |
125 | | - </div> |
| 59 | + <ui:fragment rendered="#{empty workingVersion.termsOfUseAndAccess.license}"> |
| 60 | + <div class="form-group" |
| 61 | + jsf:rendered="#{!empty workingVersion.termsOfUseAndAccess.termsOfUse}"> |
| 62 | + <label jsf:for="fdTermsOfuse" class="col-sm-3 control-label"> |
| 63 | + #{bundle['file.dataFilesTab.terms.list.termsOfUse.termsOfUse']} |
| 64 | + </label> |
| 65 | + <h:outputText id="fdTermsOfUse" class="col-sm-6" |
| 66 | + value="#{MarkupChecker:sanitizeBasicHTML(workingVersion.termsOfUseAndAccess.termsOfUse)}" |
| 67 | + escape="false" /> |
| 68 | + </div> |
| 69 | + <div class="form-group" |
| 70 | + jsf:rendered="#{!empty workingVersion.termsOfUseAndAccess.confidentialityDeclaration}"> |
| 71 | + <label jsf:for="fdConfidentialityDeclaration" |
| 72 | + class="col-sm-3 control-label"> |
| 73 | + #{bundle['file.dataFilesTab.terms.list.termsOfUse.addInfo.declaration']} |
| 74 | + </label> |
| 75 | + <h:outputText id="fdConfidentialityDeclaration" class="col-sm-6" |
| 76 | + value="#{MarkupChecker:sanitizeBasicHTML(workingVersion.termsOfUseAndAccess.confidentialityDeclaration)}" |
| 77 | + escape="false" /> |
| 78 | + </div> |
| 79 | + <div class="form-group" |
| 80 | + jsf:rendered="#{!empty workingVersion.termsOfUseAndAccess.specialPermissions}"> |
| 81 | + <label jsf:for="fdSpecialPermissions" class="col-sm-3 control-label"> |
| 82 | + #{bundle['file.dataFilesTab.terms.list.termsOfUse.addInfo.permissions']} |
| 83 | + </label> |
| 84 | + <h:outputText id="fdSpecialPermissions" class="col-sm-6" |
| 85 | + value="#{MarkupChecker:sanitizeBasicHTML(workingVersion.termsOfUseAndAccess.specialPermissions)}" |
| 86 | + escape="false" /> |
| 87 | + </div> |
| 88 | + <div class="form-group" |
| 89 | + jsf:rendered="#{!empty workingVersion.termsOfUseAndAccess.restrictions}"> |
| 90 | + <label jsf:for="fdRestrictions" class="col-sm-3 control-label"> |
| 91 | + #{bundle['file.dataFilesTab.terms.list.termsOfUse.addInfo.restrictions']} |
| 92 | + </label> |
| 93 | + <h:outputText id="fdRestrictions" class="col-sm-6" |
| 94 | + value="#{MarkupChecker:sanitizeBasicHTML(workingVersion.termsOfUseAndAccess.restrictions)}" |
| 95 | + escape="false" /> |
| 96 | + </div> |
| 97 | + <div class="form-group" |
| 98 | + jsf:rendered="#{!empty workingVersion.termsOfUseAndAccess.citationRequirements}"> |
| 99 | + <label jsf:for="fdCitationRequirements" |
| 100 | + class="col-sm-3 control-label"> |
| 101 | + #{bundle['file.dataFilesTab.terms.list.termsOfUse.addInfo.citationRequirements']} |
| 102 | + </label> |
| 103 | + <h:outputText id="fdCitationRequirements" class="col-sm-6" |
| 104 | + value="#{MarkupChecker:sanitizeBasicHTML(workingVersion.termsOfUseAndAccess.citationRequirements)}" |
| 105 | + escape="false" /> |
| 106 | + </div> |
| 107 | + <div class="form-group" |
| 108 | + jsf:rendered="#{!empty workingVersion.termsOfUseAndAccess.depositorRequirements}"> |
| 109 | + <label jsf:for="fdDepositorRequirements" |
| 110 | + class="col-sm-3 control-label"> |
| 111 | + #{bundle['file.dataFilesTab.terms.list.termsOfUse.addInfo.depositorRequirements']} |
| 112 | + </label> |
| 113 | + <h:outputText id="fdDepositorRequirements" class="col-sm-6" |
| 114 | + value="#{MarkupChecker:sanitizeBasicHTML(workingVersion.termsOfUseAndAccess.depositorRequirements)}" |
| 115 | + escape="false" /> |
| 116 | + </div> |
| 117 | + <div class="form-group" |
| 118 | + jsf:rendered="#{!empty workingVersion.termsOfUseAndAccess.conditions}"> |
| 119 | + <label jsf:for="fdConditions" class="col-sm-3 control-label"> |
| 120 | + #{bundle['file.dataFilesTab.terms.list.termsOfUse.addInfo.conditions']} |
| 121 | + </label> |
| 122 | + <h:outputText id="fdConditions" class="col-sm-6" |
| 123 | + value="#{MarkupChecker:sanitizeBasicHTML(workingVersion.termsOfUseAndAccess.conditions)}" |
| 124 | + escape="false" /> |
| 125 | + </div> |
| 126 | + <div class="form-group" |
| 127 | + jsf:rendered="#{!empty workingVersion.termsOfUseAndAccess.disclaimer}"> |
| 128 | + <label jsf:for="fdDisclaimer" class="col-sm-3 control-label"> |
| 129 | + #{bundle['file.dataFilesTab.terms.list.termsOfUse.addInfo.disclaimer']} |
| 130 | + </label> |
| 131 | + <h:outputText id="fdDisclaimer" class="col-sm-6" |
| 132 | + value="#{MarkupChecker:sanitizeBasicHTML(workingVersion.termsOfUseAndAccess.disclaimer)}" |
| 133 | + escape="false" /> |
| 134 | + </div> |
| 135 | + </ui:fragment> |
126 | 136 | <div class="form-group" |
127 | | - jsf:rendered="#{!empty workingVersion.termsOfUseAndAccess.disclaimer}"> |
128 | | - <label jsf:for="fdDisclaimer" class="col-sm-3 control-label"> |
129 | | - #{bundle['file.dataFilesTab.terms.list.termsOfUse.addInfo.disclaimer']} |
| 137 | + jsf:rendered="#{!empty workingVersion.termsOfUseAndAccess.termsOfAccess and (hasRestrictedFile or !empty fileDownloadHelper.filesForRequestAccess)}"> |
| 138 | + <label jsf:for="fdTermsOfAccess" class="col-sm-3 control-label"> |
| 139 | + #{bundle['file.dataFilesTab.terms.list.termsOfAccess.termsOfsAccess']} |
130 | 140 | </label> |
131 | | - <h:outputText id="fdDisclaimer" class="col-sm-6" |
132 | | - value="#{MarkupChecker:sanitizeBasicHTML(workingVersion.termsOfUseAndAccess.disclaimer)}" |
| 141 | + <h:outputText id="fdTermsOfAccess" class="col-sm-6" |
| 142 | + value="#{MarkupChecker:sanitizeBasicHTML(workingVersion.termsOfUseAndAccess.termsOfAccess)}" |
133 | 143 | escape="false" /> |
134 | 144 | </div> |
135 | | - </ui:fragment> |
136 | | - <div class="form-group" |
137 | | - jsf:rendered="#{!empty workingVersion.termsOfUseAndAccess.termsOfAccess and (hasRestrictedFile or !empty fileDownloadHelper.filesForRequestAccess)}"> |
138 | | - <label jsf:for="fdTermsOfAccess" class="col-sm-3 control-label"> |
139 | | - #{bundle['file.dataFilesTab.terms.list.termsOfAccess.termsOfsAccess']} |
140 | | - </label> |
141 | | - <h:outputText id="fdTermsOfAccess" class="col-sm-6" |
142 | | - value="#{MarkupChecker:sanitizeBasicHTML(workingVersion.termsOfUseAndAccess.termsOfAccess)}" |
143 | | - escape="false" /> |
144 | | - </div> |
145 | 145 | <p:fragment rendered="#{guestbookAndTermsPopupRequired and (((termsGuestbookPopupAction != bundle.download) != guestbookPopupRequiredAtDownload) and guestbookPopupRequired)}" id="guestbookUIFragment"> |
146 | 146 | <div class="container messagePanel"> |
147 | 147 | <iqbs:messages collapsible="true" /> |
|
288 | 288 | update="guestbookUIFragment"> |
289 | 289 | <f:param name="DO_GB_VALIDATION_#{popupContext}" value="true"/> |
290 | 290 | </p:commandButton> |
291 | | - <!--PREVIEW TAB BUTTON--> |
| 291 | + <!--PREVIEW TAB BUTTON--> |
292 | 292 | <p:commandButton styleClass="btn btn-default" value="#{bundle.acceptTerms}" |
293 | 293 | rendered="#{popupContext == 'previewTab'}" |
294 | 294 | actionListener="#{FilePage.showPreview(guestbookResponse)}" |
|
309 | 309 | update="guestbookUIFragment"> |
310 | 310 | <f:param name="DO_GB_VALIDATION_#{popupContext}" value="true"/> |
311 | 311 | </p:commandButton> |
312 | | - <button class="btn btn-link" onclick="PF('guestbookAndTermsPopup').hide();PF('blockDatasetForm').hide();" type="button"> |
313 | | - #{bundle.cancel} |
314 | | - </button> |
| 312 | + <!--PREVIEW TAB CANCEL BUTTON--> |
| 313 | + <p:commandButton styleClass="btn btn-default" value="#{bundle.cancel}" |
| 314 | + rendered="#{popupContext == 'previewTab'}" |
| 315 | + onclick="history.back();" |
| 316 | + update="fileForm:tabView"> |
| 317 | + </p:commandButton> |
| 318 | + <!--DIALOG CANCEL BUTTON--> |
| 319 | + <p:commandButton styleClass="btn btn-default" value="#{bundle.cancel}" |
| 320 | + rendered="#{popupContext != 'previewTab'}" |
| 321 | + onclick="PF('guestbookAndTermsPopup').hide();"> |
| 322 | + </p:commandButton> |
315 | 323 | </div> |
316 | 324 | <div class="button-block" jsf:rendered="#{termsGuestbookPopupAction == bundle['file.requestAccess']}"> |
317 | 325 | <!--TODO - add "Accept and" if ToA exist?--> |
|
328 | 336 | oncomplete="if (!args || (args && !args.validationFailed)){PF('guestbookAndTermsPopup').hide();window.location.replace(window.location.href);}"> |
329 | 337 | <f:param name="DO_GB_VALIDATION_#{popupContext}" value="true"/> |
330 | 338 | </p:commandLink> |
331 | | - |
332 | | - <button type="button" class="btn btn-default" onclick="PF('guestbookAndTermsPopup').hide();PF('blockDatasetForm').hide();" value="#{bundle.cancel}">#{bundle.cancel}</button> |
| 339 | + <p:commandButton styleClass="btn btn-default" value="#{bundle.cancel}" |
| 340 | + onclick="PF('guestbookAndTermsPopup').hide();"> |
| 341 | + </p:commandButton> |
333 | 342 | </div> |
334 | 343 | </ui:fragment> |
335 | 344 | </ui:composition> |
0 commit comments