Sha256: 8fb761d8a22eb4e1bf2ec6e356eb930e2b95b51f94f4441291848dd3da34277f
Contents?: true
Size: 1.55 KB
Versions: 34
Compression:
Stored size: 1.55 KB
Contents
-# frozen_string_literal: true - if not_bulk = render :partial => "quby/v1/paged/item_question_radio", :locals => {:answer => @answer, :question => question, :subquestion => false, :disabled => false} - else %label.main(for="answer_#{question.key}") = render :partial => "quby/v1/shared/main_label", :locals => {:question => question} - subq = question.options.last.questions.first - if subq&.presentation == :next_to_title and subq.type == :string = render :partial => "quby/v1/shared/inline_text_field", :locals => {:answer => @answer, :question => subq} .description-and-fields .fields{:id => question.html_id, :class => "options#{question.options.size}"} - question.options.each_with_index do |opt, idx| - next if opt.inner_title - 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}" - cls << "deselectable" if question.deselectable .option{:class => cls, :title => opt.description, :for => question.key} - radio_classes = [] - 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 question.show_values_in_mode? :bulk %span.value= opt.value
Version data entries
34 entries across 34 versions & 1 rubygems