|
|
@ -45,32 +45,25 @@ See docs/COPYRIGHT.rdoc for more details. |
|
|
|
.not_builtin |
|
|
|
.not_builtin |
|
|
|
.active |
|
|
|
.active |
|
|
|
.not_in_group(@group) |
|
|
|
.not_in_group(@group) |
|
|
|
.limit(100) %> |
|
|
|
.limit(1) %> |
|
|
|
<% if users.any? %> |
|
|
|
<% if users.any? %> |
|
|
|
<%= styled_form_tag(members_of_group_path(@group), method: :post) do |f| %> |
|
|
|
<%= styled_form_tag(members_of_group_path(@group), method: :post) do %> |
|
|
|
<remote-field-updater url="<%= url_for(controller: '/groups', action: 'autocomplete_for_user', id: @group)%>"> |
|
|
|
|
|
|
|
<fieldset class="form--fieldset"> |
|
|
|
<fieldset class="form--fieldset"> |
|
|
|
<legend class="form--fieldset-legend"><%=l(:label_user_new)%></legend> |
|
|
|
<legend class="form--fieldset-legend"><%=l(:label_user_new)%></legend> |
|
|
|
<div class="form--field -vertical"> |
|
|
|
<div class="form--field -vertical"> |
|
|
|
<%= styled_label_tag "user_search", l(:label_user_search) %> |
|
|
|
<% user_ids = [] %> |
|
|
|
<div class="form--field-container"> |
|
|
|
<% @group.users.each do |user| %> |
|
|
|
<%= styled_text_field_tag 'user_search', |
|
|
|
<% user_ids.push(user.id) %> |
|
|
|
nil, |
|
|
|
<% end %> |
|
|
|
class: 'remote-field--input', |
|
|
|
|
|
|
|
data: { :'remote-field-key' =>'q' } %> |
|
|
|
<%= hidden_field_tag :user_ids, user_ids %> |
|
|
|
</div> |
|
|
|
<user-autocompleter data-update-input="user_ids"></user-autocompleter> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="form--field -vertical"> |
|
|
|
|
|
|
|
<div id="users" class="remote-field--target form--field-container -vertical"> |
|
|
|
|
|
|
|
<%= principals_check_box_tags 'user_ids[]', users %> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</fieldset> |
|
|
|
|
|
|
|
</remote-field-updater> |
|
|
|
|
|
|
|
<div> |
|
|
|
<div> |
|
|
|
<%= styled_button_tag l(:button_add), |
|
|
|
<%= styled_button_tag l(:button_add), |
|
|
|
class: '-highlight -with-icon icon-checkmark' %> |
|
|
|
class: '-highlight -with-icon icon-checkmark' %> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
</fieldset> |
|
|
|
<% end %> |
|
|
|
<% end %> |
|
|
|
<% end %> |
|
|
|
<% end %> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|