Skip to content

Commit 459d73b

Browse files
committed
v13: improve doc for compliance info when publishing
1 parent b9b9a97 commit 459d73b

File tree

7 files changed

+82
-75
lines changed

7 files changed

+82
-75
lines changed
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# Compliance information when publishing
2+
3+
_Introduced in v13_
4+
5+
InvenioRDM lets you customize the confirmation information shown to users when publishing records, such as terms of service, data policy, or other compliance requirements. This flexibility supports custom publishing workflows and helps ensure users acknowledge your organization's policies.
6+
7+
## Configure checkboxes
8+
InvenioRDM requires users to confirm compliance both when submitting a record for review and when publishing directly. Each interface can be configured independently, allowing you to tailor the compliance workflow to your organization's needs.
9+
10+
In your `mapping.js`, parametrize the your UI components by adding a new `extraCheckboxes` parameter in the following format:
11+
12+
```javascript
13+
import { PublishModal } from "@js/invenio_rdm_records";
14+
import { parametrize } from "react-overridable";
15+
16+
const parameters = {
17+
extraCheckboxes: [
18+
{
19+
fieldPath: "acceptTermsOfService", // give it an unique name
20+
text: i18next.t(
21+
"I confirm that this record complies with the data policy and terms of service."
22+
), // define the text to show
23+
},
24+
],
25+
};
26+
27+
const PublishModalComponent = parametrize(PublishModal, parameters);
28+
29+
export const overriddenComponents = {
30+
"InvenioRdmRecords.PublishModal.container": PublishModalComponent, // applied only to the confirmation box when publishing directly
31+
};
32+
```
33+
34+
![Publish modal with checkbox](imgs/compliance_checkboxes.png)
35+
36+
### Configure extra messages
37+
You can also show information messages before and after the compliance checkboxes section. In your `mapping.js`, define:
38+
39+
```javascript
40+
import { i18next } from "@translations/invenio_rdm_records/i18next";
41+
import { SubmitReviewModal } from "@js/invenio_rdm_records";
42+
import { parametrize } from "react-overridable";
43+
44+
const LegalDisclaimer = () => (
45+
<>
46+
<p className="text-xs">
47+
By publishing, you agree to our <a href="/terms" className="underline">terms of service</a>.
48+
</p>
49+
<p className="text-xs mt-1">This action is irreversible.</p>
50+
</>
51+
);
52+
53+
const parameters = {
54+
beforeContent: <p className="text-sm mb-2">Please review before continuing:</p>,
55+
afterContent: <LegalDisclaimer />,
56+
};
57+
58+
const SubmitReviewModalComponent = parametrize(SubmitReviewModal, parameters);
59+
60+
export const overriddenComponents = {
61+
"InvenioRdmRecords.SubmitReviewModal.container": SubmitReviewModalComponent, // applied only to the confirmation box when submitting for review
62+
};
63+
```
64+
65+
![Submit Review modal with extra content](imgs/compliance_content.png)
66+
67+
Don't forget to re-build the assets for the changes to take effect.
68+
69+
```sh
70+
invenio-cli assets build
71+
```
72+

docs/operate/customize/extra_checkbox.md

Lines changed: 0 additions & 72 deletions
This file was deleted.

docs/releases/v12/version-v12.0.0.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ The administration panel now includes a "User management" section to deactivate,
6565

6666
![Concept DOI help-text](../../operate/customize/imgs/concept_doi.png)
6767

68-
InvenioRDM now mints a concept DOI for every record by default, similar to what Zenodo has done for many years. This [can be configured](../../operate/customize/dois.md#parent-or-concept-dois).
68+
InvenioRDM now mints a concept DOI for every record by default, similar to what Zenodo has done for many years. This [can be configured](../../operate/customize/dois.md).
6969

7070
Along with this update, restricted records will now stop minting a DOI upon publication thus keeping _private_ records **truly private**.
7171
And if the visibility of a record becomes restricted after being public, a tombstone will be shown:

docs/releases/v13/version-v13.0.0.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,15 @@ Curation checks in Zenodo's EU Open Research Repository
108108

109109
Read the detailed documentation for [Curation checks](../../operate/customize/curation-checks.md).
110110

111+
### Customizable compliance info when publishing
112+
You can now fully customize the compliance information and checkboxes that users must acknowledge when publishing a record. This makes it easy to tailor the publishing workflow to your organization's policies or legal requirements.
113+
114+
![Publish modal with extra checkbox](../../operate/customize/imgs/compliance_checkboxes.png)
115+
116+
See the configuration options in the [related documentation](../../operate/customize/compliance_info.md).
117+
111118
### DOIs on demand
112-
You can now let users to choose if they need a DOI or not when uploading. See how to configure it in the [related documentation](../../operate/customize/dois.md#dois-on-demand).
119+
You can now let users to choose if they need a DOI or not when uploading. See how to configure it in the [related documentation](../../operate/customize/dois.md#optional-doi-user-interface-and-advanced-configuration).
113120

114121
![DOIs on demand](../../operate/customize/imgs/dois-on-demand.jpg)
115122

mkdocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ nav:
117117
- Authentication: "operate/customize/authentication.md"
118118
- Curation checks: "operate/customize/curation-checks.md"
119119
- Collections: "operate/customize/collections.md"
120+
- Compliance info when publishing: "operate/customize/compliance_info.md"
120121
- DOI registration: "operate/customize/dois.md"
121122
- DNB URN registration: "operate/customize/dnb_urns.md"
122123
- Emails:
@@ -135,7 +136,6 @@ nav:
135136
- Overview: "operate/customize/notifications.md"
136137
- Modify notifications: operate/customize/notifications_modify.md
137138
- Require a community to publish: "operate/customize/require_community.md"
138-
- Add extra checkboxes when publishing: "operate/customize/extra_checkbox.md"
139139
- Restrict community creation: "operate/customize/restrict_community_creation.md"
140140
- Restrict access to pages: operate/customize/restrict_access.md
141141
- Search:

0 commit comments

Comments
 (0)