diff --git a/css/includes/components/form/_form-editor.scss b/css/includes/components/form/_form-editor.scss index e0f6fba81d1..50a09cc2202 100644 --- a/css/includes/components/form/_form-editor.scss +++ b/css/includes/components/form/_form-editor.scss @@ -74,6 +74,24 @@ display: flex !important; } } + + .fileupload { + margin: 0; + } + + .only-uploaded-files { + .fileupload_info { + margin-bottom: 0; + + p:first-child { + margin-top: 10px; + } + + p:last-child { + margin-bottom: 0; + } + } + } } .editor-footer { @@ -250,7 +268,6 @@ border-bottom-right-radius: var(--tblr-border-radius); padding: 0.5rem; padding-bottom: 0; - margin-bottom: 0.5rem; } .single-preview-dropdown, .multiple-preview-dropdown { @@ -259,5 +276,17 @@ border-bottom-right-radius: unset; } } + + div:not([data-glpi-form-editor-selectable-question-options])>[data-glpi-form-selectable-question-option]:last-child { + margin-bottom: 0 !important; + } + } + + &:not([data-glpi-form-editor-active-question]) { + [data-glpi-form-editor-selectable-question-options] { + [data-glpi-form-selectable-question-option]:last-child { + margin-bottom: 0 !important; + } + } } } diff --git a/css/includes/components/form/_form-renderer.scss b/css/includes/components/form/_form-renderer.scss index cf354277564..ad7030ed6a9 100644 --- a/css/includes/components/form/_form-renderer.scss +++ b/css/includes/components/form/_form-renderer.scss @@ -41,4 +41,22 @@ margin-bottom: 0 !important; } } + + .fileupload { + margin: 0; + } + + .only-uploaded-files { + .fileupload_info { + margin-bottom: 0; + + p:first-child { + margin-top: 10px; + } + + p:last-child { + margin-bottom: 0; + } + } + } } diff --git a/src/Glpi/Form/QuestionType/AbstractQuestionTypeActors.php b/src/Glpi/Form/QuestionType/AbstractQuestionTypeActors.php index 43f4dd91910..2797e66e745 100644 --- a/src/Glpi/Form/QuestionType/AbstractQuestionTypeActors.php +++ b/src/Glpi/Form/QuestionType/AbstractQuestionTypeActors.php @@ -213,15 +213,16 @@ public function renderAdministrationTemplate(?Question $question): string actors_dropdown, '', { - 'disabled': is_multiple_actors, - 'no_label': true, + 'disabled' : is_multiple_actors, + 'no_label' : true, + 'mb' : '', + 'wrapper_class': '', 'field_class': [ 'actors-dropdown', 'col-12', 'col-sm-6', not is_multiple_actors ? '' : 'd-none' ]|join(' '), - wrapper_class: '' } ) }} {{ fields.htmlField( @@ -229,14 +230,15 @@ public function renderAdministrationTemplate(?Question $question): string actors_dropdown_multiple, '', { - 'no_label': true, - 'field_class': [ + 'no_label' : true, + 'wrapper_class': '', + 'mb' : '', + 'field_class' : [ 'actors-dropdown', 'col-12', 'col-sm-6', is_multiple_actors ? '' : 'd-none' ]|join(' '), - wrapper_class: '' } ) }} TWIG; @@ -338,9 +340,10 @@ public function renderEndUserTemplate(Question $question): string question.getEndUserInputName(), value, { - 'multiple': is_multiple_actors, + 'multiple' : is_multiple_actors, 'allowed_types': allowed_types, - 'aria_label': aria_label + 'aria_label' : aria_label, + 'mb' : '' } ]) %} @@ -349,11 +352,13 @@ public function renderEndUserTemplate(Question $question): string actors_dropdown, '', { - 'no_label': true, - 'field_class': [ + 'no_label' : true, + 'wrapper_class': '', + 'mb' : '', + 'field_class' : [ 'col-12', 'col-sm-6', - ]|join(' ') + ]|join(' '), } ) }} TWIG; diff --git a/src/Glpi/Form/QuestionType/AbstractQuestionTypeSelectable.php b/src/Glpi/Form/QuestionType/AbstractQuestionTypeSelectable.php index 4e9668481a3..21168820234 100644 --- a/src/Glpi/Form/QuestionType/AbstractQuestionTypeSelectable.php +++ b/src/Glpi/Form/QuestionType/AbstractQuestionTypeSelectable.php @@ -211,6 +211,7 @@ public function renderAdministrationTemplate(?Question $question): string