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
8bad0be8
Commit
8bad0be8
authored
Aug 05, 2021
by
Jérome Perrin
Committed by
Cédric Le Ninivin
Mar 17, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixup! fixup! test_result: proto of parameter editor gadget
parent
01c39b9e
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
33 additions
and
15 deletions
+33
-15
bt5/erp5_json_form/SkinTemplateItem/portal_skins/erp5_json_form_react_jsonschema_form/react-jsonschema-form-gadget.html.html
...ct_jsonschema_form/react-jsonschema-form-gadget.html.html
+1
-0
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
-13
bt5/erp5_json_form/SkinTemplateItem/portal_skins/erp5_json_form_react_jsonschema_form/react-jsonschema-form-workaround-2503.js.js
...onschema_form/react-jsonschema-form-workaround-2503.js.js
+2
-0
bt5/erp5_json_form/SkinTemplateItem/portal_skins/erp5_json_form_react_jsonschema_form/react-jsonschema-form-workaround-2503.js.xml
...nschema_form/react-jsonschema-form-workaround-2503.js.xml
+28
-0
bt5/erp5_json_form/SkinTemplateItem/portal_skins/erp5_json_form_react_jsonschema_form/react-jsonschema-form.js.js
...on_form_react_jsonschema_form/react-jsonschema-form.js.js
+0
-2
No files found.
bt5/erp5_json_form/SkinTemplateItem/portal_skins/erp5_json_form_react_jsonschema_form/react-jsonschema-form-gadget.html.html
View file @
8bad0be8
...
...
@@ -7,6 +7,7 @@
<script
src=
"./react.production.min.js"
type=
"text/javascript"
></script>
<script
src=
"./react-dom.production.min.js"
type=
"text/javascript"
></script>
<script
src=
"./react-jsonschema-form-workaround-2503.js"
type=
"text/javascript"
></script>
<script
src=
"./react-jsonschema-form.js"
type=
"text/javascript"
></script>
<script
src=
"./ref-parser.min.js"
type=
"text/javascript"
></script>
...
...
bt5/erp5_json_form/SkinTemplateItem/portal_skins/erp5_json_form_react_jsonschema_form/react-jsonschema-form-gadget.js.js
View file @
8bad0be8
...
...
@@ -3,7 +3,7 @@
(
function
(
window
,
rJS
,
RSVP
,
document
)
{
'
use strict
'
;
/**
/**
* Prepare a ui-schema from the conventions of SlapOS instance parameters schema.
* This does the following:
* - remove `default` from schema. In SlapOS schemas we use `default` as a documentation
...
...
@@ -27,16 +27,9 @@ function makeUiSchema(schema, uiSchema, visited) {
if
(
schema
.
properties
)
{
for
(
const
[
key
,
value
]
of
Object
.
entries
(
schema
.
properties
))
{
uiSchema
[
key
]
=
{};
if
(
value
.
default
)
{
if
(
key
==
'
tcpv4-port
'
)
{
console
.
log
(
key
,
value
);
}
/** XXX value.const ... isn't it a bug in ERP5 SR schema ? */
if
(
value
.
default
&&
!
(
value
.
default
instanceof
Object
))
{
if
(
value
?.
type
===
'
string
'
&&
value
.
const
===
undefined
)
{
uiSchema
[
key
][
'
ui:placeholder
'
]
=
value
.
default
;
}
else
{
// XXX seems ugly
// uiSchema[key]['ui:help'] = `Default value: ${value.default}`
}
if
(
value
.
const
===
undefined
)
{
delete
value
.
default
;
...
...
@@ -79,10 +72,6 @@ function makeUiSchema(schema, uiSchema, visited) {
.
dereference
(
modification_dict
.
schema_url
)
.
then
(
function
(
schema
)
{
let
uiSchema
=
{};
// TODO: wouldn't using mergeAllOf here solve the problem of
// ERP5's kumofs default port
schema
=
JSONSchemaForm
.
utils
.
retrieveSchema
(
schema
);
makeUiSchema
(
schema
,
uiSchema
,
new
Set
())
console
.
log
(
'
after simplification
'
,
schema
,
uiSchema
);
...
...
bt5/erp5_json_form/SkinTemplateItem/portal_skins/erp5_json_form_react_jsonschema_form/react-jsonschema-form-workaround-2503.js.js
0 → 100644
View file @
8bad0be8
// XXX (jerome) workaround https://github.com/rjsf-team/react-jsonschema-form/issues/2503
window
.
react
=
React
;
bt5/erp5_json_form/SkinTemplateItem/portal_skins/erp5_json_form_react_jsonschema_form/react-jsonschema-form-workaround-2503.js.xml
0 → 100644
View file @
8bad0be8
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"File"
module=
"OFS.Image"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
__name__
</string>
</key>
<value>
<string>
react-jsonschema-form-workaround-2503.js
</string>
</value>
</item>
<item>
<key>
<string>
content_type
</string>
</key>
<value>
<string>
text/javascript
</string>
</value>
</item>
<item>
<key>
<string>
precondition
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_json_form/SkinTemplateItem/portal_skins/erp5_json_form_react_jsonschema_form/react-jsonschema-form.js.js
View file @
8bad0be8
This diff is collapsed.
Click to expand it.
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