Sha256: ceb2c9b405b13cd92361e81286cc3b01c099543a00fdd173c7058d39ae8003c4
Contents?: true
Size: 1.43 KB
Versions: 20
Compression:
Stored size: 1.43 KB
Contents
<%- if ["question_pages", "question_sheets", "elements"].include?(controller.controller_name) -%> <div class="droppable" data-url="<%= drop_fe_admin_question_sheet_page_element_path(@page.question_sheet_id, @page.id, yes_no.id) %>"> <%= render "fe/questions/fe/yes_no_field", yes_no: yes_no %> <ul class="questions" id="questions_list_<%= yes_no.id %>" data-sortable="true" data-sortable-url="<%= reorder_fe_admin_question_sheet_page_elements_path(@page.question_sheet_id, @page.id) %>" data-sortable-handle=".handle"> <%= render partial: "fe/admin/question_pages/element", collection: yes_no.elements, locals: {in_grid: true} %> </ul> </div> <% else %> <%= render "fe/questions/fe/yes_no_field", yes_no: yes_no %> <ul class="questions" id="questions_list_<%= yes_no.id %>" style="<%= yes_no.has_answer?(1,@answer_sheet) ? "" : "display:none" %>"> <%= render partial: "fe/answer_pages/element", collection: yes_no.elements, locals: {in_grid: false, in_conditional: true} %> </ul> <script type="text/javascript" charset="utf-8"> $(document).on("click", "#<%= dom_id(yes_no) %>_1", function() {$("#questions_list_<%= yes_no.id %>").show(); $("input", "#questions_list_<%= yes_no.id %>").addClass("required"); }); $(document).on("click", "#<%= dom_id(yes_no) %>_0", function() {$("#questions_list_<%= yes_no.id %>").hide(); $("input", "#questions_list_<%= yes_no.id %>").removeClass("required"); }); </script> <% end %>
Version data entries
20 entries across 15 versions & 1 rubygems