Skip to content

Commit

Permalink
added reorganization to settings page
Browse files Browse the repository at this point in the history
  • Loading branch information
RyanBirtch-aot committed Sep 24, 2024
1 parent 73395f5 commit 518b568
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 31 deletions.
4 changes: 2 additions & 2 deletions components/src/components/Map/Component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export default class Component extends (FieldComponent as any) {
const {
numPoints,
defaultZoom,
readOnlyMap,
allowSubmissions,
center,
defaultValue,
myLocation,
Expand All @@ -97,7 +97,7 @@ export default class Component extends (FieldComponent as any) {
form,
numPoints,
defaultZoom,
readOnlyMap,
readOnlyMap: !allowSubmissions, // if allow submissions, read only is false
defaultValue,
onDrawnItemsChange: this.saveDrawnItems.bind(this),
viewMode,
Expand Down
73 changes: 44 additions & 29 deletions components/src/components/Map/editForm/Component.edit.data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@ export default {
label: 'Data',
weight: 20,
components: [
{
html: '<h2>Default Values</h2>',
key: 'simplecontent1',
type: 'simplecontent',
input: false,
tableView: false,
label: 'Text/Images',
},
{
type: 'map',
label: 'Default Value',
Expand All @@ -13,32 +21,6 @@ export default {
'This will be the value for this field, before user interaction.',
input: true,
},
{
label: 'Marker Type ',
values: [
{
label: 'Add a point marker (drop a pin)',
value: 'marker',
},
{
label:
'Add circular area of interest through a point and custom radius',
value: 'circle',
},
],
defaultValue: 'marker',
key: 'markerType',
type: 'simpleradios',
input: true,
},
{
label: 'How many Markers per Submission?',
key: 'numPoints',
type: 'simplenumber',
defaultValue: 1,
input: true,
},

{
label: 'Default Zoom Level',
description:
Expand All @@ -64,18 +46,51 @@ export default {
tableView: false,
markerType: 'marker',
defaultZoom: 5,
readOnlyMap: false,
allowSubmissions: true,
description:
'Please select the desired default center using a single marker',
},
{
label: 'Read Only Map',
html: '<h2>Submitter Options</h2>',
key: 'simplecontent1',
type: 'simplecontent',
input: false,
tableView: false,
label: 'Text/Images',
},
{
label: 'Allow submitters to add input on the map',
description:
'This allows for the user to view and scroll the map, but not add any input',
key: 'readOnlyMap',
key: 'allowSubmissions',
type: 'simplecheckbox',
input: true,
},
{
label: 'Marker Type ',
values: [
{
label: 'Add a point marker (drop a pin)',
value: 'marker',
},
{
label:
'Add circular area of interest through a point and custom radius',
value: 'circle',
},
],
defaultValue: 'marker',
key: 'markerType',
type: 'simpleradios',
input: true,
},
{
label: 'How many Markers per Submission?',
key: 'numPoints',
type: 'simplenumber',
defaultValue: 1,
input: true,
},
{
label: 'Submitter "My Location" button',
description:
Expand Down

0 comments on commit 518b568

Please sign in to comment.