Sha256: 5d690eadd7d19f9328f3f45f592994b03278484a9af931c2b8915830dfcae30e
Contents?: true
Size: 973 Bytes
Versions: 33
Compression:
Stored size: 973 Bytes
Contents
-# frozen_string_literal: true = 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) - cls = [question.type] - cls << "subinput" if subquestion - cls << 'placeholder' if opt.placeholder - hash = {:value => opt.key, :class => cls, :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