<%= content_for :headers do%> <%= javascript_include_tag 'user_filter' %> <%end%> <%= content_for :javascript do%> $("#send_group_invitation_button").livequery('click',function(){ // Build invitation message by putting its parts together var header = "<%= escape_javascript(t('invitation.to_space', :username => current_user.full_name, :space => @space.name)) %>.

"; // Changing the new line characters to
var personal_msg = ($('#invite_personal').val()).replace(/\n/g,'
'); <%if @space.public%> var ending = "<%= escape_javascript(t('invitation.info_space', :space_url => space_url(@space))) %>

" + "<%= escape_javascript(t('email.kind_regards')) %>

" + "<%= current_user.full_name%>
<%= current_user.email %>
<%= current_user.organization%>
" + "<%= escape_javascript(t('email.spam_invitation', :contact => Site.current.smtp_sender, :feedback => "http://" + Site.current.domain.to_s + new_feedback_path())) %>

"; <%else%> var ending = "<%= escape_javascript(t('invitation.info_space', :space_url => space_url(@space))) %>

" + "<%= escape_javascript(t('space.group_invitation.private', :register_url=>signup_url)) %>
" + "<%= escape_javascript(t('email.kind_regards')) %>

" + "<%= current_user.full_name%>
<%= current_user.email %>
<%= current_user.organization%>
" + "<%= escape_javascript(t('email.spam_invitation', :contact => Site.current.smtp_sender, :feedback => "http://" + Site.current.domain.to_s + new_feedback_path())) %>

"; <%end%> var complete_msg = header + personal_msg + '

' + ending; $('#group_invitation_msg').text(complete_msg); document.forms["space_group_invitation_edit_form"].submit(); }); <%end%>

<%=t('space.group_invitation.message_title')%>

<%= form_for([@space], :html => { :multipart => true, :name => "space_group_invitation_edit_form"}) do |f| -%>
<%= f.text_field :group_invitation_mails %>
<%= f.text_field :group_inv_sender_id, :style => 'display:none', :value => current_user.id %>
<%= t('invitation.to_space', :username => current_user.full_name, :space => @space.name) %>.


<%= t('invitation.info_space', :space_url => space_url(@space)) %>

<%if !(@space.public)%> <%= t('space.group_invitation.private', :register_url=>signup_url) %>
<%end%> <%= t('email.kind_regards') %>

<%= current_user.full_name%>
<%= current_user.email %>
<%= current_user.organization%>
" />
<% end %>