Sha256: b6ef059cff2ef147edd9d20eeb65ceab1c25f61e82557669ad3de6d6fedc8a75
Contents?: true
Size: 1.36 KB
Versions: 13
Compression:
Stored size: 1.36 KB
Contents
<div class="answer-questionnaire__single-option js-radio-button-collection"> <% choice = answer.choices.first %> <% answer.question.answer_options.each_with_index do |answer_option, idx| %> <% choice_id = "#{field_id}_choices_#{idx}" %> <div class="js-collection-input"> <%= label_tag "#{choice_id}_body" do %> <%= radio_button_tag "questionnaire[responses][#{answer_idx}][choices][][body]", translated_attribute(answer_option.body), answer_option.id == choice.try(:answer_option_id), id: "#{choice_id}_body", disabled: %> <%= translated_attribute(answer_option.body) %> <%= hidden_field_tag "questionnaire[responses][#{answer_idx}][choices][][answer_option_id]", answer_option.id, id: "#{choice_id}_answer_option", disabled: true %> <% end %> <% if answer_option.free_text %> <%= text_field_tag "questionnaire[responses][#{answer_idx}][choices][][custom_body]", choice.try(:custom_body), id: "#{choice_id}_custom_body", disabled: true, maxlength:, class: "w-full" %> <% end %> </div> <% end %> </div>
Version data entries
13 entries across 13 versions & 1 rubygems