Sha256: 670683ee39c74695a798aae127c6964d0716a42185c23a8b0085d2b7c506a934
Contents?: true
Size: 1.21 KB
Versions: 37
Compression:
Stored size: 1.21 KB
Contents
<div class="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="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: 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: maxlength %> <% end %> </div> <% end %> </div>
Version data entries
37 entries across 37 versions & 1 rubygems