.tabbable
%ul.nav.nav-tabs
%li.active
= link_to "Proposal", "#proposal-content", "data-toggle"=>"tab"
%li
= link_to "Attachments", "#attachment-content", "data-toggle"=>"tab"
.tab-content
#proposal-content.tab-pane.active
.span12
= semantic_form_for(@event, :url => @url) do |f|
%section#basic
= f.inputs :name => "Basic Information" do
= f.input :title, :required => true
= f.input :subtitle
= f.input :abstract, :input_html => {:rows => 5, "onkeyup" => "word_count(this, 'abstract-count')"}, :required => true
You have used
%span#abstract-count #{@event.abstract_word_count}
words. Abstracts are limited to 250 words.
%br
%br
= f.input :description, :input_html => {:rows => 5}, :hint => "This will only be shown to organizers, not to attendees."
%section#details
= f.inputs :name => "Event Details" do
= f.input :event_type_id,:as => :select, :collection => @event_types, :include_blank => false
%section#information
= f.inputs :name => "Your Information" do
= semantic_fields_for @person do |p|
= p.input :public_name, :required => true
= p.input :company, :label => "Affiliation", :hint => "This could be a company, a user group, or nothing at all."
= p.input :biography, :required => true, :input_html => {:rows => 5, "onkeyup" => "word_count(this, 'biography-count')"}
You have used
%span#biography-count #{@person.biography_word_count}
words. Biographies are limited to 150 words.
%br
%br
%section#speakers
= f.inputs :name => "Additional Speakers" do
Will there be any additional speakers? If so, please enter their full names, email address, and a short
biography for each.
= f.input :proposal_additional_speakers, :input_html => {:rows => 5}, :label => false
= f.action :submit, :as => :button, :button_html => {:class => "btn btn-primary"}
#attachment-content.tab-pane
.span12
= form_for EventAttachment.new, :url => conference_proposal_event_attachment_index_path(@conference.short_title, @event),
:html => { :multipart => true, :id => "fileupload" } do |f|
%table.table.table-striped
%thead
%th
%th
%b Filename
%th
%b Title
%th
%b Size
%th
%b Public
%th
%tbody.files
.row-fluid.fileupload-buttonbar
.btn.btn-success.fileinput-button
%i.icon-plus.icon-white
Add files...
= f.file_field :attachment
= f.hidden_field :event_id, :value => @event.id
:javascript
$(document).ready( function() {
$('#fileupload').fileupload();
$('#fileupload').bind('fileuploadsubmit', function (e, data) {
var inputs = data.context.find(':input');
if (inputs.filter('[required][value=""]').first().focus().length) {
return false;
}
data.formData = inputs.serializeArray();
});
} );
:plain