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.27.9 app/views/decidim/forms/questionnaires/answers/_multiple_option.html.erb
decidim-forms-0.27.8 app/views/decidim/forms/questionnaires/answers/_multiple_option.html.erb
decidim-forms-0.27.7 app/views/decidim/forms/questionnaires/answers/_multiple_option.html.erb
decidim-forms-0.27.6 app/views/decidim/forms/questionnaires/answers/_multiple_option.html.erb
decidim-forms-0.26.10 app/views/decidim/forms/questionnaires/answers/_multiple_option.html.erb
decidim-forms-0.26.9 app/views/decidim/forms/questionnaires/answers/_multiple_option.html.erb
decidim-forms-0.27.5 app/views/decidim/forms/questionnaires/answers/_multiple_option.html.erb
decidim-forms-0.26.8 app/views/decidim/forms/questionnaires/answers/_multiple_option.html.erb
decidim-forms-0.27.4 app/views/decidim/forms/questionnaires/answers/_multiple_option.html.erb
decidim-forms-0.27.3 app/views/decidim/forms/questionnaires/answers/_multiple_option.html.erb
decidim-forms-0.26.7 app/views/decidim/forms/questionnaires/answers/_multiple_option.html.erb
decidim-forms-0.26.5 app/views/decidim/forms/questionnaires/answers/_multiple_option.html.erb
decidim-forms-0.27.2 app/views/decidim/forms/questionnaires/answers/_multiple_option.html.erb
decidim-forms-0.27.1 app/views/decidim/forms/questionnaires/answers/_multiple_option.html.erb
decidim-forms-0.26.4 app/views/decidim/forms/questionnaires/answers/_multiple_option.html.erb
decidim-forms-0.27.0 app/views/decidim/forms/questionnaires/answers/_multiple_option.html.erb
decidim-forms-0.26.3 app/views/decidim/forms/questionnaires/answers/_multiple_option.html.erb
decidim-forms-0.27.0.rc2 app/views/decidim/forms/questionnaires/answers/_multiple_option.html.erb
decidim-forms-0.27.0.rc1 app/views/decidim/forms/questionnaires/answers/_multiple_option.html.erb
decidim-forms-0.26.2 app/views/decidim/forms/questionnaires/answers/_multiple_option.html.erb