Merge pull request #866 from colouring-cities/activate-address-fields
Activate address fields
This commit is contained in:
commit
1caa5d2fd8
@ -56,7 +56,7 @@ export const buildingAttributesConfig = valueType<DataFieldConfig>()({ /* eslint
|
|||||||
verify: true,
|
verify: true,
|
||||||
},
|
},
|
||||||
location_name: {
|
location_name: {
|
||||||
edit: false,
|
edit: true,
|
||||||
verify: true,
|
verify: true,
|
||||||
},
|
},
|
||||||
location_number: {
|
location_number: {
|
||||||
@ -64,17 +64,20 @@ export const buildingAttributesConfig = valueType<DataFieldConfig>()({ /* eslint
|
|||||||
verify: true,
|
verify: true,
|
||||||
},
|
},
|
||||||
location_street: {
|
location_street: {
|
||||||
edit: false,
|
edit: true,
|
||||||
verify: true,
|
verify: true,
|
||||||
},
|
},
|
||||||
location_line_two: {
|
location_line_two: {
|
||||||
edit: false,
|
edit: true,
|
||||||
|
verify: true
|
||||||
},
|
},
|
||||||
location_town: {
|
location_town: {
|
||||||
edit: false,
|
edit: true,
|
||||||
|
verify: true
|
||||||
},
|
},
|
||||||
location_postcode: {
|
location_postcode: {
|
||||||
edit: false,
|
edit: true,
|
||||||
|
verify: true
|
||||||
},
|
},
|
||||||
location_latitude: {
|
location_latitude: {
|
||||||
edit: true,
|
edit: true,
|
||||||
|
@ -15,7 +15,6 @@ const locationNumberPattern = "[1-9]\\d*[a-z]?(-([1-9]\\d*))?"; ///[1-9]\d*[a-z]
|
|||||||
|
|
||||||
const LocationView: React.FunctionComponent<CategoryViewProps> = (props) => (
|
const LocationView: React.FunctionComponent<CategoryViewProps> = (props) => (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<InfoBox msg="Text-based address fields are disabled at the moment. We're looking into how best to collect this data." />
|
|
||||||
<DataEntry
|
<DataEntry
|
||||||
title={dataFields.location_name.title}
|
title={dataFields.location_name.title}
|
||||||
slug="location_name"
|
slug="location_name"
|
||||||
@ -25,7 +24,7 @@ const LocationView: React.FunctionComponent<CategoryViewProps> = (props) => (
|
|||||||
onChange={props.onChange}
|
onChange={props.onChange}
|
||||||
tooltip={dataFields.location_name.tooltip}
|
tooltip={dataFields.location_name.tooltip}
|
||||||
placeholder="Building name (if any)"
|
placeholder="Building name (if any)"
|
||||||
disabled={true}
|
|
||||||
/>
|
/>
|
||||||
<Verification
|
<Verification
|
||||||
slug="location_name"
|
slug="location_name"
|
||||||
@ -62,7 +61,7 @@ const LocationView: React.FunctionComponent<CategoryViewProps> = (props) => (
|
|||||||
mode={props.mode}
|
mode={props.mode}
|
||||||
copy={props.copy}
|
copy={props.copy}
|
||||||
onChange={props.onChange}
|
onChange={props.onChange}
|
||||||
disabled={true}
|
|
||||||
/>
|
/>
|
||||||
<Verification
|
<Verification
|
||||||
slug="location_street"
|
slug="location_street"
|
||||||
@ -80,7 +79,14 @@ const LocationView: React.FunctionComponent<CategoryViewProps> = (props) => (
|
|||||||
mode={props.mode}
|
mode={props.mode}
|
||||||
copy={props.copy}
|
copy={props.copy}
|
||||||
onChange={props.onChange}
|
onChange={props.onChange}
|
||||||
disabled={true}
|
/>
|
||||||
|
<Verification
|
||||||
|
slug="location_line_two"
|
||||||
|
allow_verify={props.user !== undefined && props.building.location_line_two !== null && !props.edited}
|
||||||
|
onVerify={props.onVerify}
|
||||||
|
user_verified={props.user_verified.hasOwnProperty("location_line_two")}
|
||||||
|
user_verified_as={props.user_verified.location_line_two}
|
||||||
|
verified_count={props.building.verified.location_line_two}
|
||||||
/>
|
/>
|
||||||
<DataEntry
|
<DataEntry
|
||||||
title={dataFields.location_town.title}
|
title={dataFields.location_town.title}
|
||||||
@ -89,7 +95,15 @@ const LocationView: React.FunctionComponent<CategoryViewProps> = (props) => (
|
|||||||
mode={props.mode}
|
mode={props.mode}
|
||||||
copy={props.copy}
|
copy={props.copy}
|
||||||
onChange={props.onChange}
|
onChange={props.onChange}
|
||||||
disabled={true}
|
|
||||||
|
/>
|
||||||
|
<Verification
|
||||||
|
slug="location_town"
|
||||||
|
allow_verify={props.user !== undefined && props.building.location_town !== null && !props.edited}
|
||||||
|
onVerify={props.onVerify}
|
||||||
|
user_verified={props.user_verified.hasOwnProperty("location_town")}
|
||||||
|
user_verified_as={props.user_verified.location_town}
|
||||||
|
verified_count={props.building.verified.location_town}
|
||||||
/>
|
/>
|
||||||
<DataEntry
|
<DataEntry
|
||||||
title={dataFields.location_postcode.title}
|
title={dataFields.location_postcode.title}
|
||||||
@ -100,7 +114,15 @@ const LocationView: React.FunctionComponent<CategoryViewProps> = (props) => (
|
|||||||
onChange={props.onChange}
|
onChange={props.onChange}
|
||||||
maxLength={8}
|
maxLength={8}
|
||||||
valueTransform={x=>x.toUpperCase()}
|
valueTransform={x=>x.toUpperCase()}
|
||||||
disabled={true}
|
|
||||||
|
/>
|
||||||
|
<Verification
|
||||||
|
slug="location_postcode"
|
||||||
|
allow_verify={props.user !== undefined && props.building.location_postcode !== null && !props.edited}
|
||||||
|
onVerify={props.onVerify}
|
||||||
|
user_verified={props.user_verified.hasOwnProperty("location_postcode")}
|
||||||
|
user_verified_as={props.user_verified.location_postcode}
|
||||||
|
verified_count={props.building.verified.location_postcode}
|
||||||
/>
|
/>
|
||||||
<DataEntry
|
<DataEntry
|
||||||
title={dataFields.ref_toid.title}
|
title={dataFields.ref_toid.title}
|
||||||
@ -110,7 +132,7 @@ const LocationView: React.FunctionComponent<CategoryViewProps> = (props) => (
|
|||||||
copy={props.copy}
|
copy={props.copy}
|
||||||
tooltip={dataFields.ref_toid.tooltip}
|
tooltip={dataFields.ref_toid.tooltip}
|
||||||
onChange={props.onChange}
|
onChange={props.onChange}
|
||||||
disabled={true}
|
|
||||||
/>
|
/>
|
||||||
<UPRNsDataEntry
|
<UPRNsDataEntry
|
||||||
title={dataFields.uprns.title}
|
title={dataFields.uprns.title}
|
||||||
|
Loading…
Reference in New Issue
Block a user