Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Cédric Le Ninivin
erp5
Commits
8f5158f2
Commit
8f5158f2
authored
Oct 21, 2021
by
Cédric Le Ninivin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_json_form: react jsonschema form gadget use typeof to be compatible with firefox 68
parent
e250eba1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
bt5/erp5_json_form/SkinTemplateItem/portal_skins/erp5_json_form_react_jsonschema_form/react-jsonschema-form-gadget.js.js
..._react_jsonschema_form/react-jsonschema-form-gadget.js.js
+2
-2
No files found.
bt5/erp5_json_form/SkinTemplateItem/portal_skins/erp5_json_form_react_jsonschema_form/react-jsonschema-form-gadget.js.js
View file @
8f5158f2
...
...
@@ -28,7 +28,7 @@ function makeUiSchema(schema, uiSchema, visited) {
for
(
const
[
key
,
value
]
of
Object
.
entries
(
schema
.
properties
))
{
uiSchema
[
key
]
=
{};
if
(
value
.
default
&&
!
(
value
.
default
instanceof
Object
))
{
if
(
value
?.
type
===
'
string
'
&&
value
.
const
===
undefined
)
{
if
(
typeof
(
value
)
===
'
string
'
&&
value
.
const
===
undefined
)
{
uiSchema
[
key
][
'
ui:placeholder
'
]
=
value
.
default
;
}
if
(
value
.
const
===
undefined
)
{
...
...
@@ -43,7 +43,7 @@ function makeUiSchema(schema, uiSchema, visited) {
if
(
value
.
textarea
)
{
uiSchema
[
key
][
"
ui:widget
"
]
=
"
textarea
"
}
if
(
value
?.
type
===
'
object
'
)
{
if
(
typeof
(
value
)
===
'
object
'
)
{
makeUiSchema
(
value
,
uiSchema
[
key
],
visited
);
}
for
(
const
oneOf
of
value
.
oneOf
||
[])
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment