forked from brutusin/json-forms
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from saicheck2233/new_AddRadioButtonExample
enhancement: add radio button example
- Loading branch information
Showing
1 changed file
with
11 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 { | ||
|
@@ -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) { | ||
|
@@ -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"; | ||
|
@@ -300,6 +306,5 @@ <h4 class="panel-title"> | |
); | ||
|
||
</script> | ||
</div> | ||
</body> | ||
</body> | ||
</html> |