Sha256: 681761cfc21ae1901fe8e0d8ce1b7429f002158f8292f7ea262a09eee155c1f2
Contents?: true
Size: 1 KB
Versions: 33
Compression:
Stored size: 1 KB
Contents
-# frozen_string_literal: true - available_width = question.presentation == :horizontal ? 100 : 66 - classes = [os_cycle] - classes << question.question_group if question.question_group - itemkey = "item_#{question.key}" %td.item{:id => itemkey, :class => classes, :style => "width:#{available_width/(table.columns)}%", :rowspan => question.row_span, :data => question.extra_data} .fields{:class => question.type, :id => question.html_id} %select{:name => "answer[#{question.key}]", :onchange => "$(\"#answer_#{question.key}_\"+this.value).trigger(\"click\")", :data => {'field-key' => question.key}} -question.options.each do |opt| - checked = @answer.send(question.key) == opt.key.to_s - next if (opt.hidden and not checked) - cls = [question.type] - cls << 'placeholder' if opt.placeholder - hash = {:value => opt.key, :class => cls, :id => opt.view_id } - hash[:selected] = 'selected' if checked %option{hash} =opt.description = validations
Version data entries
33 entries across 33 versions & 1 rubygems