2009-10-20 22:34:38 +04:00
|
|
|
<% if projects.any? %>
|
|
|
|
<fieldset><legend><%=l(:label_project_new)%></legend>
|
|
|
|
<% remote_form_for(:membership, :url => { :action => 'edit_membership', :id => principal }) do %>
|
2009-10-20 23:28:07 +04:00
|
|
|
<p><%= text_field_tag 'project_search', nil, :size => "40" %></p>
|
|
|
|
<%= observe_field(:project_search,
|
|
|
|
:frequency => 0.5,
|
|
|
|
:update => :projects,
|
|
|
|
:url => { :controller => 'auto_completes', :action => 'projects', :id => principal },
|
|
|
|
:with => 'q')
|
|
|
|
%>
|
2012-01-18 22:26:03 +04:00
|
|
|
|
2009-10-20 23:28:07 +04:00
|
|
|
<div id="projects">
|
|
|
|
<%= principals_check_box_tags 'project_ids[]', projects %>
|
|
|
|
</div>
|
|
|
|
|
2009-10-20 22:34:38 +04:00
|
|
|
<p><%= l(:label_role_plural) %>:
|
|
|
|
<% roles.each do |role| %>
|
|
|
|
<label><%= check_box_tag 'membership[role_ids][]', role.id %> <%=h role %></label>
|
|
|
|
<% end %></p>
|
|
|
|
<p><%= submit_tag l(:button_add) %></p>
|
|
|
|
<% end %>
|
|
|
|
</fieldset>
|
|
|
|
<% end %>
|