design-comuni-plone-theme 11.23.2 → 11.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/main.yml +1 -1
- package/.github/workflows/prs.yml +1 -1
- package/.github/workflows/release.yml +1 -1
- package/.yarn/cache/{volto-form-block-npm-3.9.2-cb78fb6cd0-a47c5241be.zip → volto-form-block-npm-3.10.0-8cd1c7a976-8ddce2c624.zip} +0 -0
- package/.yarn/install-state.gz +0 -0
- package/CHANGELOG.md +22 -0
- package/Makefile +1 -1
- package/RELEASE.md +19 -0
- package/locales/de/LC_MESSAGES/volto.po +5 -0
- package/locales/en/LC_MESSAGES/volto.po +5 -0
- package/locales/es/LC_MESSAGES/volto.po +5 -0
- package/locales/fr/LC_MESSAGES/volto.po +5 -0
- package/locales/it/LC_MESSAGES/volto.po +5 -0
- package/locales/volto.pot +6 -1
- package/package.json +3 -3
- package/publiccode.yml +2 -2
- package/src/components/ItaliaTheme/Blocks/Listing/SimpleCard/Card/SimpleCardDefault.jsx +5 -1
- package/src/components/ItaliaTheme/View/PersonaView/PersonaRuolo.jsx +11 -5
- package/src/config/italiaConfig.js +1 -0
- package/src/customizations/volto/components/manage/Controlpanels/Groups/GroupsControlpanel.jsx +709 -0
- package/src/customizations/volto/components/manage/Controlpanels/Groups/RenderGroups.jsx +122 -0
- package/src/customizations/volto/components/manage/Diff/DiffField.jsx +2 -3
- package/src/customizations/volto/components/manage/Widgets/RecurrenceWidget/EndField.jsx +18 -11
- package/src/customizations/volto/components/manage/Widgets/RecurrenceWidget/RecurrenceWidget.jsx +233 -116
- package/src/customizations/volto-form-block/components/FormView.jsx +44 -40
- package/src/customizations/volto-form-block/components/Sidebar.jsx +4 -1
- package/src/customizations/volto-form-block/components/View.jsx +9 -2
- package/src/customizations/volto-form-block/formSchema.js +18 -0
|
@@ -209,47 +209,51 @@ const FormView = ({
|
|
|
209
209
|
})}
|
|
210
210
|
|
|
211
211
|
{/*OTP*/}
|
|
212
|
-
{data.
|
|
213
|
-
.
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
212
|
+
{data.email_otp_verification ? (
|
|
213
|
+
data.subblocks
|
|
214
|
+
.filter((subblock) => subblock.use_as_bcc)
|
|
215
|
+
.map((subblock, index) => {
|
|
216
|
+
const fieldName = getFieldName(
|
|
217
|
+
subblock.label,
|
|
218
|
+
subblock.id,
|
|
219
|
+
);
|
|
220
|
+
const name = fieldName + OTP_FIELDNAME_EXTENDER;
|
|
221
|
+
const fieldValue = formData[fieldName]?.value;
|
|
222
|
+
const value = formData[fieldName]?.otp;
|
|
223
|
+
const fields_to_send_with_value =
|
|
224
|
+
getFieldsToSendWithValue(subblock);
|
|
224
225
|
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
226
|
+
return (
|
|
227
|
+
<Row key={'row_otp' + index}>
|
|
228
|
+
<Col className="py-2">
|
|
229
|
+
<OTPWidget
|
|
230
|
+
{...subblock}
|
|
231
|
+
fieldValue={fieldValue}
|
|
232
|
+
onChange={(field, value) => {
|
|
233
|
+
onChangeFormData(
|
|
234
|
+
subblock.id,
|
|
235
|
+
fieldName,
|
|
236
|
+
fieldValue,
|
|
237
|
+
{
|
|
238
|
+
...fields_to_send_with_value,
|
|
239
|
+
otp: value,
|
|
240
|
+
},
|
|
241
|
+
);
|
|
242
|
+
}}
|
|
243
|
+
value={value}
|
|
244
|
+
valid={isValidField(name)}
|
|
245
|
+
errorMessage={getErrorMessage(name)}
|
|
246
|
+
formHasErrors={formErrors?.length > 0}
|
|
247
|
+
path={path}
|
|
248
|
+
block_id={block_id}
|
|
249
|
+
/>
|
|
250
|
+
</Col>
|
|
251
|
+
</Row>
|
|
252
|
+
);
|
|
253
|
+
})
|
|
254
|
+
) : (
|
|
255
|
+
<></>
|
|
256
|
+
)}
|
|
253
257
|
|
|
254
258
|
{enableCaptcha && <>{captcha.render()}</>}
|
|
255
259
|
|
|
@@ -294,7 +294,10 @@ const Sidebar = ({
|
|
|
294
294
|
<BlockDataForm
|
|
295
295
|
schema={FieldSchema(subblock)}
|
|
296
296
|
onChangeField={(name, value) => {
|
|
297
|
-
|
|
297
|
+
const update_values = {};
|
|
298
|
+
if (subblock.field_type === 'static_text') {
|
|
299
|
+
update_values.required = false;
|
|
300
|
+
}
|
|
298
301
|
|
|
299
302
|
onChangeSubBlock(index, {
|
|
300
303
|
...subblock,
|
|
@@ -5,7 +5,7 @@ import React, { useState, useEffect, useReducer, useRef } from 'react';
|
|
|
5
5
|
import { useSelector, useDispatch } from 'react-redux';
|
|
6
6
|
import PropTypes from 'prop-types';
|
|
7
7
|
import { useIntl, defineMessages } from 'react-intl';
|
|
8
|
-
import { submitForm } from 'volto-form-block/actions';
|
|
8
|
+
import { submitForm, resetOTP } from 'volto-form-block/actions';
|
|
9
9
|
import { getFieldName } from 'volto-form-block/components/utils';
|
|
10
10
|
import FormView from 'volto-form-block/components/FormView';
|
|
11
11
|
import { formatDate } from '@plone/volto/helpers/Utils/Date';
|
|
@@ -127,6 +127,9 @@ const View = ({ data, id, path }) => {
|
|
|
127
127
|
|
|
128
128
|
const [formData, setFormData] = useReducer((state, action) => {
|
|
129
129
|
if (action.reset) {
|
|
130
|
+
if (data.email_otp_verification) {
|
|
131
|
+
dispatch(resetOTP(id));
|
|
132
|
+
}
|
|
130
133
|
return getInitialData(data);
|
|
131
134
|
}
|
|
132
135
|
|
|
@@ -209,7 +212,11 @@ const View = ({ data, id, path }) => {
|
|
|
209
212
|
field: name,
|
|
210
213
|
message: intl.formatMessage(messages.invalidEmailMessage),
|
|
211
214
|
});
|
|
212
|
-
} else if (
|
|
215
|
+
} else if (
|
|
216
|
+
data.email_otp_verification &&
|
|
217
|
+
isBCC &&
|
|
218
|
+
!formData[name].otp
|
|
219
|
+
) {
|
|
213
220
|
v.push({
|
|
214
221
|
field: name + OTP_FIELDNAME_EXTENDER,
|
|
215
222
|
message: intl.formatMessage(messages.insertOtp),
|
|
@@ -102,6 +102,15 @@ const messages = defineMessages({
|
|
|
102
102
|
id: 'mail_footer_label',
|
|
103
103
|
defaultMessage: 'Text at the end of the email',
|
|
104
104
|
},
|
|
105
|
+
email_otp_verification: {
|
|
106
|
+
id: 'form_email_otp_verification',
|
|
107
|
+
defaultMessage: 'Validate BCC emails with OTP verification',
|
|
108
|
+
},
|
|
109
|
+
email_otp_verification_description: {
|
|
110
|
+
id: 'form_email_otp_verification_description',
|
|
111
|
+
defaultMessage:
|
|
112
|
+
"Prevent spam from your website. By enabling this option, you do not allow malicious users to send emails to other email addresses through your website. The OTP will be requested for all email-type fields for which the 'Send a copy of the email to this address' option is checked.",
|
|
113
|
+
},
|
|
105
114
|
});
|
|
106
115
|
|
|
107
116
|
const Schema = (data) => {
|
|
@@ -130,6 +139,7 @@ const Schema = (data) => {
|
|
|
130
139
|
...(data?.show_cancel ? ['cancel_label'] : []),
|
|
131
140
|
'set_limit',
|
|
132
141
|
...(data?.set_limit ? ['limit'] : []),
|
|
142
|
+
'email_otp_verification',
|
|
133
143
|
'mail_header',
|
|
134
144
|
'mail_footer',
|
|
135
145
|
'captcha',
|
|
@@ -202,6 +212,14 @@ const Schema = (data) => {
|
|
|
202
212
|
'@id': 'collective.volto.formsupport.captcha.providers',
|
|
203
213
|
},
|
|
204
214
|
},
|
|
215
|
+
email_otp_verification: {
|
|
216
|
+
type: 'boolean',
|
|
217
|
+
title: intl.formatMessage(messages.email_otp_verification),
|
|
218
|
+
description: intl.formatMessage(
|
|
219
|
+
messages.email_otp_verification_description,
|
|
220
|
+
),
|
|
221
|
+
default: false,
|
|
222
|
+
},
|
|
205
223
|
store: {
|
|
206
224
|
type: 'boolean',
|
|
207
225
|
title: intl.formatMessage(messages.store),
|