Sha256: f4c163562dfb0f71d18f16ec3c349faaf8f817ec342771f54e20446c2b356d6d

Contents?: true

Size: 983 Bytes

Versions: 37

Compression:

Stored size: 983 Bytes

Contents

<div class="check-box-collection">
  <% answer.question.answer_options.each_with_index do |answer_option, idx| %>
    <% choice = answer.selected_choices.find { |choice| choice.answer_option_id == answer_option.id } %>

    <div class="collection-input">
      <%= label_tag do %>
        <%= check_box_tag "questionnaire[responses][#{answer_idx}][choices][#{idx}][body]",
                          translated_attribute(answer_option.body),
                          choice.present?, disabled: disabled %>

        <%= translated_attribute(answer_option.body) %>

        <%= hidden_field_tag "questionnaire[responses][#{answer_idx}][choices][#{idx}][answer_option_id]", answer_option.id %>
      <% end %>

      <% if answer_option.free_text %>
        <%= text_field_tag "questionnaire[responses][#{answer_idx}][choices][#{idx}][custom_body]",
        choice.try(:custom_body),
        disabled: true,
        maxlength: maxlength %>
      <% end %>
    </div>
  <% end %>
</div>

Version data entries

37 entries across 37 versions & 1 rubygems

Version Path
decidim-forms-0.26.1 app/views/decidim/forms/questionnaires/answers/_multiple_option.html.erb
decidim-forms-0.26.0 app/views/decidim/forms/questionnaires/answers/_multiple_option.html.erb
decidim-forms-0.26.0.rc2 app/views/decidim/forms/questionnaires/answers/_multiple_option.html.erb
decidim-forms-0.26.0.rc1 app/views/decidim/forms/questionnaires/answers/_multiple_option.html.erb
decidim-forms-0.25.2 app/views/decidim/forms/questionnaires/answers/_multiple_option.html.erb
decidim-forms-0.25.1 app/views/decidim/forms/questionnaires/answers/_multiple_option.html.erb
decidim-forms-0.25.0 app/views/decidim/forms/questionnaires/answers/_multiple_option.html.erb
decidim-forms-0.25.0.rc4 app/views/decidim/forms/questionnaires/answers/_multiple_option.html.erb
decidim-forms-0.25.0.rc3 app/views/decidim/forms/questionnaires/answers/_multiple_option.html.erb
decidim-forms-0.25.0.rc2 app/views/decidim/forms/questionnaires/answers/_multiple_option.html.erb
decidim-forms-0.25.0.rc1 app/views/decidim/forms/questionnaires/answers/_multiple_option.html.erb
decidim-forms-0.24.3 app/views/decidim/forms/questionnaires/answers/_multiple_option.html.erb
decidim-forms-0.24.2 app/views/decidim/forms/questionnaires/answers/_multiple_option.html.erb
decidim-forms-0.24.1 app/views/decidim/forms/questionnaires/answers/_multiple_option.html.erb
decidim-forms-0.24.0 app/views/decidim/forms/questionnaires/answers/_multiple_option.html.erb
decidim-forms-0.24.0.rc2 app/views/decidim/forms/questionnaires/answers/_multiple_option.html.erb
decidim-forms-0.24.0.rc1 app/views/decidim/forms/questionnaires/answers/_multiple_option.html.erb