Noosfero/noosfero

View on GitHub
app/views/invite/select_friends.html.erb

Summary

Maintainability
Test Coverage
<%= render :partial => 'invite/dialog_wait_loading', :locals => {:contact_list => @contact_list.id } if @import_from != 'manual' %>

<% if profile.person? %>
  <h1><%= _('Invite people') %></h1>
<% else %>
  <h1><%= _('Invite people to join') %></h1>
<% end %>


<h2><%= _('Step 2 of 2: Selecting People') %></h2>

<%= button(:back, _('Back'), { :action => 'invite_friends' }, :id => 'invitation_back_button') %>

<p>
<%= _('Indicate which people you want to invite.') %>
</p>

<%= form_tag do %>
  <%= hidden_field_tag(:import_from, @import_from) %>
  <%= hidden_field_tag(:contact_list, @contact_list.id) %>

  <div>
  <%= labelled_form_field(_('Enter one e-mail address per line:'), text_area_tag(:manual_import_addresses, (@manual_import_addresses || ''), :rows => 5, :style => 'width: 98%;')) %>
  </div>
  <% if @import_from != 'manual' %>
    <div>
      <%= 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; });" %>
      <div id='contacts-list'></div>
    </div>
  <% end -%>

  <%= render :partial => 'invite/personalize_invitation_mail', :locals => {:mail_template => @mail_template } %>

  <%= button_bar do %>
    <%= submit_button(:ok, _("Invite!")) %>
  <% end %>
<% end %>