make dropdown filter for instructeur to DSFR
This commit is contained in:
parent
0c004fd4e5
commit
5fed1c0330
2 changed files with 9 additions and 24 deletions
|
@ -310,23 +310,6 @@ ul.dropdown-items {
|
||||||
width: 340px;
|
width: 340px;
|
||||||
}
|
}
|
||||||
|
|
||||||
label {
|
|
||||||
width: 100px;
|
|
||||||
display: inline-block;
|
|
||||||
margin-bottom: 2 * $default-spacer;
|
|
||||||
}
|
|
||||||
|
|
||||||
input:not(.fr-btn) {
|
|
||||||
width: 200px;
|
|
||||||
display: inline-block;
|
|
||||||
background-color: $light-grey;
|
|
||||||
border: 1px solid $border-grey;
|
|
||||||
}
|
|
||||||
|
|
||||||
[disabled] {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
ul {
|
ul {
|
||||||
list-style: none;
|
list-style: none;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,13 +1,15 @@
|
||||||
= form_tag add_filter_instructeur_procedure_path(procedure), method: :post, class: 'dropdown-form large', id: 'filter-component', data: { turbo: true, controller: 'autosubmit' } do
|
= form_tag add_filter_instructeur_procedure_path(procedure), method: :post, class: 'dropdown-form large', id: 'filter-component', data: { turbo: true, controller: 'autosubmit' } do
|
||||||
= label_tag :field, t('.column')
|
.fr-select-group
|
||||||
= select_tag :field, options_for_select(filterable_fields_for_select, field_id), include_blank: field_id.nil?
|
= label_tag :field, t('.column'), class: 'fr-label fr-m-0'
|
||||||
%input.hidden{ type: 'submit', formaction: update_filter_instructeur_procedure_path(procedure), data: { autosubmit_target: 'submitter' } }
|
= select_tag :field, options_for_select(filterable_fields_for_select, field_id), include_blank: field_id.nil?, class: 'fr-select'
|
||||||
%br
|
|
||||||
= label_tag :value, t('.value'), for: 'value'
|
%input.hidden{ type: 'submit', formaction: update_filter_instructeur_procedure_path(procedure), data: { autosubmit_target: 'submitter' } }
|
||||||
|
|
||||||
|
= label_tag :value, t('.value'), for: 'value', class: 'fr-label'
|
||||||
- if field_type == :enum
|
- if field_type == :enum
|
||||||
= select_tag :value, options_for_select(options_for_select_of_field), id: 'value', name: 'value', data: { no_autosubmit: true }
|
= select_tag :value, options_for_select(options_for_select_of_field), id: 'value', name: 'value', class: 'fr-select', data: { no_autosubmit: true }
|
||||||
- else
|
- else
|
||||||
%input#value{ type: field_type, name: :value, maxlength: ProcedurePresentation::FILTERS_VALUE_MAX_LENGTH, disabled: field_id.nil? ? true : false, data: { no_autosubmit: true } }
|
%input#value.fr-input{ type: field_type, name: :value, disabled: field_id.nil? ? true : false, data: { no_autosubmit: true } }
|
||||||
|
|
||||||
= hidden_field_tag :statut, statut
|
= hidden_field_tag :statut, statut
|
||||||
= submit_tag t('.add_filter'), class: 'fr-btn fr-btn--secondary fr-mt-2w'
|
= submit_tag t('.add_filter'), class: 'fr-btn fr-btn--secondary fr-mt-2w'
|
||||||
|
|
Loading…
Reference in a new issue