mirror of
https://github.com/internetee/registry.git
synced 2025-08-05 17:28:18 +02:00
Typeaheads refactor
This commit is contained in:
parent
d3e3c9e8b0
commit
bfe89c7a09
6 changed files with 38 additions and 19 deletions
|
@ -28,3 +28,5 @@
|
|||
item.find('.errors').html('');
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
= contact_fields.label :contact_type
|
||||
= contact_fields.select :contact_type, options_for_select(DomainContact::TYPES, contact_fields.object.contact_type), {}, {class: 'form-control'}
|
||||
.col-md-6
|
||||
.form-group.has-feedback
|
||||
.form-group.has-feedback.js-typeahead-container
|
||||
= label_tag :contact
|
||||
= text_field_tag(:contact, params[:contact], class: 'form-control js-contact-typeahead', placeholder: t('shared.contact_code'), autocomplete: 'off')
|
||||
%span.glyphicon.glyphicon-ok.form-control-feedback.js-typeahead-ok.hidden
|
||||
|
@ -24,5 +24,7 @@
|
|||
bindAddTo: $(".add-domain-contact"),
|
||||
afterAdd: function(item) {
|
||||
item.find('.errors').html('');
|
||||
item.find('.js-contact-id').val('')
|
||||
Autocomplete.bindContactSearch();
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue