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