Remove unnecessary partial
This commit is contained in:
parent
ce716f39f2
commit
5bc995094a
2 changed files with 40 additions and 41 deletions
|
@ -1,40 +0,0 @@
|
|||
<%= simple_form_for passport, wrapper: :horizontal_form do |f| %>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<%= f.simple_fields_for :passport_map do |ff| %>
|
||||
<%= ff.input :surname %>
|
||||
<%= ff.input :given_name %>
|
||||
<%= ff.input :patronymic %>
|
||||
|
||||
<%= ff.input :sex,
|
||||
as: :radio_buttons,
|
||||
wrapper: :horizontal_collection_inline,
|
||||
collection: PassportMap.sexes.keys.map { |sex|
|
||||
[PassportMap.human_attribute_name("sex.#{sex}"), sex]
|
||||
} %>
|
||||
|
||||
<%= ff.input :date_of_birth,
|
||||
wrapper: :horizontal_multi_select,
|
||||
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,
|
||||
start_year: Date.today.year - 150,
|
||||
end_year: Date.today.year %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<%= f.input :images %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%= f.button :submit %>
|
||||
<% end %>
|
|
@ -1,3 +1,42 @@
|
|||
<div class="container">
|
||||
<%= render partial: 'form', locals: { passport: @passport } %>
|
||||
<%= simple_form_for @passport, wrapper: :horizontal_form do |f| %>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<%= f.simple_fields_for :passport_map do |ff| %>
|
||||
<%= ff.input :surname %>
|
||||
<%= ff.input :given_name %>
|
||||
<%= ff.input :patronymic %>
|
||||
|
||||
<%= ff.input :sex,
|
||||
as: :radio_buttons,
|
||||
wrapper: :horizontal_collection_inline,
|
||||
collection: PassportMap.sexes.keys.map { |sex|
|
||||
[PassportMap.human_attribute_name("sex.#{sex}"), sex]
|
||||
} %>
|
||||
|
||||
<%= ff.input :date_of_birth,
|
||||
wrapper: :horizontal_multi_select,
|
||||
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,
|
||||
start_year: Date.today.year - 150,
|
||||
end_year: Date.today.year %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<%= f.input :images %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%= f.button :submit %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
|
Reference in a new issue