Domain form contacts partial refactor

This commit is contained in:
Martin Lensment 2014-09-22 11:06:07 +03:00
parent bfe89c7a09
commit 89295f5642
6 changed files with 17 additions and 14 deletions

View file

@ -14,8 +14,8 @@
= 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.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')
= contact_fields.label :typeahead_value
= contact_fields.text_field(:typeahead_value, class: 'form-control js-contact-typeahead', placeholder: t('shared.contact_code'), autocomplete: 'off')
%span.glyphicon.glyphicon-ok.form-control-feedback.js-typeahead-ok.hidden
%span.glyphicon.glyphicon-remove.form-control-feedback.js-typeahead-remove
= contact_fields.hidden_field(:contact_id, class: 'js-contact-id')

View file

@ -11,13 +11,13 @@
.col-md-6
= f.select :period_unit, options_for_select(['y', 'm', 'd'], @domain.period_unit), {}, {class: 'form-control'}
.col-md-6
.form-group.has-feedback
.form-group.has-feedback.js-typeahead-container
= f.label :registrar
= text_field_tag(:domain_registrar, params[:registrar], class: 'form-control js-registrar-typeahead', placeholder: t('shared.registrar_name'), autocomplete: 'off')
%span.glyphicon.glyphicon-ok.form-control-feedback.js-typeahead-ok.hidden
%span.glyphicon.glyphicon-remove.form-control-feedback.js-typeahead-remove
= f.hidden_field(:registrar_id, class: 'js-registrar-id')
.form-group.has-feedback
.form-group.has-feedback.js-typeahead-container
= f.label :owner_contact
= text_field_tag(:domain_owner_contact, params[:domain_owner_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