48 lines
2.3 KiB
Plaintext
48 lines
2.3 KiB
Plaintext
<script>
|
|
|
|
</script>
|
|
<div class="ur_question_item radio ur_editor02">
|
|
<div class="ur_title">
|
|
<span class="title_index">
|
|
第<%= poll_question.question_number%>题:
|
|
</span>
|
|
<%= poll_question.question_title %>
|
|
<span class="title_index">[单选题]</span>
|
|
<%if poll_question.is_necessary == 1%>
|
|
<span class="ur_required" title="必答">*</span>
|
|
<%end%>
|
|
</div>
|
|
|
|
<%= link_to("", delete_poll_question_poll_index_path(:poll_question => poll_question.id),
|
|
method: :delete, :confirm => l(:text_are_you_sure), :remote => true, :class => "ur_icon_de") %>
|
|
<a class="ur_icon_edit" title="编辑" onclick="pollQuestionEdit(<%= poll_question.id%>);"></a>
|
|
<a class='ur_icon_add' title='向下插入' id="add_mc_<%=poll_question.id%>" onclick="chooseQuestionType('mc',<%=poll_question.id%>);"></a>
|
|
<div class="cl"></div>
|
|
<div class="ur_inputs">
|
|
<table class="ur_table" >
|
|
<tbody>
|
|
<% poll_question.poll_answers.reorder("answer_position").each do |poll_answer| %>
|
|
<tr>
|
|
<td>
|
|
<label>
|
|
<input class="ur_radio" type="radio" name="<%= poll_question %>" value="<%= poll_answer.answer_text%>" >
|
|
<%= poll_answer.answer_text%>
|
|
</label>
|
|
</td>
|
|
</tr>
|
|
<% end %>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div><!--单选题显示 end-->
|
|
<!-- 新增问题 -->
|
|
<div id="insert_new_poll_question_mc_<%=poll_question.id%>">
|
|
</div>
|
|
<div id="div_mc_<%=poll_question.id%>" style="width: 50px;border: 1px solid #cbcbcb; display:none;position: absolute;padding: 5px;background: white">
|
|
<ul>
|
|
<li><a href="javascript:void(0);" onclick=" dismiss('mc',<%=poll_question.id%>);insert_MC('mc',<%=poll_question.question_number%>,<%=poll_question.id%>);">单选</a></li>
|
|
<li><a href="javascript:void(0);" onclick=" dismiss('mc',<%=poll_question.id%>);insert_MCQ('mc',<%=poll_question.question_number%>,<%=poll_question.id%>);">多选</a></li>
|
|
<li><a href="javascript:void(0);" onclick=" dismiss('mc',<%=poll_question.id%>);insert_SINGLE('mc',<%=poll_question.question_number%>,<%=poll_question.id%>);">单行主观</a></li>
|
|
<li><a href="javascript:void(0);" onclick=" dismiss('mc',<%=poll_question.id%>);insert_MULIT('mc',<%=poll_question.question_number%>,<%=poll_question.id%>);">多行主观</a></li>
|
|
</ul>
|
|
</div> |