-# 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 - cls = [] - cls << "options#{question.options.size}" unless question.presentation == :horizontal .fields{:id => question.html_id, :class =>cls} %table(cellspacing=0 border=0) %tr - question.options.each_with_index do |opt, idx| - checked = @answer.send(question.key) == opt.key.to_s - next if (opt.hidden and not checked) - cls = [] - cls << "first" if idx <= 0 - cls << "last" if idx >= (question.options.size - 1) - cls << "optionwidth#{question.options.size}" %td.option{:class => cls, :for => question.key} - if show_values %span.value= opt.value %br/ %span - cls = [question.type] - cls << "subinput" if subquestion - cls << "deselectable" if question.deselectable = radio_button(:answer, question.key, opt.key, {:class => cls, :disabled => disabled ? "" : nil, data: {"field-key" => question.key}}) %br/ %label{for: opt.view_id} %span = Quby::MarkdownParser.new(opt.description).html_safe