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
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Lukas Niegsch
erp5
Commits
863460fb
Commit
863460fb
authored
Aug 05, 2021
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixup! fixup! test_result: proto of parameter editor gadget
parent
2ab6b84a
Changes
5
Expand all
Show 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 @
863460fb
...
@@ -7,6 +7,7 @@
...
@@ -7,6 +7,7 @@
<script
src=
"./react.production.min.js"
type=
"text/javascript"
></script>
<script
src=
"./react.production.min.js"
type=
"text/javascript"
></script>
<script
src=
"./react-dom.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=
"./react-jsonschema-form.js"
type=
"text/javascript"
></script>
<script
src=
"./ref-parser.min.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 @
863460fb
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
(
function
(
window
,
rJS
,
RSVP
,
document
)
{
(
function
(
window
,
rJS
,
RSVP
,
document
)
{
'
use strict
'
;
'
use strict
'
;
/**
/**
* Prepare a ui-schema from the conventions of SlapOS instance parameters schema.
* Prepare a ui-schema from the conventions of SlapOS instance parameters schema.
* This does the following:
* This does the following:
* - remove `default` from schema. In SlapOS schemas we use `default` as a documentation
* - remove `default` from schema. In SlapOS schemas we use `default` as a documentation
...
@@ -27,16 +27,9 @@ function makeUiSchema(schema, uiSchema, visited) {
...
@@ -27,16 +27,9 @@ function makeUiSchema(schema, uiSchema, visited) {
if
(
schema
.
properties
)
{
if
(
schema
.
properties
)
{
for
(
const
[
key
,
value
]
of
Object
.
entries
(
schema
.
properties
))
{
for
(
const
[
key
,
value
]
of
Object
.
entries
(
schema
.
properties
))
{
uiSchema
[
key
]
=
{};
uiSchema
[
key
]
=
{};
if
(
value
.
default
)
{
if
(
value
.
default
&&
!
(
value
.
default
instanceof
Object
))
{
if
(
key
==
'
tcpv4-port
'
)
{
console
.
log
(
key
,
value
);
}
/** XXX value.const ... isn't it a bug in ERP5 SR schema ? */
if
(
value
?.
type
===
'
string
'
&&
value
.
const
===
undefined
)
{
if
(
value
?.
type
===
'
string
'
&&
value
.
const
===
undefined
)
{
uiSchema
[
key
][
'
ui:placeholder
'
]
=
value
.
default
;
uiSchema
[
key
][
'
ui:placeholder
'
]
=
value
.
default
;
}
else
{
// XXX seems ugly
// uiSchema[key]['ui:help'] = `Default value: ${value.default}`
}
}
if
(
value
.
const
===
undefined
)
{
if
(
value
.
const
===
undefined
)
{
delete
value
.
default
;
delete
value
.
default
;
...
@@ -79,10 +72,6 @@ function makeUiSchema(schema, uiSchema, visited) {
...
@@ -79,10 +72,6 @@ function makeUiSchema(schema, uiSchema, visited) {
.
dereference
(
modification_dict
.
schema_url
)
.
dereference
(
modification_dict
.
schema_url
)
.
then
(
function
(
schema
)
{
.
then
(
function
(
schema
)
{
let
uiSchema
=
{};
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
())
makeUiSchema
(
schema
,
uiSchema
,
new
Set
())
console
.
log
(
'
after simplification
'
,
schema
,
uiSchema
);
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 @
863460fb
// 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 @
863460fb
<?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 @
863460fb
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