Sha256: c7af0f0b92bfc642fda29ab8c6162922049a2e6b223ad5278a2a5c1ad502b7a4
Contents?: true
Size: 1.18 KB
Versions: 9
Compression:
Stored size: 1.18 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 %> <% end %> </div> <% end %> </div>
Version data entries
9 entries across 9 versions & 1 rubygems