<%
  user_limit ||= 1
  users ||= []
  owner ||= User.owner
%>
<div id="user_selection">
  <% if users.any? %>
    <table style="border:1px solid #cbc8cd;" class="list entities easy-trial-expiration__table">
      <% users.each do |user| %>
        <tr style="border:1px solid #cbc8cd;" class="easy-trial-expiration__row">
          <td class='name'><%= user.name %></td>
          <td><%= check_box_tag('active[user_ids][]', user.id, user == owner, id: nil, disabled: user == owner) %></td>
        </tr>
      <% end %>
    </table>
  <% end %>
</div>

<script>
  EASY.trialExpiration.loadUserSelection(<%= user_limit %>);
</script>
