working on facebook app views
[shapado:shapado.git] / app / views / facebook / _form.html.haml
1 .quick_question
2   %h2
3     = raw(current_group.question_prompt) || t("shared.quick_question")
4   -@question = Question.new
5   =form_for(@question, :url => new_question_url, :html=>{:method => :get, :class => "form", :id => "ask_question"}) do |f|
6     -# TODO: refactor this
7     -lang = logged_in? ? current_user.main_language : nil
8     -lang = current_group.language ? current_group.language : lang
9
10     =f.text_field :title, :class => "text_area", :id => "question_title"
11     =f.submit t(".ask_question", :default => :"layouts.application.ask_question"), :class => "ask_question"
12
13     -if lang
14       = f.hidden_field :language, :value => lang
15     -else
16       = language_select(f, @question)
17     .clear
18   .clear