Merge branch 'master' of github.com:domify/registry

This commit is contained in:
Martin Lensment 2015-06-10 15:06:31 +03:00
commit 4fb9000bff
2 changed files with 25 additions and 26 deletions

View file

@ -230,7 +230,7 @@ module Depp
def extension_xml def extension_xml
xml = { _anonymus: [] } xml = { _anonymus: [] }
ident = ident_xml[:_anonymus].try(:first) ident = ident_xml[:_anonymus].try(:first) if !persisted?
legal = legal_document_xml[:_anonymus].try(:first) legal = legal_document_xml[:_anonymus].try(:first)
xml[:_anonymus] << ident if ident.present? xml[:_anonymus] << ident if ident.present?
xml[:_anonymus] << legal if legal.present? xml[:_anonymus] << legal if legal.present?

View file

@ -1,30 +1,29 @@
- if !@contact.persisted? .panel.panel-default
.panel.panel-default .panel-heading.clearfix
.panel-heading.clearfix .pull-left= t(:ident)
.pull-left= t(:ident) .panel-body
.panel-body .form-group
.form-group .col-md-3.control-label
.col-md-3.control-label = f.label :ident_country_code, t(:country) + '*'
= f.label :ident_country_code, t(:country) + '*' .col-md-7
.col-md-7 = f.select(:ident_country_code, SortedCountry.all_options(f.object.ident_country_code), {},
= f.select(:ident_country_code, SortedCountry.all_options(f.object.ident_country_code), {}, class: 'js-ident-country-code', required: true, disabled: @contact.persisted?)
class: 'js-ident-country-code', required: true)
.form-group .form-group
.col-md-3.control-label .col-md-3.control-label
= f.label :ident_type, t(:type) + '*' = f.label :ident_type, t(:type) + '*'
.col-md-7 .col-md-7
= f.select(:ident_type, Depp::Contact::SELECTION_TYPES, { selected: f.object.ident_type }, = f.select(:ident_type, Depp::Contact::SELECTION_TYPES, { selected: f.object.ident_type },
class: 'js-ident-type', required: true) class: 'js-ident-type', required: true, disabled: @contact.persisted?)
.form-group .form-group
.col-md-3.control-label .col-md-3.control-label
= f.label :ident, t(:ident) + '*' = f.label :ident, t(:ident) + '*'
.col-md-7 .col-md-7
= f.text_field :ident, class: 'form-control', required: true = f.text_field :ident, class: 'form-control', required: true, disabled: @contact.persisted?
- tip_visibility = f.object.ident_type == 'birthday' ? '' : 'display: none' - tip_visibility = f.object.ident_type == 'birthday' ? '' : 'display: none'
.js-ident-tip{ style: tip_visibility } .js-ident-tip{ style: tip_visibility }
= t(:birthday_format) = t(:birthday_format)
.panel.panel-default .panel.panel-default
.panel-heading.clearfix .panel-heading.clearfix