Sha256: 3c19f1419eab07df9e9fefdd3ee4f757eec2047819c0be04e4ff2edbcb60dba6
Contents?: true
Size: 1 KB
Versions: 33
Compression:
Stored size: 1 KB
Contents
-# frozen_string_literal: true %label.main(for="answer_#{question.key}") = render :partial => "quby/v1/shared/main_label", :locals => {:question => question} .description-and-fields .description - unless question.description.blank? = Quby::MarkdownParser.new(question.description).html_safe .fields{: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) - classes = [] - classes << 'subinput' if subquestion - classes << 'placeholder' if opt.placeholder - hash = {:value => opt.key, :class => classes, :disabled => disabled ? "" : nil, :id => opt.view_id} - hash[:selected] = 'selected' if @answer.send(question.key) == opt.key.to_s %option{hash} =opt.description
Version data entries
33 entries across 33 versions & 1 rubygems