mirror of
https://github.com/internetee/registry.git
synced 2025-08-06 01:35:10 +02:00
Registrar: domain form autocompletes registrar and contact code
This commit is contained in:
parent
2b9923de49
commit
2ea24f42fc
8 changed files with 29 additions and 4 deletions
|
@ -17,11 +17,15 @@
|
|||
.col-md-3.control-label
|
||||
= label_tag "domain_contacts_attributes_#{k}_code", t(:contact_code), class: 'required'
|
||||
.col-md-7.has-feedback
|
||||
= text_field_tag("domain[contacts_attributes][#{k}][code]", v['code'],
|
||||
class: 'form-control', placeholder: t(:contact_code), autocomplete: 'off', required: true)
|
||||
= select_tag "domain[contacts_attributes][#{k}][code]",
|
||||
options_for_select(@contacts_autocomplete_map, selected: v['code']),
|
||||
include_blank: true, class: 'js-combobox', required: true
|
||||
|
||||
:coffee
|
||||
$("#domain-contacts").nestedAttributes
|
||||
bindAddTo: $(".add-domain-contact")
|
||||
afterAdd: (item) ->
|
||||
item.find('select').each (k, v) ->
|
||||
$(v).val($(v).find('option:first-child').val())
|
||||
|
||||
|
||||
|
|
|
@ -20,5 +20,6 @@
|
|||
.col-md-3.control-label
|
||||
= label_tag :domain_registrant, t(:registrant), class: 'required'
|
||||
.col-md-7
|
||||
= text_field_tag('domain[registrant]', @domain_params[:registrant],
|
||||
class: 'form-control', placeholder: t(:contact_code), autocomplete: 'off', required: true)
|
||||
= select_tag "domain[registrant]",
|
||||
options_for_select(@contacts_autocomplete_map, selected: @domain_params[:registrant]),
|
||||
include_blank: true, class: 'js-combobox', required: true
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue