fix: do not allow empty filter in views
This commit is contained in:
parent
b22f049318
commit
d32a4a24d9
1 changed files with 20 additions and 3 deletions
|
@ -6,13 +6,30 @@
|
|||
%react-fragment
|
||||
= render ReactComponent.new "ComboBox/SingleComboBox", **filter_react_props
|
||||
|
||||
%input.hidden{ type: 'submit', formaction: update_filter_instructeur_procedure_path(procedure), data: { autosubmit_target: 'submitter' } }
|
||||
%input.hidden{
|
||||
type: 'submit',
|
||||
formaction: update_filter_instructeur_procedure_path(procedure),
|
||||
formnovalidate: 'true',
|
||||
data: { autosubmit_target: 'submitter' }
|
||||
}
|
||||
|
||||
= label_tag :value, t('.value'), for: 'value', class: 'fr-label'
|
||||
- if column_type == :enum || column_type == :enums
|
||||
= select_tag :filter, options_for_select(options_for_select_of_column), id: 'value', name: "#{prefix}[filter]", class: 'fr-select', data: { no_autosubmit: true }
|
||||
= select_tag :filter,
|
||||
options_for_select(options_for_select_of_column),
|
||||
id: 'value',
|
||||
name: "#{prefix}[filter]",
|
||||
class: 'fr-select',
|
||||
data: { no_autosubmit: true }
|
||||
- else
|
||||
%input#value.fr-input{ type: column_type, name: "#{prefix}[filter]", maxlength: FilteredColumn::FILTERS_VALUE_MAX_LENGTH, disabled: column.nil? ? true : false, data: { no_autosubmit: true } }
|
||||
%input#value.fr-input{
|
||||
type: column_type,
|
||||
name: "#{prefix}[filter]",
|
||||
maxlength: FilteredColumn::FILTERS_VALUE_MAX_LENGTH,
|
||||
disabled: column.nil? ? true : false,
|
||||
data: { no_autosubmit: true },
|
||||
required: true
|
||||
}
|
||||
|
||||
= hidden_field_tag :statut, statut
|
||||
= submit_tag t('.add_filter'), class: 'fr-btn fr-btn--secondary fr-mt-2w'
|
||||
|
|
Loading…
Reference in a new issue