Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
R
rjs_json_form
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
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
Rafael Monnerat
rjs_json_form
Commits
a68980fb
Commit
a68980fb
authored
Apr 20, 2018
by
Boris Kocherov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use required html5 attribute
parent
42b8f77d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
gadget_json_generated_form.js
gadget_json_generated_form.js
+9
-4
No files found.
gadget_json_generated_form.js
View file @
a68980fb
...
...
@@ -598,8 +598,9 @@
return
queue
;
}
function
render_field
(
gadget
,
key
,
path
,
json_field
,
default_value
,
root
,
schema_path
,
type
)
{
var
div
,
function
render_field
(
gadget
,
key
,
path
,
json_field
,
default_value
,
root
,
schema_path
,
options
)
{
var
type
,
div
,
label
,
div_input
,
span_info
,
...
...
@@ -608,6 +609,9 @@
first_path
,
queue
=
RSVP
.
Queue
();
options
=
options
||
{};
type
=
options
.
type
;
if
(
path
&&
key
)
{
first_path
=
path
+
encodeJsonPointer
(
key
);
}
else
{
...
...
@@ -719,6 +723,7 @@
// gadget.props.inputs not contain values
gadget
.
props
.
inputs
.
push
(
input
);
input
.
name
=
first_path
;
input
.
required
=
options
.
required
;
// XXX for gui
//input.setAttribute("class", "slapos-parameter");
div_input
.
appendChild
(
input
);
...
...
@@ -840,7 +845,7 @@
}
queue
.
push
(
render_field
.
bind
(
g
,
g
,
key
,
path
,
json_field
.
properties
[
key
],
default_dict
[
key
],
root
)
json_field
.
properties
[
key
],
default_dict
[
key
],
root
,
schema_path
,
{
required
:
true
}
)
);
}
else
if
(
default_dict
.
hasOwnProperty
(
key
))
{
used_properties
[
key
]
=
""
;
...
...
@@ -1333,7 +1338,7 @@
root
.
appendChild
(
delete_button
);
}
return
render_field
(
g
,
property_name
,
""
,
schema
,
options
.
document
,
root
,
options
.
schema_path
,
options
.
type
)
options
.
document
,
root
,
options
.
schema_path
,
{
type
:
options
.
type
}
)
.
push
(
function
()
{
g
.
listenEvents
();
return
g
.
element
;
...
...
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