<fieldset>
  <legend>
    <%= link_to('', 'javascript:void(0)', :onclick => "toggleCheckboxesBySelector('#projects-selection input:enabled')", :title => "#{l(:button_check_all)} / #{l(:button_uncheck_all)}", :class => 'contextual icon icon-checked') %>
    <%= l(:label_project_plural) %>
  </legend>
  <div id="projects">
    <%= render_project_nested_lists(@projects) do |project| %>
      <div class="project-item <%= "project-#{project.id}" %>" data-name="<%= project.name %>">
        <label><%= check_box_tag('membership[project_ids][]', project.id, false, :id => nil, :disabled => @principal.member_of?(project)) %> <%= project %></label>
      </div>
    <% end %>
  </div>
</fieldset>
