- include_stylesheet('admin/reader_group') %h1 = t('reader_extension.check_invitation_list', :name => @group.name) - form_for :group, @group, :url => admin_group_group_invitations_url(@group), :html => {:id => 'confirmation_form', :method => 'post'} do %p = t('reader_extension.invitation_preview_instructions') %table#import %thead %tr %th - if Radiant::Config['reader.show_honorifics?'] %th= t('activerecord.attributes.reader.honorific') %th= t('activerecord.attributes.reader.forename') %th= t('activerecord.attributes.reader.surname') %th= t('activerecord.attributes.reader.email') %th= t('activerecord.attributes.reader.phone') %tbody - i = 0 - @readers.each do |reader| - if reader.new_record? %tr.import %td = check_box_tag "import_reader[]", i, reader.valid? - if Radiant::Config['reader.show_honorifics?'] %td = text_field_tag "reader_#{i}[honorific]", reader.honorific, :class => "preview#{ ' with_error' if reader.errors.on(:honorific)}", :title => reader.errors.on(:honorific) %td = text_field_tag "reader_#{i}[forename]", reader.forename, :class => "preview#{ ' with_error' if reader.errors.on(:forename)}", :title => reader.errors.on(:forename) %td = text_field_tag "reader_#{i}[surname]", reader.surname, :class => "preview#{ ' with_error' if reader.errors.on(:surname)}", :title => reader.errors.on(:surname) %td = text_field_tag "reader_#{i}[email]", reader.email, :class => "preview#{ ' with_error' if reader.errors.on(:email)}", :title => reader.errors.on(:email) %td = text_field_tag "reader_#{i}[phone]", reader.phone, :class => "preview#{ ' with_error' if reader.errors.on(:phone)}", :title => reader.errors.on(:phone) - else %tr.invite %td = check_box_tag "invite_reader[]", reader.id, {:checked => true} - if Radiant::Config['reader.show_honorifics?'] %td = text_field_tag "reader_#{i}[honorific]", reader.honorific, :class => "preview#{ ' with_error' if reader.errors.on(:honorific)}", :title => reader.errors.on(:honorific), :disabled => true %td = text_field_tag "reader_#{i}[forename]", reader.preferred_name, :class => "preview#{ ' with_error' if reader.errors.on(:forename)}", :title => reader.errors.on(:forename), :disabled => true %td = text_field_tag "reader_#{i}[surname]", reader.preferred_name, :class => "preview#{ ' with_error' if reader.errors.on(:surname)}", :title => reader.errors.on(:surname), :disabled => true %td = text_field_tag "reader_#{i}[email]", reader.email, :class => "preview#{ ' with_error' if reader.errors.on(:email)}", :title => reader.errors.on(:email), :disabled => true %td = text_field_tag "reader_#{i}[phone]", reader.phone, :class => "preview#{ ' with_error' if reader.errors.on(:phone)}", :title => reader.errors.on(:phone), :disabled => true - i = i + 1 %p.buttons = submit_tag 'Invite these people into the group', :name => 'confirm', :class => 'button' or = link_to 'start again', new_admin_group_group_invitation_url(@group)