Skip to content

Commit

Permalink
Merge branch 'v2' into cardreadmore_svg_bug
Browse files Browse the repository at this point in the history
  • Loading branch information
mamico authored Oct 8, 2024
2 parents e803693 + 437b242 commit a3d1e5a
Show file tree
Hide file tree
Showing 5 changed files with 65 additions and 49 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
### [7.31.4](https://github.com/RedTurtle/design-comuni-plone-theme/compare/v7.31.3...v7.31.4) (2024-10-03)


### Bug Fixes

* switchable OTP email validation ([#784](https://github.com/RedTurtle/design-comuni-plone-theme/issues/784)) ([610ed6f](https://github.com/RedTurtle/design-comuni-plone-theme/commit/610ed6f3cb0a847772e9f9da2bb229eb9893a0be))


### Maintenance

* preparing release 7.31.4 ([c3b6a13](https://github.com/RedTurtle/design-comuni-plone-theme/commit/c3b6a133190a84cb0ebeff5b0df59b3c757db8cf))

### [7.31.3](https://github.com/RedTurtle/design-comuni-plone-theme/compare/v7.31.2...v7.31.3) (2024-10-01)


Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "design-comuni-plone-theme",
"description": "Volto Theme for Italia design guidelines",
"license": "MIT",
"version": "7.31.3",
"version": "7.31.4",
"addons": [
"@plone-collective/volto-sentry",
"volto-multilingual-widget",
Expand Down Expand Up @@ -204,7 +204,7 @@
"volto-customer-satisfaction": "1.0.0",
"volto-dropdownmenu": "4.0.0",
"volto-editablefooter": "5.0.1",
"volto-form-block": "3.9.3",
"volto-form-block": "3.10.0",
"volto-gdpr-privacy": "2.1.0",
"volto-google-analytics": "2.0.0",
"volto-multilingual-widget": "3.0.0",
Expand Down
4 changes: 2 additions & 2 deletions publiccode.yml
Original file line number Diff line number Diff line change
Expand Up @@ -227,9 +227,9 @@ maintenance:
name: io-Comune - Il sito AgID per Comuni ed Enti Pubblici
platforms:
- web
releaseDate: '2024-10-01'
releaseDate: '2024-10-03'
softwareType: standalone/web
softwareVersion: 7.31.3
softwareVersion: 7.31.4
url: 'https://github.com/italia/design-comuni-plone-theme'
usedBy:
- ASP Comuni Modenesi Area Nord
Expand Down
84 changes: 44 additions & 40 deletions src/customizations/volto-form-block/components/FormView.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -216,47 +216,51 @@ const FormView = ({
})}

{/*OTP*/}
{data.subblocks
.filter((subblock) => subblock.use_as_bcc)
.map((subblock, index) => {
const fieldName = getFieldName(
subblock.label,
subblock.id,
);
const name = fieldName + OTP_FIELDNAME_EXTENDER;
const fieldValue = formData[fieldName]?.value;
const value = formData[fieldName]?.otp;
const fields_to_send_with_value =
getFieldsToSendWithValue(subblock);
{data.email_otp_verification ? (
data.subblocks
.filter((subblock) => subblock.use_as_bcc)
.map((subblock, index) => {
const fieldName = getFieldName(
subblock.label,
subblock.id,
);
const name = fieldName + OTP_FIELDNAME_EXTENDER;
const fieldValue = formData[fieldName]?.value;
const value = formData[fieldName]?.otp;
const fields_to_send_with_value =
getFieldsToSendWithValue(subblock);

return (
<Row key={'row_otp' + index}>
<Col className="py-2">
<OTPWidget
{...subblock}
fieldValue={fieldValue}
onChange={(field, value) => {
onChangeFormData(
subblock.id,
fieldName,
fieldValue,
{
...fields_to_send_with_value,
otp: value,
},
);
}}
value={value}
valid={isValidField(name)}
errorMessage={getErrorMessage(name)}
formHasErrors={formErrors?.length > 0}
path={path}
block_id={block_id}
/>
</Col>
</Row>
);
})}
return (
<Row key={'row_otp' + index}>
<Col className="py-2">
<OTPWidget
{...subblock}
fieldValue={fieldValue}
onChange={(field, value) => {
onChangeFormData(
subblock.id,
fieldName,
fieldValue,
{
...fields_to_send_with_value,
otp: value,
},
);
}}
value={value}
valid={isValidField(name)}
errorMessage={getErrorMessage(name)}
formHasErrors={formErrors?.length > 0}
path={path}
block_id={block_id}
/>
</Col>
</Row>
);
})
) : (
<></>
)}

{enableCaptcha && <>{captcha.render()}</>}

Expand Down
10 changes: 5 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10916,7 +10916,7 @@ __metadata:
volto-customer-satisfaction: 1.0.0
volto-dropdownmenu: 4.0.0
volto-editablefooter: 5.0.1
volto-form-block: 3.9.3
volto-form-block: 3.10.0
volto-gdpr-privacy: 2.1.0
volto-google-analytics: 2.0.0
volto-multilingual-widget: 3.0.0
Expand Down Expand Up @@ -27516,9 +27516,9 @@ __metadata:
languageName: node
linkType: hard

"volto-form-block@npm:3.9.3":
version: 3.9.3
resolution: "volto-form-block@npm:3.9.3"
"volto-form-block@npm:3.10.0":
version: 3.10.0
resolution: "volto-form-block@npm:3.10.0"
dependencies:
"@hcaptcha/react-hcaptcha": ^0.3.6
file-saver: ^2.0.5
Expand All @@ -27527,7 +27527,7 @@ __metadata:
peerDependencies:
"@plone/volto": ">=16.0.0-alpha.38"
volto-subblocks: ^2.1.0
checksum: a9821974abcd48a3a9ff5d0fb6693f9262cae8d08a136265dc6f247cd2e216d229b24e7597033ff492ac27f9d316d59b9c464e50bf13cb6ad34f83b381958ec7
checksum: 8ddce2c624cf329f446a63772ce8dd643aed957b8d967463e76f3f83383704ca9b3d1fe0669390c5a965d9a2568123fdbb3408cf831cadb9e5cebfd164ca0aa9
languageName: node
linkType: hard

Expand Down

0 comments on commit a3d1e5a

Please sign in to comment.