From 0c8e8789bf70fe963e731b7d5e546489805d874a Mon Sep 17 00:00:00 2001 From: Christina Conrad <114612268+cconrad8@users.noreply.github.com> Date: Tue, 3 Sep 2024 15:58:53 -0400 Subject: [PATCH] Add files via upload --- NF-Tools-Schemas/SubmitObservationSchema.json | 87 +++++++++++++++++++ .../SubmitObservationUiSchema.json | 29 +++++++ 2 files changed, 116 insertions(+) create mode 100644 NF-Tools-Schemas/SubmitObservationSchema.json create mode 100644 NF-Tools-Schemas/SubmitObservationUiSchema.json diff --git a/NF-Tools-Schemas/SubmitObservationSchema.json b/NF-Tools-Schemas/SubmitObservationSchema.json new file mode 100644 index 00000000..30f41f3c --- /dev/null +++ b/NF-Tools-Schemas/SubmitObservationSchema.json @@ -0,0 +1,87 @@ +{ + "title": "Submission Form for NF Tools", + "type": "object", + "properties": { + "name": { + "type": "object", + "required": ["first_name", "last_name", "email"], + "properties": { + "first_name": { + "type": "string", + "title": "First Name" + }, + "last_name": { + "type": "string", + "title": "Last Name" + }, + "email": { + "type": "string", + "title": "Contact Email", + "format": "email" + }, + "institution": { + "type": "string", + "title": "Institution", + "default": "" + } + } + }, + "submitObservation": { + "type": "object", + "properties": { + "observations": { + "type": "array", + "title": "Add Observations", + "items": { + "type": "object", + "required": ["resourceName", "observationType", "details"], + "properties": { + "resourceName": { + "type": "string", + "title": "Name of Resource" + }, + "observationType": { + "type": "string", + "title": "Observation Type", + "enum": [ + "Body Length", + "Body Weight", + "Coat Color", + "Depositor Comment", + "Disease Susceptibility", + "Feed Intake", + "Feeding Behavior", + "General Comment or Review", + "Growth Rate", + "Issue", + "Lifespan", + "Motor Activity", + "Organ Development", + "Other", + "Reflex Development", + "Reproductive Behavior", + "Social Behavior", + "Swimming Behavior", + "Tumor Growth", + "Usage Instructions" + ] + }, + "details": { + "type": "string", + "title": "Observation Details" + }, + "referencePublication": { + "type": "string", + "title": "Publication Reference" + }, + "fileUpload": { + "type": "string", + "title": "Associated File" + } + } + } + } + } + } + } +} diff --git a/NF-Tools-Schemas/SubmitObservationUiSchema.json b/NF-Tools-Schemas/SubmitObservationUiSchema.json new file mode 100644 index 00000000..ce15063a --- /dev/null +++ b/NF-Tools-Schemas/SubmitObservationUiSchema.json @@ -0,0 +1,29 @@ +{ + "observations": { + "items": { + "resourceName": { + "ui:placeholder": "Enter the name of the resource" + }, + "observationType": { + "ui:widget": "select", + "ui:placeholder": "Select an observation type" + }, + "details": { + "ui:widget": "textarea", + "ui:placeholder": "Enter details of the observation", + "ui:options": { + "rows": 5 + } + }, + "referencePublication": { + "ui:placeholder": "Enter publication DOI" + }, + "fileUpload": { + "ui:widget": "file" + } + }, + "ui:options": { + "addButtonText": "Add Observation" + } + } +}