%= render :partial => 'invite/dialog_wait_loading', :locals => {:contact_list => @contact_list.id } if @import_from != 'manual' %>
<% if profile.person? %>
<%= _('Invite people') %>
<% else %>
<%= _('Invite people to join') %>
<% end %>
<%= _('Step 2 of 2: Selecting People') %>
<%= button(:back, _('Back'), { :action => 'invite_friends' }, :id => 'invitation_back_button') %>
<%= _('Indicate which people you want to invite.') %>
<%= form_tag do %>
<%= hidden_field_tag(:import_from, @import_from) %>
<%= hidden_field_tag(:contact_list, @contact_list.id) %>
<%= labelled_form_field(_('Enter one e-mail address per line:'), text_area_tag(:manual_import_addresses, (@manual_import_addresses || ''), :rows => 5, :style => 'width: 98%;')) %>
<% if @import_from != 'manual' %>
<%= link_to_function _('Check all'), "jQuery('input.contact_to_invite').each(function(index,checkbox) { checkbox.checked = true; });" %>
<%= link_to_function _('Uncheck all'), "jQuery('input.contact_to_invite').each(function(index,checkbox) { checkbox.checked = false; });" %>
<% end -%>
<%= render :partial => 'invite/personalize_invitation_mail', :locals => {:mail_template => @mail_template } %>
<% button_bar do %>
<%= submit_button(:ok, _("Invite!")) %>
<% end %>
<% end %>