<% provide(:head_title, raw(t("user_projects.edit.head_title", project: @project.name))) %>
<h2><%=t "user_projects.edit.title", user: @up.user.full_name, project: @project.name %></h2>

<%= bootstrap_form_for [@project, @up] do |f| %>
  <%= f.label t("user_projects.new.role"), style: "margin-top: 10px;" %><br />
  <div class="btn-group" data-toggle="buttons">
    <label class="btn btn-primary<%= @up.owner? ? " active" : "" %>">
      <%= f.radio_button_without_bootstrap :role, :owner, :checked => @up.owner? %>
      <%=t "user_projects.enums.role.owner" %>
    </label>
    <label class="btn btn-primary<%= @up.normal_user? ? " active" : "" %>">
      <%= f.radio_button_without_bootstrap :role, :normal_user, :checked => @up.normal_user? %>
      <%=t "user_projects.enums.role.normal_user" %>
    </label>
    <label class="btn btn-primary<%= @up.technician? ? " active" : "" %>">
      <%= f.radio_button_without_bootstrap :role, :technician, :checked => @up.technician? %>
      <%=t "user_projects.enums.role.technician" %>
    </label>
    <label class="btn btn-primary<%= @up.viewer? ? " active" : "" %>">
      <%= f.radio_button_without_bootstrap :role, :viewer, :checked => @up.viewer? %>
      <%=t "user_projects.enums.role.viewer" %>
    </label>
  </div>
  <br />
  <%= f.submit t("user_projects.edit.update"), style: "margin-top: 10px;" %>
<% end %>