From 13d8dac2658c2375e62ab5bae87236c068afb841 Mon Sep 17 00:00:00 2001 From: Michael Ritter Date: Wed, 16 Oct 2024 12:57:27 -0500 Subject: [PATCH] Collection Object NAGPRA Templates (#23) * Add core NAGPRA template * Add secondary NAGPRA template --- .../collectionobject/forms/corenagpra.jsx | 127 +++++ .../collectionobject/forms/index.js | 4 + .../forms/secondarynagpra.jsx | 464 ++++++++++++++++++ 3 files changed, 595 insertions(+) create mode 100644 src/plugins/recordTypes/collectionobject/forms/corenagpra.jsx create mode 100644 src/plugins/recordTypes/collectionobject/forms/secondarynagpra.jsx diff --git a/src/plugins/recordTypes/collectionobject/forms/corenagpra.jsx b/src/plugins/recordTypes/collectionobject/forms/corenagpra.jsx new file mode 100644 index 0000000..3046e1f --- /dev/null +++ b/src/plugins/recordTypes/collectionobject/forms/corenagpra.jsx @@ -0,0 +1,127 @@ +import { defineMessages } from 'react-intl'; + +const template = (configContext) => { + const { + React, + } = configContext.lib; + + const { + Col, + Panel, + Row, + } = configContext.layoutComponents; + + const { + Field, + } = configContext.recordComponents; + + const { + extensions, + } = configContext.config; + + return ( + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {extensions.nagpra.collectionobject.form} + {extensions.culturalcare.collectionobject.form} + + + ); +}; + +export default (configContext) => ({ + messages: defineMessages({ + name: { + id: 'form.collectionobject.corenagpra.name', + defaultMessage: 'Core NAGPRA', + }, + }), + template: template(configContext), +}); diff --git a/src/plugins/recordTypes/collectionobject/forms/index.js b/src/plugins/recordTypes/collectionobject/forms/index.js index 35dc328..8027425 100644 --- a/src/plugins/recordTypes/collectionobject/forms/index.js +++ b/src/plugins/recordTypes/collectionobject/forms/index.js @@ -1,9 +1,13 @@ +import corenagpraForm from './corenagpra'; import defaultForm from './default'; import publicForm from './public'; +import secondarynagpraForm from './secondarynagpra'; export default (configContext) => ({ + corenagpra: corenagpraForm(configContext), default: defaultForm(configContext), public: publicForm(configContext), + secondarynagpra: secondarynagpraForm(configContext), timebased: { disabled: true, }, diff --git a/src/plugins/recordTypes/collectionobject/forms/secondarynagpra.jsx b/src/plugins/recordTypes/collectionobject/forms/secondarynagpra.jsx new file mode 100644 index 0000000..bad39ef --- /dev/null +++ b/src/plugins/recordTypes/collectionobject/forms/secondarynagpra.jsx @@ -0,0 +1,464 @@ +import { defineMessages } from 'react-intl'; + +const template = (configContext) => { + const { + React, + } = configContext.lib; + + const { + Col, + Cols, + Panel, + Row, + } = configContext.layoutComponents; + + const { + Field, + InputTable, + } = configContext.recordComponents; + + const { + extensions, + } = configContext.config; + + return ( + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {extensions.dimension.form} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {extensions.nagpra.collectionobject.form} + {extensions.culturalcare.collectionobject.form} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {extensions.naturalhistory.collectionobject.form.taxonomicIdentGroupList} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ); +}; + +export default (configContext) => ({ + messages: defineMessages({ + name: { + id: 'form.collectionobject.secondarynagpra.name', + defaultMessage: 'Secondary NAGPRA', + }, + }), + template: template(configContext), +});