Skip to content

Commit

Permalink
Merge branch 'feat/update-placement' of https://github.com/statistics…
Browse files Browse the repository at this point in the history
…norway/datadoc into feat/update-placement
  • Loading branch information
tilen1976 committed Aug 21, 2024
2 parents 63f36ff + 676d3c4 commit cb43f57
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/datadoc/frontend/components/builders.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ def build_input_field_section(
metadata_fields: list[FieldTypes],
side: str,
variable: model.Variable,
field_id: str,
) -> dbc.Form:
"""Create form with input fields for variable workspace."""
return dbc.Form(
Expand All @@ -114,7 +115,7 @@ def build_input_field_section(
)
for i in metadata_fields
],
id=f"{VARIABLES_METADATA_INPUT}-{side}",
id=f"{VARIABLES_METADATA_INPUT}-{side}-{field_id}",
className="edit-section-form",
)

Expand All @@ -127,7 +128,7 @@ def build_edit_section(
return html.Section(
id={"type": "edit-section"},
children=[
build_input_field_section(inputs, side, variable)
build_input_field_section(inputs, side, variable, field_id="editable")
for inputs, side in zip(metadata_inputs, ["left", "right"])
],
className="edit-section",
Expand All @@ -148,6 +149,7 @@ def build_variables_machine_section(
metadata_inputs,
"left",
variable,
field_id="machine",
),
],
className="variable-machine-section",
Expand Down
2 changes: 1 addition & 1 deletion src/datadoc/frontend/fields/display_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ class DatasetIdentifiers(str, Enum):
if m.editable and isinstance(m, MetadataMultiLanguageField)
]

EDITABLE_DATASET_METADATA_LEFT.insert(2, DISPLAY_DATASET[DatasetIdentifiers.VERSION])
EDITABLE_DATASET_METADATA_LEFT.insert(3, DISPLAY_DATASET[DatasetIdentifiers.VERSION])


EDITABLE_DATASET_METADATA_RIGHT = [
Expand Down

0 comments on commit cb43f57

Please sign in to comment.