diff --git a/templates/projects/import_bom_map_fields.html.twig b/templates/projects/import_bom_map_fields.html.twig index 4e45eb08..ee1e23ef 100644 --- a/templates/projects/import_bom_map_fields.html.twig +++ b/templates/projects/import_bom_map_fields.html.twig @@ -48,51 +48,59 @@
| {% trans %}project.bom_import.field_mapping.csv_field{% endtrans %} | -{% trans %}project.bom_import.field_mapping.maps_to{% endtrans %} | -{% trans %}project.bom_import.field_mapping.suggestion{% endtrans %} | -{% trans %}project.bom_import.field_mapping.priority{% endtrans %} | -|
|---|---|---|---|---|
| {% trans %}project.bom_import.field_mapping.csv_field{% endtrans %} | +{% trans %}project.bom_import.field_mapping.maps_to{% endtrans %} | +{% trans %}project.bom_import.field_mapping.suggestion{% endtrans %} | +{% trans %}project.bom_import.field_mapping.priority{% endtrans %} | +|
- {{ field }}
- |
- + {% for field in detected_fields %} + | |||
+ {{ field }}
+ |
+ + {# TODO: This is more a workaround than a proper fix. Ideally the controller should be fixed in a way, that we get the correct fields here #} + {% if field_name_mapping[field] is defined %} + {% set field_name = field_name_mapping[field] %} {{ form_widget(form['mapping_' ~ field_name_mapping[field]], { 'attr': { 'class': 'form-select field-mapping-select', 'data-field': field } }) }} - | -- {% if suggested_mapping[field] is defined %} - + {% else %} + + {% trans %}project.bom_import.field_mapping.error.check_delimiter{% endtrans %} + + {% endif %} + | ++ {% if suggested_mapping[field] is defined %} + {{ suggested_mapping[field] }} - {% else %} - + {% else %} + {% trans %}project.bom_import.field_mapping.no_suggestion{% endtrans %} - {% endif %} - | -- - | -+ + | + + {% endfor %}