I have overriden posts/new.html.haml so that it allows the user the
choice of writing one post or, with a javascript button, writing a
string of posts. For some reason when the javascript button is pressed
it passes all the fields except for :raw_post. Does anyone know why
this is happening?
- form_for(:post, :url => user_posts_path, :html => {:class =>
"MainForm", :id => 'post_form'}) do |f|
- unless @post.category || @post.contest ||
@categories.blank?
%label
=:category.l
%select{:id=>"post_category_id", :name=>"post[category_id]"}
-for category in @categories
%option{:value=>"#{category.id}"}= h(category.name)
-else
= f.hidden_field :category_id
= f.hidden_field :contest_id
%label
=:title.l
%em="(#{:required.l})"
= f.text_field :title
%label
=:body_text.l
%em="(#{:required.l})"
= f.text_area :raw_post, :style => "width:95%", :rows => 3
%label
=:tags.l
%em="(#{:optional_keywords_describing_this_post_separated_by_commas.l})"
= text_field_tag 'tag_list', @post.tag_list, {:autocomplete =>
"off", :size => 35}
.auto_complete#tag_list_auto_complete
= auto_complete_field 'tag_list', {:url => { :controller =>
"tags", :action => 'auto_complete_for_tag_name'}, :tokens => [','] }
%label
=:save_post_as.l
= f.select(:published_as, [[:published.l, 'live'], [:draft.l,
'draft']])
= link_to_remote "Add another question", :url => {:action =>
"create"}, :submit => 'post_form'
%p
= submit_tag :save.l
%p
=:or.l
= link_to :cancel_and_go_back_to_my_posts.l,
user_posts_path(@user)
--
You received this message because you are subscribed to the Google Groups
"CommunityEngine" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/communityengine?hl=en.