<% page_title t('titles.schools'), @school.displayName, t('titles.users'), @user.displayName, t('titles.change_school') %>

<div class="formContainer">

<h1><%= t('.title') %></h1>

<%= form_for("user", :url => select_role_user_path(@school, @user))  do |f| %>
<table class="editForm">
  <tr>
    <th><%= label_tag :new_school, t('.user') %></td>
    <td><%= @user.displayName %></td>
  </th>

  <tr>
    <th><%= label_tag :new_school, t('.role') %></td>
    <td><%= list_user_roles(@user.puavoEduPersonAffiliation) %></td>
  </th>

  <tr>
    <th><%= label_tag :new_school, t('.select_new_school') %></td>
    <td><%= select_tag :new_school, options_from_collection_for_select(@schools, "puavoId", "displayName") %></td>
  </tr>

  <tr class="buttonRow">
    <td colspan="2">
      <%= f.submit t('.submit'), class: 'btn' %>
    </td>
  </tr>
</table>
<% end %>

</div>
