Improve HTML
This commit is contained in:
parent
7600e048a7
commit
dfb0d99b73
1 changed files with 26 additions and 20 deletions
|
@ -1,25 +1,31 @@
|
||||||
<%= simple_form_for passport do |f| %>
|
<%= simple_form_for passport do |f| %>
|
||||||
<%= f.simple_fields_for :passport_map do |ff| %>
|
<div class="row">
|
||||||
<%= ff.input :surname %>
|
<div class="col-md-6">
|
||||||
<%= ff.input :given_name %>
|
<%= f.simple_fields_for :passport_map do |ff| %>
|
||||||
<%= ff.input :patronymic %>
|
<%= ff.input :surname %>
|
||||||
<%= ff.input :sex,
|
<%= ff.input :given_name %>
|
||||||
as: :radio_buttons,
|
<%= ff.input :patronymic %>
|
||||||
collection: PassportMap.sexes.keys.map { |sex|
|
<%= ff.input :sex,
|
||||||
[Passport.human_attribute_name("sex.#{sex}"), sex]
|
as: :radio_buttons,
|
||||||
} %>
|
collection: PassportMap.sexes.keys.map { |sex|
|
||||||
<%= ff.input :date_of_birth, start_year: Date.today.year - 150,
|
[Passport.human_attribute_name("sex.#{sex}"), sex]
|
||||||
end_year: Date.today.year %>
|
} %>
|
||||||
<%= ff.input :place_of_birth %>
|
<%= ff.input :date_of_birth, start_year: Date.today.year - 150,
|
||||||
<%= ff.input :series %>
|
end_year: Date.today.year %>
|
||||||
<%= ff.input :number %>
|
<%= ff.input :place_of_birth %>
|
||||||
<%= ff.input :issued_by %>
|
<%= ff.input :series %>
|
||||||
<%= ff.input :unit_code %>
|
<%= ff.input :number %>
|
||||||
<%= ff.input :date_of_issue, start_year: Date.today.year - 150,
|
<%= ff.input :issued_by %>
|
||||||
end_year: Date.today.year %>
|
<%= ff.input :unit_code %>
|
||||||
<% end %>
|
<%= ff.input :date_of_issue, start_year: Date.today.year - 150,
|
||||||
|
end_year: Date.today.year %>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
|
||||||
<%= f.input :images %>
|
<div class="col-md-6">
|
||||||
|
<%= f.input :images %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<%= f.button :submit %>
|
<%= f.button :submit %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
Reference in a new issue