Sha256: ce3c4bdfbc0fabafba53bc272aab8204328636deda66bd3f63aa957c7e93da28
Contents?: true
Size: 1.7 KB
Versions: 35
Compression:
Stored size: 1.7 KB
Contents
-# frozen_string_literal: true - insert = nil - subq = question.options.last&.questions&.first - if subq&.presentation == :next_to_title and subq.type == :string -insert = render :partial => "quby/v1/shared/inline_text_field", :locals => {:answer => @answer, :question => subq} = render :partial => "quby/v1/shared/main_label", :locals => {:question => question, :title_insert => insert} - show_values = question.show_values_in_mode? :paged .description-and-fields .description - unless question.description.blank? = Quby::MarkdownParser.new(question.description).html_safe .fields{:id => question.html_id} - question.options.each do |opt| - checked = @answer.send(question.key) == opt.key.to_s - next if (opt.hidden and not checked) - if opt.inner_title .inner-title = Quby::MarkdownParser.new(opt.description).html_safe - else .option{:class =>"#{show_values ? 'show_values' : nil}", :for => question.key} .radiocheckwrapper - radio_classes = [question.type] - radio_classes << "subinput" if subquestion - radio_classes << "deselectable" if question.deselectable = radio_button(:answer, question.key, opt.key, {:class => radio_classes, :disabled => disabled ? "" : nil, data: {"field-key" => question.key}}) - if show_values .value= opt.value .labelwrapper %label{for: opt.view_id} %span = Quby::MarkdownParser.new(opt.description).html_safe - unless opt.questions.empty? .subquestions= render :partial => "quby/v1/paged/item", :collection => opt.questions, :locals => {:subquestion => true, :disabled => !checked}
Version data entries
35 entries across 35 versions & 1 rubygems