mirror of
https://github.com/internetee/registry.git
synced 2025-08-03 08:22:05 +02:00
make contacts searchable
This commit is contained in:
parent
b088d39b0e
commit
3d2c9c01a6
7 changed files with 56 additions and 12 deletions
|
@ -18,9 +18,8 @@
|
|||
.col-md-3.control-label
|
||||
= label_tag "domain_contacts_attributes_#{k}_code", t(:id), class: 'required'
|
||||
.col-md-7.has-feedback
|
||||
= select_tag "domain[contacts_attributes][#{k}][code]",
|
||||
options_for_select(@contacts_autocomplete_map, selected: v['code']),
|
||||
include_blank: true, class: 'js-combobox js-contact-code', required: true
|
||||
= text_field_tag "domain[contacts_attributes][#{k}][code]", v['code'], class: "hidden"
|
||||
= text_field_tag "domain[contacts_attributes][#{k}][code_helper]", contacts.find_by(code: v['code']).try(:search_name), class: 'form-control', data: {autocomplete: search_contacts_registrar_domains_path}, required: true
|
||||
|
||||
:coffee
|
||||
clone = $('.js-contact:first').clone()
|
||||
|
@ -39,4 +38,5 @@
|
|||
# remove link for temp
|
||||
item.find('a.add-domain-contact').each (k, v) ->
|
||||
$(v).hide()
|
||||
new Autocomplete()
|
||||
$clone: clone
|
||||
|
|
|
@ -20,9 +20,9 @@
|
|||
.col-md-3.control-label
|
||||
= label_tag :domain_registrant, t(:registrant), class: 'required'
|
||||
.col-md-7
|
||||
= select_tag "domain[registrant]",
|
||||
options_for_select(@contacts_autocomplete_map, selected: @domain_params[:registrant]),
|
||||
include_blank: true, class: 'js-combobox', required: true
|
||||
= text_field_tag 'domain[registrant]', @domain_params[:registrant], class: "hidden"
|
||||
= text_field_tag 'domain[registrant_helper]', contacts.find_by(code: @domain_params[:registrant]).try(:search_name),
|
||||
class: 'form-control', data: {autocomplete: search_contacts_registrar_domains_path}, required: true
|
||||
|
||||
- unless params[:domain_name]
|
||||
.form-group
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue