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

Version Path
quby-5.6.6 app/views/quby/v1/bulk/_item_question_radio.html.haml
quby-5.6.5 app/views/quby/v1/bulk/_item_question_radio.html.haml
quby-5.6.3 app/views/quby/v1/bulk/_item_question_radio.html.haml
quby-5.6.2 app/views/quby/v1/bulk/_item_question_radio.html.haml
quby-5.6.1 app/views/quby/v1/bulk/_item_question_radio.html.haml
quby-5.6.0 app/views/quby/v1/bulk/_item_question_radio.html.haml
quby-5.5.0 app/views/quby/v1/bulk/_item_question_radio.html.haml
quby-5.4.0 app/views/quby/v1/bulk/_item_question_radio.html.haml
quby-5.3.1 app/views/quby/v1/bulk/_item_question_radio.html.haml
quby-5.3.0 app/views/quby/v1/bulk/_item_question_radio.html.haml
quby-5.2.0 app/views/quby/v1/bulk/_item_question_radio.html.haml
quby-5.1.3 app/views/quby/v1/bulk/_item_question_radio.html.haml
quby-5.1.2 app/views/quby/v1/bulk/_item_question_radio.html.haml
quby-5.1.1 app/views/quby/v1/bulk/_item_question_radio.html.haml
quby-5.1.0 app/views/quby/v1/bulk/_item_question_radio.html.haml
quby-5.0.5 app/views/quby/v1/bulk/_item_question_radio.html.haml
quby-5.0.4 app/views/quby/v1/bulk/_item_question_radio.html.haml
quby-5.0.3 app/views/quby/v1/bulk/_item_question_radio.html.haml
quby-5.0.2 app/views/quby/v1/bulk/_item_question_radio.html.haml
quby-5.0.1 app/views/quby/v1/bulk/_item_question_radio.html.haml