Disable text-based address fields
This commit is contained in:
parent
da64c153fc
commit
e01589b4e5
@ -183,6 +183,11 @@ class EditForm extends Component {
|
|||||||
match? (
|
match? (
|
||||||
<form action={`/edit/${this.props.slug}/building/${this.props.building_id}.html`}
|
<form action={`/edit/${this.props.slug}/building/${this.props.building_id}.html`}
|
||||||
method="GET" onSubmit={this.handleSubmit}>
|
method="GET" onSubmit={this.handleSubmit}>
|
||||||
|
{
|
||||||
|
this.props.slug === 'location'?
|
||||||
|
<InfoBox msg="Text-based address fields are disabled at the moment. We're looking into how best to collect this data." />
|
||||||
|
: null
|
||||||
|
}
|
||||||
<ErrorBox msg={this.state.error} />
|
<ErrorBox msg={this.state.error} />
|
||||||
{
|
{
|
||||||
this.props.fields.map((props) => {
|
this.props.fields.map((props) => {
|
||||||
@ -210,11 +215,7 @@ class EditForm extends Component {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
<InfoBox msg="Colouring may take a few seconds - try zooming the map or hitting refresh after saving (we're working on making this smoother)." />
|
||||||
<p className="alert alert-info">
|
|
||||||
Colouring may take a few seconds - try zooming the map or
|
|
||||||
hitting refresh after saving (we're working on making this
|
|
||||||
smoother).</p>
|
|
||||||
|
|
||||||
{
|
{
|
||||||
(this.props.slug === 'like')? // special-case for likes
|
(this.props.slug === 'like')? // special-case for likes
|
||||||
@ -237,6 +238,7 @@ const TextInput = (props) => (
|
|||||||
<input className="form-control" type="text"
|
<input className="form-control" type="text"
|
||||||
id={props.slug} name={props.slug}
|
id={props.slug} name={props.slug}
|
||||||
value={props.value || ""}
|
value={props.value || ""}
|
||||||
|
maxlength={props.max_length}
|
||||||
disabled={props.disabled}
|
disabled={props.disabled}
|
||||||
placeholder={props.placeholder}
|
placeholder={props.placeholder}
|
||||||
onChange={props.handleChange}
|
onChange={props.handleChange}
|
||||||
|
@ -7,13 +7,29 @@
|
|||||||
{
|
{
|
||||||
"title": "Building Name", "slug": "location_name", "type": "text",
|
"title": "Building Name", "slug": "location_name", "type": "text",
|
||||||
"placeholder": "Building name (if any)",
|
"placeholder": "Building name (if any)",
|
||||||
"tooltip": "May not be needed for many buildings."
|
"tooltip": "May not be needed for many buildings.",
|
||||||
|
"disabled": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "Building number", "slug": "location_number", "type": "number",
|
||||||
|
"step": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "Street", "slug": "location_street", "type": "text",
|
||||||
|
"disabled": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "Address line 2", "slug": "location_line_two", "type": "text",
|
||||||
|
"disabled": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "Town", "slug": "location_town", "type": "text",
|
||||||
|
"disabled": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "Postcode", "slug": "location_postcode", "type": "text",
|
||||||
|
"max_length": 8
|
||||||
},
|
},
|
||||||
{ "title": "Building number", "slug": "location_number", "type": "text" },
|
|
||||||
{ "title": "Street", "slug": "location_street", "type": "text" },
|
|
||||||
{ "title": "Address line 2", "slug": "location_line_two", "type": "text" },
|
|
||||||
{ "title": "Town", "slug": "location_town", "type": "text" },
|
|
||||||
{ "title": "Postcode", "slug": "location_postcode", "type": "text" },
|
|
||||||
{
|
{
|
||||||
"title": "TOID", "slug": "ref_toid", "type": "text",
|
"title": "TOID", "slug": "ref_toid", "type": "text",
|
||||||
"tooltip": "Ordnance Survey Topography Layer ID (to be filled automatically)",
|
"tooltip": "Ordnance Survey Topography Layer ID (to be filled automatically)",
|
||||||
@ -26,7 +42,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"title": "OSM ID", "slug": "ref_osm_id", "type": "text",
|
"title": "OSM ID", "slug": "ref_osm_id", "type": "text",
|
||||||
"tooltip": "OpenStreetMap feature ID"
|
"tooltip": "OpenStreetMap feature ID",
|
||||||
|
"max_length": 20
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"title": "Latitude", "slug": "location_latitude", "type": "number",
|
"title": "Latitude", "slug": "location_latitude", "type": "number",
|
||||||
|
Loading…
Reference in New Issue
Block a user