<% form_for @person, :url => {:controller => 'users', :action => :create}, :html => {:class =>"valid"} do |f| -%>
<%= f.error_messages %>
| Основные данные |
| <%= f.label :name %> |
<%= f.text_field :name, :size => 50 %> |
| <%= f.label :nic %> |
<%= f.text_field :nic, :size => 50 %> |
| <%= f.label :phone %> |
<%= f.text_field :phone, :size => 50 %> |
| <%= f.label :email %> |
<%= f.text_field :email, :size => 50 %> |
| <%= f.label :birthday %> |
<%= calendar_field_tag "bithday", {}, {:size=>9, :name => 'person[birthday]', :class =>"dateRUS"} %> |
| <%= f.label :division_id %> |
<%= f.collection_select(:division_id, Division.all, :id, :name) %> |
| <%= f.label :position_id %> |
<%= f.collection_select(:position_id, Position.all, :id, :name) %> |
| <%= f.label :password %> |
<%= f.text_field :password, :size => 50 %> |
| <%= f.label :password_confirmation %> |
<%= f.text_field :password_confirmation, :size => 50 %> |
| <%= f.submit "Сохранить" %> |
<%= button_to_function "Отмена", "history_back()" %> |
<% end -%>