Sha256: 920f19366dcbb0ade685251a8875399f582384475765755f9e2ae30ea72ed583
Contents?: true
Size: 1.34 KB
Versions: 2
Compression:
Stored size: 1.34 KB
Contents
-# TODO: disabled - rg ||= nil - r = response_for(@response_set, q, a, rg) - i = response_idx(q.pick != "one") # argument will be false (don't increment i) if we're on radio buttons - f.semantic_fields_for i, r do |ff| = ff.quiet_input :question_id unless q.pick == "one" # don't repeat question_id if we're on radio buttons = ff.quiet_input :id unless q.pick == "one" or r.new_record? = ff.quiet_input :response_group, :value => rg if q.pick != "one" && g && g.display_type == "repeater" - case q.pick - when "one" = ff.input :answer_id, :as => :surveyor_radio, :collection => [[a.text, a.id]], :label => false, :input_html => {:class => a.css_class}, :response_class => a.response_class - when "any" = ff.input :answer_id, :as => :surveyor_check_boxes, :collection => [[a.text, a.id]], :label => false, :input_html => {:class => a.css_class}, :response_class => a.response_class - when "none" - if %w(date datetime time float integer string text).include? a.response_class = ff.quiet_input :answer_id, :input_html => {:class => a.css_class, :value => a.id} = ff.input rc_to_attr(a.response_class), :as => rc_to_as(a.response_class), :label => a.split_or_hidden_text(:pre).blank? ? false : a.split_or_hidden_text(:pre), :hint => a.split_or_hidden_text(:post), :input_html => {:value => a.default_value} - else = a.text
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
surveyor-0.19.1 | app/views/partials/_answer.html.haml |
surveyor-0.19.0 | app/views/partials/_answer.html.haml |