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

Version Path
quby-5.6.5 app/views/quby/v1/bulk/_item_question_select.html.haml
quby-5.6.3 app/views/quby/v1/bulk/_item_question_select.html.haml
quby-5.6.2 app/views/quby/v1/bulk/_item_question_select.html.haml
quby-5.6.1 app/views/quby/v1/bulk/_item_question_select.html.haml
quby-5.6.0 app/views/quby/v1/bulk/_item_question_select.html.haml
quby-5.5.0 app/views/quby/v1/bulk/_item_question_select.html.haml
quby-5.4.0 app/views/quby/v1/bulk/_item_question_select.html.haml
quby-5.3.1 app/views/quby/v1/bulk/_item_question_select.html.haml
quby-5.3.0 app/views/quby/v1/bulk/_item_question_select.html.haml
quby-5.2.0 app/views/quby/v1/bulk/_item_question_select.html.haml
quby-5.1.3 app/views/quby/v1/bulk/_item_question_select.html.haml
quby-5.1.2 app/views/quby/v1/bulk/_item_question_select.html.haml
quby-5.1.1 app/views/quby/v1/bulk/_item_question_select.html.haml
quby-5.1.0 app/views/quby/v1/bulk/_item_question_select.html.haml
quby-5.0.5 app/views/quby/v1/bulk/_item_question_select.html.haml
quby-5.0.4 app/views/quby/v1/bulk/_item_question_select.html.haml
quby-5.0.3 app/views/quby/v1/bulk/_item_question_select.html.haml
quby-5.0.2 app/views/quby/v1/bulk/_item_question_select.html.haml
quby-5.0.1 app/views/quby/v1/bulk/_item_question_select.html.haml
quby-5.0.0 app/views/quby/v1/bulk/_item_question_select.html.haml