Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
18
Merge Requests
18
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
slapos.core
Commits
566e2482
Commit
566e2482
authored
Nov 24, 2022
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_jio: Fixup render sub-forms on readonly
parent
8acfbf11
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
30 deletions
+34
-30
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_parameter_form_js.js
...age_module/rjs_gadget_erp5_page_slap_parameter_form_js.js
+32
-28
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_parameter_form_js.xml
...ge_module/rjs_gadget_erp5_page_slap_parameter_form_js.xml
+2
-2
No files found.
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_parameter_form_js.js
View file @
566e2482
...
...
@@ -266,7 +266,6 @@
input
,
default_value
,
default_used_list
=
[],
default_div
,
is_required
;
if
(
default_dict
===
undefined
)
{
...
...
@@ -277,7 +276,7 @@
path
=
"
/
"
;
}
if
(
editable
&&
json_field
.
patternProperties
!==
undefined
)
{
if
(
json_field
.
patternProperties
!==
undefined
)
{
if
(
json_field
.
patternProperties
[
'
.*
'
]
!==
undefined
)
{
div
=
domsugar
(
"
div
"
,
{
...
...
@@ -285,31 +284,30 @@
title
:
json_field
.
description
});
div_input
=
domsugar
(
"
div
"
,
{
"
class
"
:
"
input
"
},
[
domsugar
(
'
input
'
,
{
type
:
"
text
"
,
// Name is only meaningfull to automate tests
name
:
"
ADD
"
+
path
}),
domsugar
(
'
button
'
,
{
value
:
btoa
(
JSON
.
stringify
(
json_field
.
patternProperties
[
'
.*
'
])),
"
class
"
:
"
add-sub-form
"
,
type
:
"
button
"
,
name
:
path
,
text
:
"
+
"
})
]);
div
.
appendChild
(
div_input
);
if
(
editable
)
{
div_input
=
domsugar
(
"
div
"
,
{
"
class
"
:
"
input
"
},
[
domsugar
(
'
input
'
,
{
type
:
"
text
"
,
// Name is only meaningfull to automate tests
name
:
"
ADD
"
+
path
}),
domsugar
(
'
button
'
,
{
value
:
btoa
(
JSON
.
stringify
(
json_field
.
patternProperties
[
'
.*
'
])),
"
class
"
:
"
add-sub-form
"
,
type
:
"
button
"
,
name
:
path
,
text
:
"
+
"
})
]);
div
.
appendChild
(
div_input
);
}
for
(
default_value
in
default_dict
)
{
if
(
default_dict
.
hasOwnProperty
(
default_value
))
{
default_div
=
domsugar
(
"
div
"
,
{
"
class
"
:
"
slapos-parameter-dict-key
"
},
[
domsugar
(
'
label
'
,
{
if
(
editable
)
{
label
=
domsugar
(
'
label
'
,
{
text
:
default_value
,
'
class
'
:
"
slapos-parameter-dict-key
"
},
[
...
...
@@ -318,13 +316,20 @@
"
class
"
:
"
bt_close CLOSE
"
+
path
+
"
/
"
+
default_value
,
title
:
"
Remove this parameter section.
"
})
])
]);
]);
}
else
{
label
=
domsugar
(
'
label
'
,
{
text
:
default_value
,
'
class
'
:
"
slapos-parameter-dict-key
"
});
}
div
.
appendChild
(
render_subform
(
json_field
.
patternProperties
[
'
.*
'
],
default_dict
[
default_value
],
default_div
,
domsugar
(
"
div
"
,
{
"
class
"
:
"
slapos-parameter-dict-key
"
},
[
label
]),
path
+
"
/
"
+
default_value
,
editable
));
...
...
@@ -518,7 +523,6 @@
convertOnMultiLevel
(
entry
,
json_dict
[
entry
],
multi_level_dict
);
}
}
return
multi_level_dict
;
}
...
...
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_parameter_form_js.xml
View file @
566e2482
...
...
@@ -280,7 +280,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
1004.3
1309.44548.40652
</string>
</value>
<value>
<string>
1004.3
5236.24159.46370
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -298,7 +298,7 @@
</tuple>
<state>
<tuple>
<float>
1669
089218.99
</float>
<float>
1669
302506.42
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
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