% # frozen_string_literal: true %>
<%
user = user_form.object.user
id = dom_id(user, :new_protocol_member)
%>
<%= user_form.hidden_field :user_id, value: user.id, name:"access_permissions_new_user_form[resource_members][#{user.id}][user_id]" %>
<%= user_form.check_box :assign,
name: "access_permissions_new_user_form[resource_members][#{user.id}][assign]",
data: { action: 'toggle-visibility', target: id },
class: "sci-checkbox"
%>
<%= image_tag avatar_path(user, :icon_small), title: current_assignee_name(user), class: 'img-circle pull-left' %>
<%= current_assignee_name(user) %>
<%= user_form.select :user_role_id,
options_for_select(user_roles_collection),
{},
name: "access_permissions_new_user_form[resource_members][#{user.id}][user_role_id]",
class: 'form-control selectpicker pull-right',
title: t('user_assignment.select_role') %>