diff --git a/src/plugins/recordTypes/index.js b/src/plugins/recordTypes/index.js index cdcdd01..2aa96a4 100644 --- a/src/plugins/recordTypes/index.js +++ b/src/plugins/recordTypes/index.js @@ -5,6 +5,7 @@ import conservation from './conservation'; import exhibition from './exhibition'; import iterationreport from './iterationreport'; import objectexit from './objectexit'; +import person from './person'; import place from './place'; export default [ @@ -15,5 +16,6 @@ export default [ exhibition, iterationreport, objectexit, + person, place, ]; diff --git a/src/plugins/recordTypes/person/forms/default.jsx b/src/plugins/recordTypes/person/forms/default.jsx new file mode 100644 index 0000000..ce61962 --- /dev/null +++ b/src/plugins/recordTypes/person/forms/default.jsx @@ -0,0 +1,210 @@ +const template = (configContext) => { + const { + React, + } = configContext.lib; + + const { + Col, + Panel, + Row, + } = configContext.layoutComponents; + + const { + InputTable, + Field, + Subrecord, + } = configContext.recordComponents; + + return ( + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ); +}; + +export default (configContext) => ({ + template: template(configContext), +}); diff --git a/src/plugins/recordTypes/person/forms/index.js b/src/plugins/recordTypes/person/forms/index.js new file mode 100644 index 0000000..b04a0c7 --- /dev/null +++ b/src/plugins/recordTypes/person/forms/index.js @@ -0,0 +1,5 @@ +import defaultForm from './default'; + +export default (configContext) => ({ + default: defaultForm(configContext), +}); diff --git a/src/plugins/recordTypes/person/index.js b/src/plugins/recordTypes/person/index.js new file mode 100644 index 0000000..36ef87a --- /dev/null +++ b/src/plugins/recordTypes/person/index.js @@ -0,0 +1,9 @@ +import forms from './forms'; + +export default () => (configContext) => ({ + recordTypes: { + person: { + forms: forms(configContext), + }, + }, +}); diff --git a/src/plugins/recordTypes/place/forms/default.jsx b/src/plugins/recordTypes/place/forms/default.jsx new file mode 100644 index 0000000..0f4c21f --- /dev/null +++ b/src/plugins/recordTypes/place/forms/default.jsx @@ -0,0 +1,162 @@ +const template = (configContext) => { + const { + React, + } = configContext.lib; + + const { + Panel, + Row, + Col, + } = configContext.layoutComponents; + + const { + Field, + InputTable, + } = configContext.recordComponents; + + const { + extensions, + } = configContext.config; + + return ( + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {extensions.address.form} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ); +}; + +export default (configContext) => ({ + template: template(configContext), +}); diff --git a/src/plugins/recordTypes/place/forms/index.js b/src/plugins/recordTypes/place/forms/index.js new file mode 100644 index 0000000..b04a0c7 --- /dev/null +++ b/src/plugins/recordTypes/place/forms/index.js @@ -0,0 +1,5 @@ +import defaultForm from './default'; + +export default (configContext) => ({ + default: defaultForm(configContext), +}); diff --git a/src/plugins/recordTypes/place/index.js b/src/plugins/recordTypes/place/index.js index 4672e65..ba27e62 100644 --- a/src/plugins/recordTypes/place/index.js +++ b/src/plugins/recordTypes/place/index.js @@ -1,9 +1,11 @@ +import forms from './forms'; import vocabularies from './vocabularies'; -export default () => ({ +export default () => (configContext) => ({ recordTypes: { place: { vocabularies, + forms: forms(configContext), }, }, });