2
0
mirror of https://github.com/frappe/books.git synced 2024-11-09 23:30:56 +00:00

[layout] add form-body class

This commit is contained in:
Prateeksha Singh 2018-03-27 14:43:56 +05:30
parent d3c55e041c
commit f7eae3aade

View File

@ -1,20 +1,21 @@
const controls = require('./controls');
module.exports = class FormLayout {
constructor({fields, layout}) {
this.fields = fields;
this.layout = layout;
constructor({fields, layout}) {
this.fields = fields;
this.layout = layout;
this.controls = {};
this.controls = {};
this.controlList = [];
this.sections = [];
this.sections = [];
this.form = document.createElement('div');
this.form = document.createElement('div');
this.form.classList.add('form-body');
this.makeLayout();
}
this.makeLayout();
}
makeLayout() {
makeLayout() {
if (this.layout) {
for (let section of this.layout) {
this.makeSection(section);