Skip to content

Commit

Permalink
Revert ":hammer: disable metadata edits (#3325)"
Browse files Browse the repository at this point in the history
This reverts commit 7788e9e.
  • Loading branch information
Marigold committed Mar 20, 2024
1 parent c056683 commit 5dd9c3d
Showing 1 changed file with 1 addition and 18 deletions.
19 changes: 1 addition & 18 deletions adminSiteClient/VariableEditPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ class VariableEditor extends React.Component<{ variable: VariablePageData }> {
<form
onSubmit={(e) => {
e.preventDefault()
// this.save()
this.save()
}}
>
<div className="row">
Expand Down Expand Up @@ -226,7 +226,6 @@ class VariableEditor extends React.Component<{ variable: VariablePageData }> {
field="name"
store={newVariable}
label="Indicator Name"
disabled={isDisabled}
/>
<BindString
field="catalogPath"
Expand All @@ -238,22 +237,19 @@ class VariableEditor extends React.Component<{ variable: VariablePageData }> {
label="Display name"
field="name"
store={newVariable.display}
disabled={isDisabled}
/>
<FieldsRow>
<BindString
label="Unit of measurement"
field="unit"
store={newVariable.display}
placeholder={newVariable.unit}
disabled={isDisabled}
/>
<BindString
label="Short (axis) unit"
field="shortUnit"
store={newVariable.display}
placeholder={newVariable.shortUnit}
disabled={isDisabled}
/>
</FieldsRow>
<FieldsRow>
Expand All @@ -262,14 +258,12 @@ class VariableEditor extends React.Component<{ variable: VariablePageData }> {
field="numDecimalPlaces"
store={newVariable.display}
helpText={`A negative number here will round integers`}
disabled={isDisabled}
/>
<BindFloat
label="Unit conversion factor"
field="conversionFactor"
store={newVariable.display}
helpText={`Multiply all values by this amount`}
disabled={isDisabled}
/>
</FieldsRow>
<FieldsRow>
Expand Down Expand Up @@ -339,25 +333,21 @@ class VariableEditor extends React.Component<{ variable: VariablePageData }> {
label="Title public"
field="titlePublic"
store={newVariable.presentation}
disabled={isDisabled}
/>
<BindString
label="Title variant"
field="titleVariant"
store={newVariable.presentation}
disabled={isDisabled}
/>
<BindString
label="Attribution"
field="attribution"
store={newVariable.presentation}
disabled={isDisabled}
/>
<BindString
label="Attribution short"
field="attributionShort"
store={newVariable.presentation}
disabled={isDisabled}
/>
</FieldsRow>
<FieldsRow>
Expand All @@ -366,14 +356,12 @@ class VariableEditor extends React.Component<{ variable: VariablePageData }> {
field="descriptionShort"
store={newVariable}
textarea
disabled={isDisabled}
/>
<BindString
label="Description from producer"
field="descriptionFromProducer"
store={newVariable}
textarea
disabled={isDisabled}
/>
</FieldsRow>
<FieldsRow>
Expand All @@ -395,7 +383,6 @@ class VariableEditor extends React.Component<{ variable: VariablePageData }> {
field="descriptionKey"
store={newVariable}
rows={8}
disabled={isDisabled}
/>
</FieldsRow>
<FieldsRow>
Expand All @@ -406,7 +393,6 @@ class VariableEditor extends React.Component<{ variable: VariablePageData }> {
store={newVariable}
textarea
rows={8}
disabled={isDisabled}
/>
</div>
<div className="col">
Expand All @@ -424,13 +410,11 @@ class VariableEditor extends React.Component<{ variable: VariablePageData }> {
label: "Major",
},
]}
disabled={isDisabled}
/>
<BindString
label="Number of days between OWID updates"
field="updatePeriodDays"
store={newVariable}
disabled={isDisabled}
/>
</div>
</FieldsRow>
Expand Down Expand Up @@ -473,7 +457,6 @@ class VariableEditor extends React.Component<{ variable: VariablePageData }> {
type="submit"
className="btn btn-success"
value="Update indicator"
disabled={isDisabled}
/>
</div>
</div>
Expand Down

0 comments on commit 5dd9c3d

Please sign in to comment.