clean(routing): use translations for operator_tag
This commit is contained in:
parent
d0da808325
commit
a7859a8a9c
1 changed files with 7 additions and 1 deletions
|
@ -46,12 +46,18 @@ class Procedure::OneGroupeManagementComponent < ApplicationComponent
|
|||
def operator_tag
|
||||
select_tag('operator_name',
|
||||
options_for_select(
|
||||
[['est égal à', Logic::Eq.name], ["n'est pas égal à", Logic::NotEq.name]],
|
||||
options_for_operator_tag,
|
||||
selected: operator_name
|
||||
),
|
||||
class: 'fr-select')
|
||||
end
|
||||
|
||||
def options_for_operator_tag
|
||||
[Eq, NotEq]
|
||||
.map(&:name)
|
||||
.map { |name| [t(name, scope: 'logic.operators'), name] }
|
||||
end
|
||||
|
||||
def value_tag
|
||||
select_tag(
|
||||
'value',
|
||||
|
|
Loading…
Reference in a new issue