Sha256: 3c7d4744f0065b9748c1afb5fdbc48e5a6192cdfc6df17670173f86f4696548a

Contents?: true

Size: 1.89 KB

Versions: 34

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

34 entries across 34 versions & 1 rubygems

Version Path
quby-5.0.0 app/views/quby/v1/table/_item_option_check_box.html.haml
quby-4.0.4 app/views/quby/v1/table/_item_option_check_box.html.haml
quby-5.0.0.pre4 app/views/quby/v1/table/_item_option_check_box.html.haml
quby-5.0.0.pre3 app/views/quby/v1/table/_item_option_check_box.html.haml
quby-5.0.0.pre2 app/views/quby/v1/table/_item_option_check_box.html.haml
quby-5.0.0.pre1 app/views/quby/v1/table/_item_option_check_box.html.haml
quby-4.0.3 app/views/quby/v1/table/_item_option_check_box.html.haml
quby-4.0.2 app/views/quby/v1/table/_item_option_check_box.html.haml
quby-4.0.1 app/views/quby/v1/table/_item_option_check_box.html.haml
quby-4.0.0 app/views/quby/v1/table/_item_option_check_box.html.haml
quby-3.2.2 app/views/quby/v1/table/_item_option_check_box.html.haml
quby-3.2.1 app/views/quby/v1/table/_item_option_check_box.html.haml
quby-3.2.0 app/views/quby/v1/table/_item_option_check_box.html.haml
quby-3.2.0.pre.pre1 app/views/quby/v1/table/_item_option_check_box.html.haml