_form.html.erb 536 B

12345678910111213141516
  1. <%= bootstrap_form_for(@user) do |f| %>
  2. <%= render 'shared/error_messages', object: f.object %>
  3. <% if current_user.is_administrator_at?(@user.school) %>
  4. <%= f.text_field :name %>
  5. <%= f.select :gender, User.genders.keys, {} %>
  6. <%= f.date_field :birth_date %>
  7. <% end %>
  8. <%= f.text_field :login %>
  9. <%= f.email_field :email %>
  10. <%= f.phone_field :phone %>
  11. <%= f.password_field :password %>
  12. <%= f.password_field :password_confirmation %>
  13. <%= f.submit yield(:button_text), class: "btn btn-primary" %>
  14. <% end %>