<%#
  This file is a part of RedmineX UX Upgrade plugin
  for Redmine

  Copyright 2020-2022 RedmineX. All Rights Reserved.
  https://www.redmine-x.com

  Licensed under GPL v2 (http://www.gnu.org/licenses/gpl-2.0.html)
  Created by Ondřej Svejkovský
%>

<%= form_for(:user, :url => { :action => 'update' }, :html => {:method => :put}) do %>
<div class="box">
<div id="user_group_ids">
<% user_group_ids = @user.group_ids %>
<% Group.givable.sort.each do |group| %>
<label><%= check_box_tag 'user[group_ids][]', group.id, user_group_ids.include?(group.id), :id => nil %> <%= group %></label><br />
<% end %>
<%= hidden_field_tag 'user[group_ids][]', '' %>
</div>
<p><%= check_all_links 'user_group_ids' %></p>
</div>
<div class="projectino-controls"><%= submit_tag l(:button_save) %></div>
<% end %>
