= form_for(@user) do |f|
  = render('shared/form_errors', object: @user)
  .form-group
    = f.label(:consumer_id)
    = f.collection_select(:consumer_id, Consumer.all.sort_by(&:name), :id, :name, {}, class: 'form-control')
  .form-group
    = f.label(:email)
    = f.email_field(:email, class: 'form-control', required: true)
  .form-group
    = f.label(:name)
    = f.text_field(:name, class: 'form-control', required: true)
  .form-group
    = f.label(:role)
    = f.select(:role, User::ROLES.map { |role| [t("users.roles.#{role}"), role] }, {selected: @user.role || 'teacher'}, class: 'form-control')
  .actions = render('shared/submit_button', f: f, object: @user)
