mirror of
https://github.com/internetee/registry.git
synced 2025-07-29 22:16:19 +02:00
Merge pull request #2325 from internetee/499-admin-wildcard-search
Admin: missing wildcard and partial search
This commit is contained in:
commit
09d5d40640
14 changed files with 78 additions and 90 deletions
4
.github/workflows/build_deploy_staging.yml
vendored
4
.github/workflows/build_deploy_staging.yml
vendored
|
@ -143,7 +143,9 @@ jobs:
|
||||||
chmod 0600 kubeconfig
|
chmod 0600 kubeconfig
|
||||||
|
|
||||||
- name: Install Open VPN
|
- name: Install Open VPN
|
||||||
run: sudo apt-get install openvpn
|
run: |
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install openvpn
|
||||||
|
|
||||||
- name: Deploy from remote server
|
- name: Deploy from remote server
|
||||||
timeout-minutes: 5
|
timeout-minutes: 5
|
||||||
|
|
|
@ -5,7 +5,7 @@ module Admin
|
||||||
def index
|
def index
|
||||||
params[:q] ||= {}
|
params[:q] ||= {}
|
||||||
domains = BlockedDomain.all.order(:name)
|
domains = BlockedDomain.all.order(:name)
|
||||||
@q = domains.ransack(params[:q])
|
@q = domains.ransack(PartialSearchFormatter.format(params[:q]))
|
||||||
@domains = @q.result.page(params[:page])
|
@domains = @q.result.page(params[:page])
|
||||||
@domains = @domains.per(params[:results_per_page]) if params[:results_per_page].to_i.positive?
|
@domains = @domains.per(params[:results_per_page]) if params[:results_per_page].to_i.positive?
|
||||||
|
|
||||||
|
@ -13,13 +13,10 @@ module Admin
|
||||||
end
|
end
|
||||||
|
|
||||||
def new
|
def new
|
||||||
|
|
||||||
@domain = BlockedDomain.new
|
@domain = BlockedDomain.new
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def create
|
def create
|
||||||
|
|
||||||
@domain = BlockedDomain.new(blocked_domain_params)
|
@domain = BlockedDomain.new(blocked_domain_params)
|
||||||
|
|
||||||
if @domain.save
|
if @domain.save
|
||||||
|
@ -29,18 +26,16 @@ module Admin
|
||||||
flash.now[:alert] = I18n.t('failed_to_add_domain')
|
flash.now[:alert] = I18n.t('failed_to_add_domain')
|
||||||
render 'new'
|
render 'new'
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def delete
|
def delete
|
||||||
|
|
||||||
if BlockedDomain.find(params[:id]).destroy
|
if BlockedDomain.find(params[:id]).destroy
|
||||||
flash[:notice] = I18n.t('domain_deleted')
|
flash[:notice] = I18n.t('domain_deleted')
|
||||||
redirect_to admin_blocked_domains_path
|
|
||||||
else
|
else
|
||||||
flash.now[:alert] = I18n.t('failed_to_delete_domain')
|
flash.now[:alert] = I18n.t('failed_to_delete_domain')
|
||||||
redirect_to admin_blocked_domains_path
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
redirect_to admin_blocked_domains_path
|
||||||
end
|
end
|
||||||
|
|
||||||
def blocked_domain_params
|
def blocked_domain_params
|
||||||
|
|
|
@ -7,23 +7,9 @@ module Admin
|
||||||
def index
|
def index
|
||||||
params[:q] ||= {}
|
params[:q] ||= {}
|
||||||
|
|
||||||
search_params = params[:q].deep_dup.except(:created_at_gteq, :created_at_lteq)
|
search_params = PartialSearchFormatter.format(fix_date_params)
|
||||||
|
versions = Version::ContactVersion.includes(:item).order(created_at: :desc, id: :desc)
|
||||||
where_s = '1=1'
|
@q = versions.ransack(polymorphic_association(search_params))
|
||||||
|
|
||||||
search_params.each do |key, value|
|
|
||||||
next if value.empty?
|
|
||||||
|
|
||||||
where_s += case key
|
|
||||||
when 'event'
|
|
||||||
" AND event = '#{value}'"
|
|
||||||
else
|
|
||||||
create_where_string(key, value)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
versions = Version::ContactVersion.includes(:item).where(where_s).order(created_at: :desc, id: :desc)
|
|
||||||
@q = versions.ransack(fix_date_params)
|
|
||||||
|
|
||||||
@versions = @q.result.page(params[:page])
|
@versions = @q.result.page(params[:page])
|
||||||
@versions = @versions.per(params[:results_per_page]) if params[:results_per_page].to_i.positive?
|
@versions = @versions.per(params[:results_per_page]) if params[:results_per_page].to_i.positive?
|
||||||
|
@ -53,12 +39,16 @@ module Admin
|
||||||
render json: Version::ContactVersion.search_by_query(params[:q])
|
render json: Version::ContactVersion.search_by_query(params[:q])
|
||||||
end
|
end
|
||||||
|
|
||||||
def create_where_string(key, value)
|
|
||||||
" AND object->>'#{key}' ~* '#{value}'"
|
|
||||||
end
|
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
|
def polymorphic_association(search_params)
|
||||||
|
record_type = {}
|
||||||
|
fields = %w[name code ident]
|
||||||
|
fields.each { |field| record_type[:"item_of_Contact_type_#{field}_matches"] = search_params[:"#{field}_matches"] }
|
||||||
|
|
||||||
|
record_type
|
||||||
|
end
|
||||||
|
|
||||||
def fix_date_params
|
def fix_date_params
|
||||||
params_copy = params[:q].deep_dup
|
params_copy = params[:q].deep_dup
|
||||||
if params_copy['created_at_lteq'].present?
|
if params_copy['created_at_lteq'].present?
|
||||||
|
|
|
@ -9,10 +9,8 @@ module Admin
|
||||||
params[:q] ||= {}
|
params[:q] ||= {}
|
||||||
search_params = params[:q].deep_dup
|
search_params = params[:q].deep_dup
|
||||||
|
|
||||||
if search_params[:domain_contacts_type_in].is_a?(Array) &&
|
search_params[:registrant_domains_id_not_null] = 1 if search_params[:domain_contacts_type_in].is_a?(Array) &&
|
||||||
search_params[:domain_contacts_type_in].delete('registrant')
|
search_params[:domain_contacts_type_in].delete('registrant')
|
||||||
search_params[:registrant_domains_id_not_null] = 1
|
|
||||||
end
|
|
||||||
|
|
||||||
contacts = Contact.includes(:registrar).joins(:registrar)
|
contacts = Contact.includes(:registrar).joins(:registrar)
|
||||||
.select('contacts.*, registrars.name as registrars_name')
|
.select('contacts.*, registrars.name as registrars_name')
|
||||||
|
@ -20,7 +18,7 @@ module Admin
|
||||||
contacts = filter_by_flags(contacts)
|
contacts = filter_by_flags(contacts)
|
||||||
|
|
||||||
normalize_search_parameters do
|
normalize_search_parameters do
|
||||||
@q = contacts.ransack(search_params)
|
@q = contacts.ransack(PartialSearchFormatter.format(search_params))
|
||||||
@contacts = @q.result.distinct.page(params[:page])
|
@contacts = @q.result.distinct.page(params[:page])
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -33,6 +31,7 @@ module Admin
|
||||||
if params[:only_no_country_code].eql?('1')
|
if params[:only_no_country_code].eql?('1')
|
||||||
contacts = contacts.where("ident_country_code is null or ident_country_code=''")
|
contacts = contacts.where("ident_country_code is null or ident_country_code=''")
|
||||||
end
|
end
|
||||||
|
|
||||||
contacts = contacts.email_verification_failed if params[:email_verification_failed].eql?('1')
|
contacts = contacts.email_verification_failed if params[:email_verification_failed].eql?('1')
|
||||||
contacts
|
contacts
|
||||||
end
|
end
|
||||||
|
@ -41,8 +40,7 @@ module Admin
|
||||||
render json: Contact.search_by_query(params[:q])
|
render json: Contact.search_by_query(params[:q])
|
||||||
end
|
end
|
||||||
|
|
||||||
def edit
|
def edit; end
|
||||||
end
|
|
||||||
|
|
||||||
def update
|
def update
|
||||||
cp = ignore_empty_statuses
|
cp = ignore_empty_statuses
|
||||||
|
|
|
@ -17,18 +17,10 @@ module Admin
|
||||||
end
|
end
|
||||||
|
|
||||||
normalize_search_parameters do
|
normalize_search_parameters do
|
||||||
@q = domains.ransack(params[:q])
|
@q = domains.ransack(PartialSearchFormatter.format(params[:q]))
|
||||||
@domains = @q.result.page(params[:page])
|
@domains = @q.result.page(params[:page])
|
||||||
(redirect_to [:admin, @domains.first] and return if @domains.count == 1 && params[:q][:name_matches].present?)
|
|
||||||
if @domains.count.zero? && params[:q][:name_matches] !~ /^%.+%$/
|
|
||||||
# if we do not get any results, add wildcards to the name field and search again
|
|
||||||
n_cache = params[:q][:name_matches]
|
|
||||||
params[:q][:name_matches] = "%#{params[:q][:name_matches]}%"
|
|
||||||
@q = domains.ransack(params[:q])
|
|
||||||
@domains = @q.result.page(params[:page])
|
|
||||||
params[:q][:name_matches] = n_cache # we don't want to show wildcards in search form
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
@domains = @domains.per(params[:results_per_page]) if params[:results_per_page].to_i.positive?
|
@domains = @domains.per(params[:results_per_page]) if params[:results_per_page].to_i.positive?
|
||||||
|
|
||||||
render_by_format('admin/domains/index', 'domains')
|
render_by_format('admin/domains/index', 'domains')
|
||||||
|
@ -95,7 +87,7 @@ module Admin
|
||||||
def build_associations
|
def build_associations
|
||||||
@server_statuses = @domain.statuses.select { |x| DomainStatus::SERVER_STATUSES.include?(x) }
|
@server_statuses = @domain.statuses.select { |x| DomainStatus::SERVER_STATUSES.include?(x) }
|
||||||
@server_statuses = [nil] if @server_statuses.empty?
|
@server_statuses = [nil] if @server_statuses.empty?
|
||||||
@other_statuses = @domain.statuses.select { |x| !DomainStatus::SERVER_STATUSES.include?(x) }
|
@other_statuses = @domain.statuses.reject { |x| DomainStatus::SERVER_STATUSES.include?(x) }
|
||||||
end
|
end
|
||||||
|
|
||||||
def ignore_empty_statuses
|
def ignore_empty_statuses
|
||||||
|
|
|
@ -5,7 +5,7 @@ module Admin
|
||||||
|
|
||||||
# rubocop:disable Metrics/MethodLength
|
# rubocop:disable Metrics/MethodLength
|
||||||
def index
|
def index
|
||||||
@q = ApiLog::EppLog.ransack(params[:q])
|
@q = ApiLog::EppLog.ransack(PartialSearchFormatter.format(params[:q]))
|
||||||
@q.sorts = 'id desc' if @q.sorts.empty?
|
@q.sorts = 'id desc' if @q.sorts.empty?
|
||||||
|
|
||||||
@epp_logs = @q.result
|
@epp_logs = @q.result
|
||||||
|
@ -29,16 +29,19 @@ module Admin
|
||||||
|
|
||||||
def set_default_dates
|
def set_default_dates
|
||||||
params[:q] ||= {}
|
params[:q] ||= {}
|
||||||
|
return unless default_dates?
|
||||||
|
|
||||||
if params[:q][:created_at_gteq].nil? && params[:q][:created_at_lteq].nil? && params[:created_after].present?
|
|
||||||
default_date = params[:created_after]
|
default_date = params[:created_after]
|
||||||
|
default_date = 'today' unless %w[today tomorrow yesterday].include?(default_date)
|
||||||
if !['today', 'tomorrow', 'yesterday'].include?(default_date)
|
|
||||||
default_date = 'today'
|
|
||||||
end
|
|
||||||
|
|
||||||
params[:q][:created_at_gteq] = Date.send(default_date).strftime("%Y-%m-%d")
|
params[:q][:created_at_gteq] = Date.send(default_date).strftime("%Y-%m-%d")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
private
|
||||||
|
|
||||||
|
def default_dates?
|
||||||
|
params[:q] ||= {}
|
||||||
|
params[:q][:created_at_gteq].nil? && params[:q][:created_at_lteq].nil? && params[:created_after].present?
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -5,7 +5,7 @@ module Admin
|
||||||
|
|
||||||
# rubocop:disable Metrics/MethodLength
|
# rubocop:disable Metrics/MethodLength
|
||||||
def index
|
def index
|
||||||
@q = ApiLog::ReppLog.ransack(params[:q])
|
@q = ApiLog::ReppLog.ransack(PartialSearchFormatter.format(params[:q]))
|
||||||
@q.sorts = 'id desc' if @q.sorts.empty?
|
@q.sorts = 'id desc' if @q.sorts.empty?
|
||||||
|
|
||||||
@repp_logs = @q.result
|
@repp_logs = @q.result
|
||||||
|
@ -31,17 +31,19 @@ module Admin
|
||||||
|
|
||||||
def set_default_dates
|
def set_default_dates
|
||||||
params[:q] ||= {}
|
params[:q] ||= {}
|
||||||
|
return unless default_dates?
|
||||||
if params[:q][:created_at_gteq].nil? && params[:q][:created_at_lteq].nil? && params[:created_after].present?
|
|
||||||
|
|
||||||
default_date = params[:created_after]
|
default_date = params[:created_after]
|
||||||
|
default_date = 'today' unless %w[today tomorrow yesterday].include?(default_date)
|
||||||
if !['today', 'tomorrow', 'yesterday'].include?(default_date)
|
|
||||||
default_date = 'today'
|
|
||||||
end
|
|
||||||
|
|
||||||
params[:q][:created_at_gteq] = Date.send(default_date).strftime("%Y-%m-%d")
|
params[:q][:created_at_gteq] = Date.send(default_date).strftime("%Y-%m-%d")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
private
|
||||||
|
|
||||||
|
def default_dates?
|
||||||
|
params[:q] ||= {}
|
||||||
|
params[:q][:created_at_gteq].nil? && params[:q][:created_at_lteq].nil? && params[:created_after].present?
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -6,7 +6,7 @@ module Admin
|
||||||
def index
|
def index
|
||||||
params[:q] ||= {}
|
params[:q] ||= {}
|
||||||
domains = ReservedDomain.all.order(:name)
|
domains = ReservedDomain.all.order(:name)
|
||||||
@q = domains.ransack(params[:q])
|
@q = domains.ransack(PartialSearchFormatter.format(params[:q]))
|
||||||
@domains = @q.result.page(params[:page])
|
@domains = @q.result.page(params[:page])
|
||||||
@domains = @domains.per(params[:results_per_page]) if params[:results_per_page].to_i.positive?
|
@domains = @domains.per(params[:results_per_page]) if params[:results_per_page].to_i.positive?
|
||||||
|
|
||||||
|
@ -17,11 +17,9 @@ module Admin
|
||||||
@domain = ReservedDomain.new
|
@domain = ReservedDomain.new
|
||||||
end
|
end
|
||||||
|
|
||||||
def edit
|
def edit; end
|
||||||
end
|
|
||||||
|
|
||||||
def create
|
def create
|
||||||
|
|
||||||
@domain = ReservedDomain.new(reserved_domain_params)
|
@domain = ReservedDomain.new(reserved_domain_params)
|
||||||
|
|
||||||
if @domain.save
|
if @domain.save
|
||||||
|
@ -31,30 +29,26 @@ module Admin
|
||||||
flash.now[:alert] = I18n.t('failed_to_add_domain')
|
flash.now[:alert] = I18n.t('failed_to_add_domain')
|
||||||
render 'new'
|
render 'new'
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def update
|
def update
|
||||||
|
|
||||||
if @domain.update(reserved_domain_params)
|
if @domain.update(reserved_domain_params)
|
||||||
flash[:notice] = I18n.t('domain_updated')
|
flash[:notice] = I18n.t('domain_updated')
|
||||||
else
|
else
|
||||||
flash.now[:alert] = I18n.t('failed_to_update_domain')
|
flash.now[:alert] = I18n.t('failed_to_update_domain')
|
||||||
end
|
end
|
||||||
render 'edit'
|
|
||||||
|
|
||||||
|
render 'edit'
|
||||||
end
|
end
|
||||||
|
|
||||||
def delete
|
def delete
|
||||||
|
|
||||||
if ReservedDomain.find(params[:id]).destroy
|
if ReservedDomain.find(params[:id]).destroy
|
||||||
flash[:notice] = I18n.t('domain_deleted')
|
flash[:notice] = I18n.t('domain_deleted')
|
||||||
redirect_to admin_reserved_domains_path
|
|
||||||
else
|
else
|
||||||
flash.now[:alert] = I18n.t('failed_to_delete_domain')
|
flash.now[:alert] = I18n.t('failed_to_delete_domain')
|
||||||
redirect_to admin_reserved_domains_path
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
redirect_to admin_reserved_domains_path
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
13
app/services/partial_search_formatter.rb
Normal file
13
app/services/partial_search_formatter.rb
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
class PartialSearchFormatter
|
||||||
|
def self.format(params)
|
||||||
|
search_params = params.deep_dup
|
||||||
|
|
||||||
|
search_params.each do |key, value|
|
||||||
|
next unless key.include?('matches') && value.present?
|
||||||
|
|
||||||
|
value << '%'
|
||||||
|
end
|
||||||
|
|
||||||
|
search_params
|
||||||
|
end
|
||||||
|
end
|
|
@ -7,15 +7,15 @@
|
||||||
.col-md-3
|
.col-md-3
|
||||||
.form-group
|
.form-group
|
||||||
= f.label :name
|
= f.label :name
|
||||||
= f.search_field :name, value: params[:q][:name], class: 'form-control', placeholder: t(:name)
|
= f.search_field :name_matches, value: params[:q][:name_matches], class: 'form-control', placeholder: t(:name)
|
||||||
.col-md-3
|
.col-md-3
|
||||||
.form-group
|
.form-group
|
||||||
= f.label :id
|
= f.label :id
|
||||||
= f.search_field :code, value: params[:q][:code], class: 'form-control', placeholder: t(:id)
|
= f.search_field :code_matches, value: params[:q][:code_matches], class: 'form-control', placeholder: t(:id)
|
||||||
.col-md-3
|
.col-md-3
|
||||||
.form-group
|
.form-group
|
||||||
= f.label :ident
|
= f.label :ident
|
||||||
= f.search_field :ident, value: params[:q][:ident], class: 'form-control', placeholder: t(:ident)
|
= f.search_field :ident_matches, value: params[:q][:ident_matches], class: 'form-control', placeholder: t(:ident)
|
||||||
.col-md-3
|
.col-md-3
|
||||||
.form-group
|
.form-group
|
||||||
= label_tag :action
|
= label_tag :action
|
||||||
|
|
|
@ -11,11 +11,11 @@
|
||||||
.col-md-3
|
.col-md-3
|
||||||
.form-group
|
.form-group
|
||||||
= f.label t(:id)
|
= f.label t(:id)
|
||||||
= f.search_field :code_matches, class: 'form-control', placeholder: t(:id)
|
= f.search_field :code_matches, value: params[:q][:code_matches], class: 'form-control', placeholder: t(:id)
|
||||||
.col-md-3
|
.col-md-3
|
||||||
.form-group
|
.form-group
|
||||||
= f.label t(:ident)
|
= f.label t(:ident)
|
||||||
= f.search_field :ident_matches, class: 'form-control', placeholder: t(:ident)
|
= f.search_field :ident_matches, value: params[:q][:ident_matches], class: 'form-control', placeholder: t(:ident)
|
||||||
.col-md-3
|
.col-md-3
|
||||||
.form-group
|
.form-group
|
||||||
= label_tag t(:ident_type)
|
= label_tag t(:ident_type)
|
||||||
|
@ -24,7 +24,7 @@
|
||||||
.col-md-3
|
.col-md-3
|
||||||
.form-group
|
.form-group
|
||||||
= f.label t(:email)
|
= f.label t(:email)
|
||||||
= f.search_field :email_matches, class: 'form-control', placeholder: t(:email)
|
= f.search_field :email_matches, value: params[:q][:email_matches], class: 'form-control', placeholder: t(:email)
|
||||||
.col-md-3
|
.col-md-3
|
||||||
.form-group
|
.form-group
|
||||||
= label_tag t(:country)
|
= label_tag t(:country)
|
||||||
|
|
|
@ -9,19 +9,19 @@
|
||||||
<div class="col-md-2">
|
<div class="col-md-2">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<%= f.label :registrant_ident, for: nil %>
|
<%= f.label :registrant_ident, for: nil %>
|
||||||
<%= f.search_field :registrant_ident_eq, class: 'form-control', placeholder: t(:registrant_ident) %>
|
<%= f.search_field :registrant_ident_matches, value: params[:q][:registrant_ident_matches], class: 'form-control', placeholder: t(:registrant_ident) %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<%= f.label :contact_ident, for: nil %>
|
<%= f.label :contact_ident, for: nil %>
|
||||||
<%= f.search_field :contacts_ident_eq, class: 'form-control', placeholder: t(:contact_ident) %>
|
<%= f.search_field :contacts_ident_matches, value: params[:q][:contacts_ident_matches], class: 'form-control', placeholder: t(:contact_ident) %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<%= f.label :nameserver_hostname, for: nil %>
|
<%= f.label :nameserver_hostname, for: nil %>
|
||||||
<%= f.search_field :nameservers_hostname_eq, class: 'form-control', placeholder: t(:nameserver_hostname) %>
|
<%= f.search_field :nameservers_hostname_matches, value: params[:q][:nameservers_hostname_matches], class: 'form-control', placeholder: t(:nameserver_hostname) %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -22,12 +22,12 @@
|
||||||
.col-md-3
|
.col-md-3
|
||||||
.form-group
|
.form-group
|
||||||
= f.label :api_user
|
= f.label :api_user
|
||||||
= f.search_field :api_user_name_cont, class: 'form-control', placeholder: t(:api_user), autocomplete: 'off'
|
= f.search_field :api_user_name_matches, value: params[:q][:api_user_name_matches], class: 'form-control', placeholder: t(:api_user), autocomplete: 'off'
|
||||||
.row
|
.row
|
||||||
.col-md-3
|
.col-md-3
|
||||||
.form-group
|
.form-group
|
||||||
= f.label :registrar
|
= f.label :registrar
|
||||||
= f.select :api_user_registrar_cont, Registrar.all.map { |x| [x, x.name] }, { include_blank: true }, class: 'form-control', placeholder: t(:choose)
|
= f.select :api_user_registrar_matches, 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)
|
||||||
|
|
|
@ -20,13 +20,12 @@
|
||||||
.col-md-3
|
.col-md-3
|
||||||
.form-group
|
.form-group
|
||||||
= f.label :api_user
|
= f.label :api_user
|
||||||
= f.search_field :api_user_name_cont, class: 'form-control', placeholder: t(:api_user), autocomplete: 'off'
|
= f.search_field :api_user_name_matches, value: params[:q][:api_user_name_matches], class: 'form-control', placeholder: t(:api_user), autocomplete: 'off'
|
||||||
.row
|
.row
|
||||||
.col-md-3
|
.col-md-3
|
||||||
.form-group
|
.form-group
|
||||||
= f.label :registrar
|
= f.label :registrar
|
||||||
= f.select :api_user_registrar_cont, Registrar.all.map { |x| [x, x.name] }, { include_blank: true }, class: 'form-control', placeholder: t(:choose)
|
= f.select :api_user_registrar_matches, 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)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue