Sha256: 3c7d4744f0065b9748c1afb5fdbc48e5a6192cdfc6df17670173f86f4696548a

Contents?: true

Size: 1.89 KB

Versions: 33

Compression:

Stored size: 1.89 KB

Contents

-# frozen_string_literal: true
- available_width = question.presentation == :horizontal ? 100 : 66
- if opt.inner_title
  %td.option{ :style => "width:#{available_width/(table.columns)}%"}= Quby::MarkdownParser.new(opt.description).html_safe
- else
  - checked = @answer.send(opt.key) == 1
  - return if( opt.hidden and not checked)
  - optionclasses =  [os_cycle]
  - optionclasses << question.question_group if question.question_group

  %td.option{:class => optionclasses, :style => "width:#{available_width/(table.columns)}%", :data => {:for => question.key}, :rowspan => question.row_span}
    .radiocheckwrapper
      - if question.uncheck_all_option == opt.key
        -attrs = {:onClick => "setAllCheckboxes(this.checked, '#{question.check_all_option}', '#{question.uncheck_all_option}', '#{question.key}', false); handleDisableCheckboxSubQuestions(this);"}
      - elsif question.check_all_option == opt.key
        -attrs = {:onClick => "setAllCheckboxes(this.checked, '#{question.check_all_option}', '#{question.uncheck_all_option}', '#{question.key}', true); handleDisableCheckboxSubQuestions(this);"}
      - else
        -attrs = {:onClick => "correctAllNothingCheckboxes(this.checked, '#{question.check_all_option}', '#{question.uncheck_all_option}'); handleDisableCheckboxSubQuestions(this);"}
      - attrs[:class] = question.type
      - attrs[:data] = {'field-key' => opt.key}
      = check_box(:answer, "#{opt.key}", attrs)

    -if question.table.show_option_desc
      .labelwrapper
        %label{for: opt.view_id}
          %span
            - if table.columns >= 10
              %br
            = Quby::MarkdownParser.new(opt.description).html_safe
    - subq = opt.questions.first
    - if subq and (subq.presentation != :next_to_title and subq.type == :string)
      %br
      = render :partial => "quby/v1/shared/inline_text_field", :locals => {:answer => @answer, :question => subq}
    = validations

Version data entries

33 entries across 33 versions & 1 rubygems

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