Skip to content

Commit 39111ff

Browse files
authored
Merge pull request #23 from redux-autoform/experimental
TabsForm Support
2 parents d44573e + 0ec7c30 commit 39111ff

28 files changed

+230
-71
lines changed

demo/presets.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,5 +116,13 @@ export default [
116116
layoutName: 'edit',
117117
formTitle: 'Edit contact',
118118
schema: require('./presets/componentsFieldGroup.txt')
119+
},
120+
{
121+
name: 'Layout Tabs',
122+
displayName: 'Layout Tabs',
123+
entityName: 'contact',
124+
layoutName: 'edit',
125+
formTitle: 'Edit contact',
126+
schema: require('./presets/layoutsTabs.txt')
119127
}
120128
]

demo/presets/layoutsTabs.txt

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
{
2+
entities: [
3+
{
4+
name: "contact",
5+
fields: [
6+
{ name: "f1", displayName: "Field 1", type: "string" },
7+
{ name: "f2", displayName: "Field 2", type: "string" },
8+
{ name: "f3", displayName: "Field 3", type: "string" },
9+
{ name: "f4", displayName: "Field 4", type: "string" },
10+
{ name: "f5", displayName: "Field 5", type: "string" },
11+
{ name: "f6", displayName: "Field 6", type: "string" },
12+
{ name: "f7", displayName: "Field 7", type: "string" },
13+
{ name: "f8", displayName: "Field 8", type: "string" },
14+
],
15+
layouts: [
16+
{
17+
name: 'edit',
18+
type: 'tabs',
19+
groups: [
20+
{
21+
title: 'First',
22+
fields: [
23+
{
24+
name: 'f1'
25+
},
26+
{
27+
name: 'f2',
28+
size: 8
29+
}
30+
]
31+
},
32+
{
33+
title: 'Second',
34+
orientation: 'horizontal',
35+
fields: [
36+
{
37+
name: 'f3'
38+
},
39+
{
40+
name: 'f4'
41+
}
42+
]
43+
},
44+
{
45+
title: 'Third',
46+
orientation: 'horizontal',
47+
fields: [
48+
{
49+
name: 'f5',
50+
size: 4
51+
},
52+
{
53+
name: 'f6',
54+
size: 8
55+
}
56+
]
57+
},
58+
{
59+
title: 'Fourth',
60+
orientation: 'horizontal',
61+
fields: [
62+
{
63+
name: 'f7',
64+
innerSize: 3
65+
},
66+
{
67+
name: 'f8',
68+
innerSize: 3
69+
}
70+
]
71+
}
72+
]
73+
}
74+
]
75+
}
76+
]
77+
}

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
"homepage": "https://github.com/redux-autoform/redux-autoform-bootstrap-ui#readme",
3030
"dependencies": {
3131
"bootstrap": "^3.3.6",
32+
"font-awesome": "^4.6.3",
3233
"isomorphic-fetch": "^2.2.1",
3334
"react": "^15.1.0",
3435
"react-bootstrap": "^0.30.0",
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import React, { Component, PropTypes } from 'react';
2+
import { Alert } from 'react-bootstrap';
3+
4+
const AlertMessage = ({ error }) => (
5+
<Alert bsStyle='danger'>
6+
<h4>
7+
Could not render the MetaFormGroup component. The schema is not valid.
8+
</h4>
9+
<p>Detailed information:
10+
<b>{ error.message }</b>
11+
</p>
12+
</Alert>
13+
);
14+
15+
export default AlertMessage;
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)