diff --git a/CHANGELOG.md b/CHANGELOG.md index e5b4d8b1..c6bff296 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - Implement `Field` question type for new GLPI forms - Bind the answers to the `Field` question type to the corresponding additional fields +- Update dropdowns layout/style for “GLPI Item” fields ## [1.22.2] - 2025-10-24 diff --git a/public/css/fields.scss b/public/css/fields.scss index f0314940..fa144524 100644 --- a/public/css/fields.scss +++ b/public/css/fields.scss @@ -56,15 +56,15 @@ div.fields_clear { border-radius: 0; } -[data-glpi-form-editor-question-type-specific]:has(.glpi-fields-plugin-question-type-glpi-item-field), -[data-glpi-form-renderer-fields-question-type-specific-container]:has(.glpi-fields-plugin-question-type-glpi-item-field) { - &:has(> div > span select[data-select2-id]) { - > div:first-of-type .select2-selection { +.glpi-fields-plugin-glpi-item-field, +.glpi-fields-plugin-glpi-item-field .field-container { + &:has(> span select[data-select2-id]) { + > span:first-of-type .select2-selection { border-bottom-left-radius: 0; border-bottom-right-radius: 0; } - > div:not(:first-of-type) { + > span:not(:first-of-type) { .glpi-fields-plugin-question-type-glpi-item-field { width: 100%; } diff --git a/templates/fields.html.twig b/templates/fields.html.twig index b7d6dc4f..f598277a 100644 --- a/templates/fields.html.twig +++ b/templates/fields.html.twig @@ -154,21 +154,7 @@
{% endif %} - {{ macros.dropdownArrayField(itemtype_input_name, value.itemtype|default(''), field['allowed_values'], label, field_options|merge({ - 'rand': rand, - 'display_emptychoice': true, - })) }} - - {% set items_id_container_class = ['col-12'] %} - {% if item is instanceof('Glpi\\Form\\Form') %} - {% set items_id_container_class = items_id_container_class|merge(['col-sm-6']) %} - {% else %} - {% set items_id_container_class = items_id_container_class|merge(['form-field row mb-2']) %} - {% if container.fields['type'] == 'tab' %} - {% set items_id_container_class = items_id_container_class|merge(['col-sm-6']) %} - {% endif %} - {% endif %} -