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
xml = { _anonymus: [] }
ident = ident_xml[:_anonymus].try(:first)
ident = ident_xml[:_anonymus].try(:first) if !persisted?
legal = legal_document_xml[:_anonymus].try(:first)
xml[:_anonymus] << ident if ident.present?
xml[:_anonymus] << legal if legal.present?

View file

@ -1,5 +1,4 @@
- if !@contact.persisted?
.panel.panel-default
.panel.panel-default
.panel-heading.clearfix
.pull-left= t(:ident)
.panel-body
@ -8,20 +7,20 @@
= f.label :ident_country_code, t(:country) + '*'
.col-md-7
= f.select(:ident_country_code, SortedCountry.all_options(f.object.ident_country_code), {},
class: 'js-ident-country-code', required: true)
class: 'js-ident-country-code', required: true, disabled: @contact.persisted?)
.form-group
.col-md-3.control-label
= f.label :ident_type, t(:type) + '*'
.col-md-7
= 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
.col-md-3.control-label
= f.label :ident, t(:ident) + '*'
.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'
.js-ident-tip{ style: tip_visibility }
= t(:birthday_format)