<%= render :partial => "open_conference_ware/proposals/admin_controls" %>

<%= @event.open_text.try(:html_safe) %> <%= link_to "Edit", edit_manage_event_path(@event), :class => :editable if admin? %>

<%= error_messages_for :proposal unless error_messages_for(:proposal).blank? %> <% if user_profiles? and multiple_presenters? %>

Speakers for this presentation

<%= render :partial => 'open_conference_ware/proposals/search_speakers' %>

Can't find the person you want to add? Ask them to complete a speaker profile. Click the link in the box below to select it, copy it to your clipboard, ask them to visit this link to complete their speaker profile, and then add them: <%= text_field_tag(:complete_profile_user_url, complete_profile_user_url("me"), :readonly => true) %>

<% end %> <%= form_for([@event, @proposal]) do |f| %> <%= f.hidden_field :track_id if event_tracks? && @event.tracks.size == 1 %> <%= f.hidden_field :session_type_id if event_session_types? && @event.session_types.size == 1 %> <% if user_profiles? and multiple_presenters? %>
<%= render :partial => "open_conference_ware/proposals/manage_speakers" %>
<% end %> <% if not user_profiles? and not multiple_presenters? %> <% end %> <% if params[:preview] and @proposal.valid? %> <% end %> <% if event_tracks? and @event.tracks.size > 1 %> <% end %> <% if event_session_types? and @event.session_types.size > 1 %> <% end %> <% if Proposal.audience_levels %> <% end %> <% if proposal_excerpts? %> <% end %> <% if proposal_speaking_experience? %> <% end %> <% if ! @proposal.new_record? && admin? %> <% end -%> <% if @proposal.new_record? %> <% end %>

About you

<%= required_field %><%= f.label :presenter, "Name" %> <%= f.text_field :presenter %>
<%= required_field %><%= f.label :email, "Email (kept private)" %> <%= f.text_field :email %>
<%= f.label :affiliation, "Affiliation" %> <%= f.text_field :affiliation %>
<%= f.label :website, "Website" %> <%= f.text_field :website %>
<%= required_field %><%= f.label :biography, "Biography" %> <%= f.text_area :biography, :rows => 5 %>

Preview of Proposal: <%= @proposal.title %>

<% if proposal_excerpts? %>

Excerpt

<%= preserve_formatting_of @proposal.excerpt %>
<% end %>

Description

<%= display_textile_for @proposal.description %>

<% if multiple_presenters? %> About this presentation <% else %> About your presentation <% end %>

<%= required_field %><%= f.label :title, "Title" %> <% if @event.proposal_titles_locked? && ! (admin? || @proposal.new_record?) -%> <%= @proposal.title %> <% else -%> <%= f.text_field :title %> <% end -%> <% if @event.proposal_titles_locked? && ! @proposal.new_record? %>

Editing of <%= @proposal.kind_label %> titles has been locked. <% if admin? %>
WARNING: Titles are locked because other systems are currently depending on them. (MediaWiki, printed programs, etc.) <% else -%> If you need to change this information, please <%= mail_to SECRETS.administrator_email, 'contact the administrator' %>. <% end -%>

<% end -%>
<%= required_field %><%= f.label :track_id, "Track" %>
    <% for track in @event.tracks %>
  • <%= f.radio_button :track_id, track.id, :class => :radio %>
  • <% end %>
<%= required_field %><%= f.label :session_type_id, "Session Type" %>
    <% for session_type in @event.session_types.sort_by{|e| e.duration} %>
  • <%= f.radio_button :session_type_id, session_type.id, :class => :radio %>
  • <% end %>
<%= required_field %><%= f.label :session_type_id, "Audience level" %>
    <% for audience_level in Proposal.audience_levels %>
  • <%= f.radio_button :audience_level, audience_level['slug'], :class => :radio %>
  • <% end %>

<%= Proposal.audience_level_hint %>

<%= required_field %><%= f.label :excerpt, "Excerpt" %> <%= f.text_area :excerpt, :rows => 2 %>
<%= required_field %><%= f.label :description, "Description" %>
(<%= display_textile_help_link %>)
<%= f.text_area :description, :rows => 9 %>
<%= f.label :tag_list, "Tags" %> <%= f.text_field :tag_list %>

(comma-separated)

<%= required_field %><%= f.label :speaking_experience, "Speaking experience" %> <%= f.text_area :speaking_experience, :rows => 3 %>

(Tell us about your past speaking experience at other conferences and events, with links to related slides, videos, and/or audio. Also let us know if you've given this talk before.)

<%= f.label :note_to_organizers, "Note to organizers
(Optional, kept private)" %>
<%= f.text_area :note_to_organizers, :rows => 3 %>

(Is there anything else we should know about the room requirements or plans for your talk? E.g. you will be tapdancing, throwing broccoli into the audience, and need to rehearse beforehand.)

<%= f.label :audio_url %> <%= f.text_field :audio_url %>
<%= required_field %><%= f.label :agreement, "Agreement" %> <%= f.check_box :agreement %> <% unless OpenConferenceWare.agreement.blank? %> <%= OpenConferenceWare.agreement.try(:html_safe) %> <% else %> I understand that my talk may be recorded and posted online for the whole world to see. I understand that <%= OpenConferenceWare.organization %> is not the appropriate place for commercial promotion ("spam") of a product, service or solution and this not welcomed by the audience. <% end %>
 
<%= f.submit(@proposal.new_record? ? "Create" : "Update") %> <%= submit_tag 'Preview', :name => 'preview' %> <%= yield :form_controls %> <%= link_to("Cancel", (@proposal.new_record? ? event_proposals_path(@event) : proposal_path(@proposal)), :class => "cancelable") %>

<%= required_field %> Fields marked with a red asterisk are required and must be filled.

<% end %>
<% content_for :javascript do %> <% path_record = @proposal.new_record? ? "new_record" : @proposal %> $(document).ready(function() { /*---[ Styling ]------------------------------------------------------*/ // Hide the speaker form and display a short tip instead. $('#add-speakers-tip').removeClass('hidden').click(function (event) { $(this).addClass('hidden'); $('#add-speakers-form').removeClass('hidden'); return false; }); $('#add-speakers-form').addClass('hidden'); // Make URL clickable $('#complete_profile_user_url').click(function (event) { $(this).select(); return false; }); /*---[ Form-level ]---------------------------------------------------*/ // Speaker extractor function extract_speaker_ids() { speaker_ids = []; $('.speaker_id').each(function (i, node) { speaker_ids.push(node['value']) }); return speaker_ids; } function extract_speaker_frags() { return extract_speaker_ids().join(",") } /*---[ Search results ]-----------------------------------------------*/ $('#add-speakers-form').submit(function (event) { event.preventDefault(); query = $('#speaker-search-field').val(); $.post( '<%= search_proposal_speakers_path(path_record) %>', { 'authenticity_token': app.authenticity_token, 'speakers': extract_speaker_frags(), 'search': query }, function(response) { $('#speaker-search-results').html(response); bind_add_speakers(); $("#speaker-search-field").focus(); }, "html" ); }); /*---[ Add speaker ]--------------------------------------------------*/ function bind_add_speakers() { $('a.add-speaker').click( function(event) { $e = $(event); // Export global for debugging. event.preventDefault(); target = $(event.target); target.removeClass('addable'); target.addClass('spinning'); speaker_id = target.attr('speaker_id'); $.post( '<%= manage_proposal_speakers_path(path_record) %>', { 'authenticity_token': app.authenticity_token, 'speakers': extract_speaker_frags(), 'add': speaker_id }, function(response) { $('#manage-speakers').html(response); bind_remove_speakers(); $("#add_speaker_selector").focus(); target.removeClass('spinning'); target.addClass('addable'); } ); } ); } /*---[ Remove speaker ]-----------------------------------------------*/ function bind_remove_speakers() { $('#manage-speakers a.remove-speaker').click(function (event) { event.preventDefault(); target = $(event.target); speaker_id = target.attr('speaker_id'); current_user_id = $('#current_user_id').attr('value'); message = null; if (current_user_id == speaker_id) { message = "You will no longer be able to edit this proposal. Are you sure you want to remove yourself?"; } else { message = target.attr('speaker_fullname') + " will no longer be able to edit this proposal. Are you sure you want to remove them?"; } if (! confirm(message)) { return false; } target.removeClass('deletable'); target.addClass('spinning'); $.post( '<%= manage_proposal_speakers_path(path_record) %>', { 'authenticity_token': app.authenticity_token, 'speakers': extract_speaker_frags(), 'remove': speaker_id }, function(response) { $('#manage-speakers').html(response); bind_remove_speakers(); $("#add_speaker_selector").focus(); } ); }); } bind_remove_speakers(); }); <% end %>