Disable free-text boxes on Team category
Edit Multi Data Entry to display something when editing and the box is disabled when it has no data.
This commit is contained in:
parent
9f842dd445
commit
fd1429e2da
@ -76,6 +76,12 @@ export const MultiDataEntry: React.FC<MultiDataEntryProps> = ({
|
||||
</div>
|
||||
}
|
||||
<ul className="data-entry-list">
|
||||
{
|
||||
isEditing && isDisabled && values.length === 0 &&
|
||||
<div className="input-group">
|
||||
<input className="form-control no-entries" type="text" value="No entries" disabled={true} />
|
||||
</div>
|
||||
}
|
||||
{
|
||||
values.map((val, i) => (
|
||||
<li className="input-group" key={i /* i as key prevents input component recreation on edit */}>
|
||||
|
@ -146,6 +146,7 @@ const TeamView: React.FunctionComponent<CategoryViewProps> = (props) => {
|
||||
tooltip={dataFields.landowner.tooltip}
|
||||
placeholder=""
|
||||
editableEntries={true}
|
||||
disabled={true}
|
||||
/>
|
||||
<Verification
|
||||
slug="landowner"
|
||||
@ -213,6 +214,7 @@ const TeamView: React.FunctionComponent<CategoryViewProps> = (props) => {
|
||||
tooltip={dataFields.developer_name.tooltip}
|
||||
placeholder=""
|
||||
editableEntries={true}
|
||||
disabled={true}
|
||||
/>
|
||||
<Verification
|
||||
slug="developer_name"
|
||||
@ -263,6 +265,7 @@ const TeamView: React.FunctionComponent<CategoryViewProps> = (props) => {
|
||||
tooltip={dataFields.designers.tooltip}
|
||||
placeholder=""
|
||||
editableEntries={true}
|
||||
disabled={true}
|
||||
/>
|
||||
<Verification
|
||||
slug="designers"
|
||||
@ -272,7 +275,6 @@ const TeamView: React.FunctionComponent<CategoryViewProps> = (props) => {
|
||||
user_verified_as={props.user_verified.designers}
|
||||
verified_count={props.building.verified.designers}
|
||||
/>
|
||||
|
||||
<SelectDataEntry
|
||||
slug='lead_designer_type'
|
||||
title={dataFields.lead_designer_type.title}
|
||||
@ -330,6 +332,7 @@ const TeamView: React.FunctionComponent<CategoryViewProps> = (props) => {
|
||||
onChange={props.onChange}
|
||||
placeholder=""
|
||||
editableEntries={true}
|
||||
disabled={true}
|
||||
/>
|
||||
<Verification
|
||||
slug="builder"
|
||||
|
@ -969,7 +969,7 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */
|
||||
landowner: {
|
||||
category: Category.Team,
|
||||
title: "Landowner(s) at time of construction",
|
||||
tooltip: "Land owner when the building was constructed.<br/>For info on current land ownership, see 'Planning Controls'.",
|
||||
tooltip: "Land owner when the building was constructed.<br/><br/>Free-text entry disabled for security reasons.<br/><br/>For info on current land ownership, see 'Planning Controls'.",
|
||||
example: ["", "", ""],
|
||||
},
|
||||
landowner_source_type: {
|
||||
@ -988,7 +988,7 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */
|
||||
designers: {
|
||||
category: Category.Team,
|
||||
title: "Who were the main designer(s)?",
|
||||
tooltip: "Free text. First name, space, then Last name",
|
||||
tooltip: "First name, space, then Last name.<br/><br/>Free-text entry disabled for security reasons.",
|
||||
example: ["", "", ""],
|
||||
},
|
||||
designers_source_type: {
|
||||
@ -1031,7 +1031,7 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */
|
||||
},
|
||||
builder: {
|
||||
category: Category.Team,
|
||||
title: "Name of builder/construction team",
|
||||
title: "Name of builder/construction team.<br/><br/>Free-text entry disabled for security reasons.",
|
||||
example: ["", "", ""],
|
||||
},
|
||||
builder_source_type: {
|
||||
|
Loading…
Reference in New Issue
Block a user