Skip to content

Commit 0115dc3

Browse files
authored
Merge pull request #8 from saicheck2233/new_AddRadioButtonExample
enhancement: add radio button example
2 parents b23f675 + 5152ac7 commit 0115dc3

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

index.html

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
<link rel="stylesheet" href="lib/codemirror/codemirror.css">
77
<link rel="stylesheet" href="lib/bootstrap-select/css/bootstrap-select.min.css">
88
<link rel="stylesheet" href="lib/octicons/octicons.css">
9-
<link rel="stylesheet" href='//rawgit.com/brutusin/json-forms/master/dist/css/brutusin-json-forms.min.css'/>
9+
<link rel="stylesheet" href='src/css/brutusin-json-forms.css'/>
10+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.css">
1011

1112
<style>
1213
img {
@@ -27,8 +28,8 @@
2728
<!--
2829
<script src="//rawgit.com/brutusin/json-forms/master/dist/js/brutusin-json-forms.min.js"></script>
2930
-->
30-
<script src="//rawgit.com/brutusin/json-forms/master/src/js/brutusin-json-forms.js"></script>
31-
<script src="//rawgit.com/brutusin/json-forms/master/dist/js/brutusin-json-forms-bootstrap.min.js"></script>
31+
<script src="src/js/brutusin-json-forms.js"></script>
32+
<script src="src/js/brutusin-json-forms-bootstrap.js"></script>
3233
<script lang="javascript">
3334
var BrutusinForms = brutusin["json-forms"];
3435
BrutusinForms.bootstrap.addFormatDecorator("inputstream", "file", "glyphicon-search", function (element) {
@@ -112,7 +113,12 @@
112113
{"type":"object","properties":{"prop1":{"type":"integer"},"prop2":{"type":"integer","required":true},"prop3":{"type":"integer","required":true},"composite1":{"type":"object","properties":{"nested1":{"type":"number","required":true},"nested2":{"type":"number","required":true}},"required":["nested1","nested2"]},"composite2":{"type":"object","properties":{"nested1":{"type":"number","required":true},"nested2":{"type":"number","required":true}},"required":["nested1","nested2"]}},"required":["prop1","prop2","composite1"]},
113114
null,
114115
null,
115-
"Required properties supported in both v3 and v4+ spec formats. Last one format takes preference. More info [here](https://github.com/brutusin/json-forms/issues/56)"]
116+
"Required properties supported in both v3 and v4+ spec formats. Last one format takes preference. More info [here](https://github.com/brutusin/json-forms/issues/56)"],
117+
["Radio button",
118+
{"$schema": "http://json-schema.org/draft-03/schema#", "type": "object", "properties": {"radio1": {"type": "boolean","format": "radio","title": "Animal", "required": true, "enum": ["Dog", "Cat", "Bird"]}}},
119+
null,
120+
null,
121+
"Boolean supporting radio type. Must define `format` and `enum` fields."]
116122
];
117123

118124
var selectedTab = "schema";
@@ -300,6 +306,5 @@ <h4 class="panel-title">
300306
);
301307

302308
</script>
303-
</div>
304-
</body>
309+
</body>
305310
</html>

0 commit comments

Comments
 (0)