mirror of
https://github.com/frappe/books.git
synced 2024-11-10 15:50:56 +00:00
20 lines
536 B
JavaScript
20 lines
536 B
JavaScript
const control_classes = {
|
|
Data: require('./data'),
|
|
Text: require('./text'),
|
|
Select: require('./select'),
|
|
Link: require('./link'),
|
|
Float: require('./float'),
|
|
Currency: require('./currency')
|
|
}
|
|
|
|
module.exports = {
|
|
get_control_class(fieldtype) {
|
|
return control_classes[fieldtype];
|
|
},
|
|
make_control(field, parent) {
|
|
const control_class = this.get_control_class(field.fieldtype);
|
|
let control = new control_class(field, parent);
|
|
control.make();
|
|
return control;
|
|
}
|
|
} |