socialforge/app/views/poll/_show_MC.html.erb

42 lines
1.8 KiB
Plaintext
Raw Normal View History

2016-10-11 08:51:00 +08:00
<div>
<div class="testEditTitle">
<span class="questionLabel">第<%= poll_question.question_number%>题:</span>
<span class="formatContainer m_w500"><%= poll_question.question_title %></span>
<%if poll_question.is_necessary == 1%>
<span class="c_red questionLabel ml5" title="必答">*</span>
<%end%>
2015-01-13 18:21:46 +08:00
</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") %>
2015-01-15 16:44:35 +08:00
<a class="ur_icon_edit" title="编辑" onclick="pollQuestionEdit(<%= poll_question.id%>);"></a>
2016-10-12 13:34:09 +08:00
<a class='ur_icon_add' title='向下插入' id="add_mc_<%=poll_question.id%>" onclick="dismiss('mc',<%=poll_question.id%>);insert_MC('mc',<%=poll_question.question_number%>,<%=poll_question.id%>);"></a>
2015-01-13 18:21:46 +08:00
<div class="cl"></div>
<div class="ur_inputs">
<table class="ur_table" style="width:647px;">
2015-01-13 18:21:46 +08:00
<tbody>
<% poll_question.poll_answers.reorder("answer_position").each do |poll_answer| %>
<tr>
<td>
2016-10-11 08:51:00 +08:00
<% if poll_answer.answer_text != '' %>
<label>
<input class="ur_radio" type="radio" name="<%= poll_question %>" value="<%= poll_answer.answer_text%>" >
<%= poll_answer.answer_text%>
</label>
<% else %>
<label>
2016-10-12 13:34:09 +08:00
<input class="ur_radio" name="<%= poll_question %>" value="" type="radio">
2016-10-11 08:51:00 +08:00
</label>
<input placeholder="其它" readonly="readonly" class="disabled questionnaire-input w300" type="text">
<% end %>
</td>
</tr>
<% end %>
2015-01-13 18:21:46 +08:00
</tbody>
</table>
</div>
</div><!--单选题显示 end-->
<!-- 新增问题 -->
<div id="insert_new_poll_question_mc_<%=poll_question.id%>">
</div>