Skip to content

Commit 4a411a2

Browse files
committed
#24 Removing the NormalForm
1 parent e843390 commit 4a411a2

File tree

2 files changed

+16
-36
lines changed

2 files changed

+16
-36
lines changed

src/components/form/NormalForm.js

Lines changed: 0 additions & 26 deletions
This file was deleted.

src/components/group/Group.js

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import React, { Component, PropTypes } from 'react';
2-
import AlertMessage from '../common/AlertMessage';
3-
import NormalForm from './../form/NormalForm';
2+
import Header from '../common/Header';
43
import BaseGroup from './BaseGroup';
54

65
class Group extends BaseGroup {
@@ -12,16 +11,23 @@ class Group extends BaseGroup {
1211
};
1312

1413
render() {
14+
1515
let { layout } = this.props;
16+
let content = this.getContent();
17+
18+
return (
19+
<section>
20+
<div className='row'>
21+
<div className="metaform-group">
22+
<Header title={layout.title}/>
23+
<div className="metaform-group-content">
24+
{ content }
25+
</div>
26+
</div>
27+
</div>
28+
</section>
29+
);
1630

17-
// the passed in layout can contain either fields or groups.
18-
// in case it contains 'fields', we're gonna render each of the fields.
19-
// in case it contains 'groups', we're gonna render each group, passing the fields as a parameter
20-
try {
21-
return <NormalForm title={layout.title} content={this.getContent()}/>
22-
} catch (ex) {
23-
return <AlertMessage error={ex}/>
24-
}
2531
}
2632
}
2733

0 commit comments

Comments
 (0)