From cd708fa294afc698a1ac9ff615e63c173853183d Mon Sep 17 00:00:00 2001 From: Bogdan Bodnar Date: Wed, 6 May 2020 19:28:46 +0200 Subject: [PATCH 1/3] Add initial form data to children of the ForisForm. --- src/common/WiFiSettings/WiFiForm.js | 5 ++--- src/form/components/ForisForm.js | 1 + 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/common/WiFiSettings/WiFiForm.js b/src/common/WiFiSettings/WiFiForm.js index a779f77..34aa2f7 100644 --- a/src/common/WiFiSettings/WiFiForm.js +++ b/src/common/WiFiSettings/WiFiForm.js @@ -36,7 +36,7 @@ WiFiForm.defaultProps = { }; export default function WiFiForm({ - formData, formErrors, setFormValue, hasGuestNetwork, ...props + formData, formErrors, setFormValue, hasGuestNetwork, disabled, }) { return formData.devices.map((device) => ( )); } diff --git a/src/form/components/ForisForm.js b/src/form/components/ForisForm.js index fd66abf..e2cf06e 100644 --- a/src/form/components/ForisForm.js +++ b/src/form/components/ForisForm.js @@ -149,6 +149,7 @@ export function ForisForm({ const childrenWithFormProps = React.Children.map( children, (child) => React.cloneElement(child, { + initialData: formState.initialData, formData: formState.data, formErrors: formState.errors, setFormValue: onFormChangeHandler, From ae49b246cdef9a2a69046c850184015b4a11046f Mon Sep 17 00:00:00 2001 From: Bogdan Bodnar Date: Thu, 7 May 2020 16:13:03 +0200 Subject: [PATCH 2/3] Update translations (.pot). --- translations/forisjs.pot | 66 ++++++++++++++++++++-------------------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/translations/forisjs.pot b/translations/forisjs.pot index 0af4285..83b284e 100644 --- a/translations/forisjs.pot +++ b/translations/forisjs.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PROJECT VERSION\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2020-02-20 17:28+0100\n" +"POT-Creation-Date: 2020-05-07 16:12+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -17,34 +17,6 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.8.0\n" -#: src/validations.js:13 -msgid "This is not a valid IPv4 address." -msgstr "" - -#: src/validations.js:14 -msgid "This is not a valid IPv6 address." -msgstr "" - -#: src/validations.js:15 -msgid "This is not a valid IPv6 prefix." -msgstr "" - -#: src/validations.js:16 -msgid "This is not a valid domain name." -msgstr "" - -#: src/validations.js:17 -msgid "This is not a valid DUID." -msgstr "" - -#: src/validations.js:18 -msgid "This is not a valid MAC address." -msgstr "" - -#: src/validations.js:19 -msgid "Doesn't contain a list of emails separated by commas." -msgstr "" - #: src/api/utils.js:58 msgid "The session is expired. Please log in again." msgstr "" @@ -107,15 +79,15 @@ msgid "" " " msgstr "" -#: src/common/WiFiSettings/WiFiForm.js:82 +#: src/common/WiFiSettings/WiFiForm.js:81 msgid "Wi-Fi ${deviceID + 1}" msgstr "" -#: src/common/WiFiSettings/WiFiForm.js:84 +#: src/common/WiFiSettings/WiFiForm.js:83 msgid "Enable" msgstr "" -#: src/common/WiFiSettings/WiFiForm.js:215 +#: src/common/WiFiSettings/WiFiForm.js:214 msgid "auto" msgstr "" @@ -222,7 +194,7 @@ msgstr "" msgid "Settings saved successfully" msgstr "" -#: src/form/components/ForisForm.js:165 +#: src/form/components/ForisForm.js:166 msgid "Changes you made may not be saved. Are you sure you want to leave?" msgstr "" @@ -242,3 +214,31 @@ msgstr "" msgid "An error occurred while fetching data." msgstr "" +#: src/utils/validations.js:13 +msgid "This is not a valid IPv4 address." +msgstr "" + +#: src/utils/validations.js:14 +msgid "This is not a valid IPv6 address." +msgstr "" + +#: src/utils/validations.js:15 +msgid "This is not a valid IPv6 prefix." +msgstr "" + +#: src/utils/validations.js:16 +msgid "This is not a valid domain name." +msgstr "" + +#: src/utils/validations.js:17 +msgid "This is not a valid DUID." +msgstr "" + +#: src/utils/validations.js:18 +msgid "This is not a valid MAC address." +msgstr "" + +#: src/utils/validations.js:19 +msgid "Doesn't contain a list of emails separated by commas." +msgstr "" + From 71beeb46f195e4217ec1f1bdb4c6c2e27e451e5d Mon Sep 17 00:00:00 2001 From: Bogdan Bodnar Date: Thu, 7 May 2020 16:34:33 +0200 Subject: [PATCH 3/3] Bump v4.5.1. * Add initial data to ForisForm children. * Update .pot file. --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 3dffbfb..312fb5d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "foris", - "version": "4.5.0", + "version": "4.5.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index de698f9..444a851 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "foris", - "version": "4.5.0", + "version": "4.5.1", "description": "Set of components and utils for Foris and its plugins.", "author": "CZ.NIC, z.s.p.o.", "repository": {