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