Sha256: 1b47f68496420866bf2953038758426e4fdc2b5912c16a8e6a9fea8a688dc6e5
Contents?: true
Size: 1.08 KB
Versions: 18
Compression:
Stored size: 1.08 KB
Contents
<div class="answer-questionnaire__single-option js-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="js-collection-input"> <%= label_tag do %> <%= check_box_tag "questionnaire[responses][#{answer_idx}][choices][#{idx}][body]", translated_attribute(answer_option.body), choice.present?, 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:, class: "w-full" %> <% end %> </div> <% end %> </div>
Version data entries
18 entries across 18 versions & 1 rubygems