Skip to content

Commit

Permalink
Merge pull request #8 from saicheck2233/new_AddRadioButtonExample
Browse files Browse the repository at this point in the history
enhancement: add radio button example
  • Loading branch information
saicheck2233 authored Jul 6, 2023
2 parents b23f675 + 5152ac7 commit 0115dc3
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
<link rel="stylesheet" href="lib/codemirror/codemirror.css">
<link rel="stylesheet" href="lib/bootstrap-select/css/bootstrap-select.min.css">
<link rel="stylesheet" href="lib/octicons/octicons.css">
<link rel="stylesheet" href='//rawgit.com/brutusin/json-forms/master/dist/css/brutusin-json-forms.min.css'/>
<link rel="stylesheet" href='src/css/brutusin-json-forms.css'/>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.css">

<style>
img {
Expand All @@ -27,8 +28,8 @@
<!--
<script src="//rawgit.com/brutusin/json-forms/master/dist/js/brutusin-json-forms.min.js"></script>
-->
<script src="//rawgit.com/brutusin/json-forms/master/src/js/brutusin-json-forms.js"></script>
<script src="//rawgit.com/brutusin/json-forms/master/dist/js/brutusin-json-forms-bootstrap.min.js"></script>
<script src="src/js/brutusin-json-forms.js"></script>
<script src="src/js/brutusin-json-forms-bootstrap.js"></script>
<script lang="javascript">
var BrutusinForms = brutusin["json-forms"];
BrutusinForms.bootstrap.addFormatDecorator("inputstream", "file", "glyphicon-search", function (element) {
Expand Down Expand Up @@ -112,7 +113,12 @@
{"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"]},
null,
null,
"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)"]
"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)"],
["Radio button",
{"$schema": "http://json-schema.org/draft-03/schema#", "type": "object", "properties": {"radio1": {"type": "boolean","format": "radio","title": "Animal", "required": true, "enum": ["Dog", "Cat", "Bird"]}}},
null,
null,
"Boolean supporting radio type. Must define `format` and `enum` fields."]
];

var selectedTab = "schema";
Expand Down Expand Up @@ -300,6 +306,5 @@ <h4 class="panel-title">
);

</script>
</div>
</body>
</body>
</html>

0 comments on commit 0115dc3

Please sign in to comment.