Skip to content

Commit

Permalink
Book: add legal notice RTE
Browse files Browse the repository at this point in the history
  • Loading branch information
falkodev committed Oct 1, 2024
1 parent 58dc501 commit 48ef0ab
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 83 deletions.
43 changes: 0 additions & 43 deletions server/lib/area.js

This file was deleted.

10 changes: 0 additions & 10 deletions server/modules/@apostrophecms/global/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,18 +98,8 @@ module.exports = {
},
},
},
bookLegalNotice: {
type: 'string',
textarea: true,
},
},
group: {
legal: {
label: 'Legal',
fields: [
'bookLegalNotice',
],
},
links: {
label: 'Links',
fields: [
Expand Down
12 changes: 9 additions & 3 deletions server/modules/book-page/ui/src/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -298,9 +298,11 @@
margin-top: 0;
}
}


}

.pdl-legal-notice {
.pdl-book__legal-notice {
padding: 20px;
padding-bottom: 18px;
display: flex;
Expand All @@ -319,7 +321,7 @@
padding: 32px;
}

&__title {
&-title {
font-size: 18px;
font-weight: 500;
text-align: left;
Expand All @@ -330,11 +332,15 @@
}
}

&__content {
&-content {
font-size: 14px;
font-weight: 400;
text-align: left;

p {
margin-top: 0;
}

@media (min-width: map-get($breakpoints, 'sm')) {
padding-left: 20px;
}
Expand Down
12 changes: 8 additions & 4 deletions server/modules/book-page/views/show.html
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,19 @@ <h1>{{ data.piece.title }}</h1>
{% endfor %}
</div>
<div class="pdl-book__credits">
{{ __t('pdl:Credits') }}
{% if data.piece.creditsRTE.items[0] %}
{{ __t('pdl:Credits') }}
{% endif %}
{% area data.piece, 'creditsRTE' %}
</div>
</div>
</div>

<div class="pdl-legal-notice">
<div class="pdl-legal-notice__title">{{ __t('pdl:Legal notice') }}</div>
<div class="pdl-legal-notice__content">{{ data.global.bookLegalNotice }}</div>
<div class="pdl-book__legal-notice">
{% if data.piece.legalNoticeRTE.items[0] %}
<div class="pdl-book__legal-notice-title">{{ __t('pdl:Legal notice') }}</div>
{% endif %}
<div class="pdl-book__legal-notice-content">{% area data.piece, 'legalNoticeRTE' %}</div>
</div>

<div class="pdl-book__books">
Expand Down
20 changes: 18 additions & 2 deletions server/modules/book/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,30 @@ module.exports = {
options: {
max: 1,
widgets: {
'@apostrophecms/rich-text': {},
'@apostrophecms/rich-text': {
toolbar: [],
styles: [],
},
},
},
},
legalNoticeRTE: {
label: 'pdl:Legal Notice',
type: 'area',
options: {
max: 1,
widgets: {
'@apostrophecms/rich-text': {
toolbar: [],
styles: [],
},
},
},
},
},
group: {
basics: {
fields: ['_author', 'excerptRTE', 'imageArea', 'color', 'fontColor', 'files', 'creditsRTE'],
fields: ['_author', 'excerptRTE', 'imageArea', 'color', 'fontColor', 'files', 'creditsRTE', 'legalNoticeRTE'],
},
},
},
Expand Down
2 changes: 1 addition & 1 deletion server/modules/donate/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ module.exports = {
async checkout (req, res) {
try {
// Test card numbers
// Payement in succcess: 4242 4242 4242 4242
// Payment in succcess: 4242 4242 4242 4242
// Authentication required: 4000 0025 0000 3155
// Rejected payment: 4000 0000 0000 9995
if (!req.body.amount || req.body.amount < 0.6) {
Expand Down
19 changes: 0 additions & 19 deletions server/modules/rte/copyright-term-widget/index.js

This file was deleted.

1 change: 0 additions & 1 deletion server/modules/rte/copyright-term-widget/views/widget.html

This file was deleted.

0 comments on commit 48ef0ab

Please sign in to comment.