added dropdown for registrar fields

This commit is contained in:
dinsmol 2021-07-30 21:27:03 +03:00
parent 4fa6135279
commit 20ea2ef373
4 changed files with 7 additions and 6 deletions

View file

@ -16,9 +16,9 @@ module Admin
search_params.delete(:registrant) search_params.delete(:registrant)
end end
if search_params[:registrar].present? if search_params[:whodunnit].present?
registrars = Registrar.where("name ilike ?", "%#{search_params[:registrar].strip}%") registrars = Registrar.where("name ilike ?", "%#{search_params[:whodunnit].strip}%")
search_params.delete(:registrar) search_params.delete(:whodunnit)
end end
whereS = "1=1" whereS = "1=1"

View file

@ -15,7 +15,7 @@
.col-md-3 .col-md-3
.form-group .form-group
= label_tag t(:registrar_name) = label_tag t(:registrar_name)
= f.search_field :registrar, value: params[:q][:registrar], class: 'form-control', placeholder: t('.registrant') = f.select :whodunnit, Registrar.all.map { |x| [x, x.name] }, { include_blank: true }, class: 'form-control', placeholder: t('.registrant')
.col-md-3 .col-md-3
.form-group .form-group
= label_tag :action = label_tag :action

View file

@ -27,7 +27,7 @@
.col-md-3 .col-md-3
.form-group .form-group
= f.label :registrar = f.label :registrar
= f.search_field :api_user_registrar_cont, class: 'form-control', placeholder: t(:registrar_name), autocomplete: 'off' = f.select :api_user_registrar_cont, Registrar.all.map { |x| [x, x.name] }, { include_blank: true }, class: 'form-control', placeholder: t(:choose)
.col-md-3 .col-md-3
.form-group .form-group
= f.label t(:created_after) = f.label t(:created_after)

View file

@ -25,7 +25,8 @@
.col-md-3 .col-md-3
.form-group .form-group
= f.label :registrar = f.label :registrar
= f.search_field :api_user_registrar_cont, class: 'form-control', placeholder: t(:registrar_name), autocomplete: 'off' = f.select :api_user_registrar_cont, Registrar.all.map { |x| [x, x.name] }, { include_blank: true }, class: 'form-control', placeholder: t(:choose)
-# = f.search_field :api_user_registrar_cont, class: 'form-control', placeholder: t(:registrar_name), autocomplete: 'off'
.col-md-3 .col-md-3
.form-group .form-group
= f.label t(:created_after) = f.label t(:created_after)