<%= render partial: 'nav_tabs', locals: { tab: :overview } %>
<% if @passport.confirmed? %> <%= Passport.human_attribute_name 'confirmed.true' %> <% else %> <%= Passport.human_attribute_name 'confirmed.false' %> <% end %> <%= Passport.human_attribute_name :passport_confirmations_count %> <%= @passport.passport_confirmations.count %> / <%= Passport::REQUIRED_CONFIRMATIONS %>

<% if @passport.can_have_confirmations? && current_account %> <% if @passport.passport_confirmations.where(account: current_account).exists? %> <% else %> <%= link_to translate('.confirm'), passport_passport_confirmations_path(@passport), method: :post, role: :button, class: 'btn btn-primary' %> <% end %>
<% end %> <%= simple_form_for @passport, wrapper: :horizontal_form, defaults: { readonly: true } do |f| %>
<%= f.simple_fields_for :passport_maps do |ff| %> <%= ff.input :surname %> <%= ff.input :given_name %> <%= ff.input :patronymic %> <%= ff.input :sex, as: :radio_buttons, wrapper: :horizontal_collection_inline, disabled: true, collection: PassportMap.sexes.keys.map { |sex| [PassportMap.human_attribute_name("sex.#{sex}"), sex] } %> <%= ff.input :date_of_birth, wrapper: :horizontal_multi_select, disabled: true, start_year: Date.today.year - 150, end_year: Date.today.year %> <%= ff.input :place_of_birth %> <%= ff.input :series %> <%= ff.input :number %> <%= ff.input :issued_by %> <%= ff.input :unit_code %> <%= ff.input :date_of_issue, wrapper: :horizontal_multi_select, disabled: true, start_year: Date.today.year - 150, end_year: Date.today.year %> <% end %>
<% @passport.image.try do |image| %>
<%= image_tag url_for(image), id: :image, class: 'img-fluid', style: 'max-height: 600px' %>
<% end %>
<% end %>