2015-01-15 14:40:17 +08:00
|
|
|
|
<%= form_for PollQuestion.new,:url =>create_poll_question_poll_path(@poll.id),:remote => true do |f|%>
|
2015-01-16 14:39:40 +08:00
|
|
|
|
<!--新建单选start-->
|
2015-07-28 10:27:45 +08:00
|
|
|
|
<% insert_begin = insert_begin %>
|
2016-10-10 14:13:20 +08:00
|
|
|
|
<div class="questionContainer">
|
2015-01-15 16:10:24 +08:00
|
|
|
|
<div class="ur_editor_title">
|
2016-10-14 14:50:51 +08:00
|
|
|
|
<label class="questionLabel mt8">问题: </label>
|
2015-01-15 16:10:24 +08:00
|
|
|
|
<input type="hidden" name="question_type" value="1"/>
|
2016-10-14 16:11:46 +08:00
|
|
|
|
<textarea maxlength="250" class="questionTitle w590" type="text" name="poll_questions_title" id="poll_questions_title_new" placeholder="请输入单选题题目" oninput="autoHeight('#poll_questions_title_new',30)"></textarea>
|
2015-01-15 16:10:24 +08:00
|
|
|
|
<input type="checkbox" name="is_necessary" value="true" checked/>
|
|
|
|
|
<label>必答</label>
|
2015-01-15 14:40:17 +08:00
|
|
|
|
</div>
|
2015-01-15 16:10:24 +08:00
|
|
|
|
<div class="ur_editor_content">
|
2016-10-12 13:34:09 +08:00
|
|
|
|
<ul>
|
2016-10-10 14:13:20 +08:00
|
|
|
|
<li class='ur_item new_answer'>
|
2015-03-24 16:56:39 +08:00
|
|
|
|
<label>选项<span class='ur_index'></span>: </label>
|
2016-10-10 14:13:20 +08:00
|
|
|
|
<input maxlength="200" type='text' name='question_answer[0]' placeholder='输入选项内容'/>
|
|
|
|
|
<!--<a class='icon_add' title='向下插入选项' onclick='add_single_answer($(this));'></a>-->
|
|
|
|
|
<a class='icon_remove' title='删除' onclick='remove_single_answer($(this))'></a>
|
2015-01-15 16:10:24 +08:00
|
|
|
|
</li>
|
|
|
|
|
<div class='cl'></div>
|
2016-10-10 14:13:20 +08:00
|
|
|
|
<li class='ur_item new_answer'>
|
2015-03-24 16:56:39 +08:00
|
|
|
|
<label>选项<span class='ur_index'></span>: </label>
|
2016-10-10 14:13:20 +08:00
|
|
|
|
<input maxlength="200" type='text' name='question_answer[1]' placeholder='输入选项内容'/>
|
|
|
|
|
<!--<a class='icon_add' title='向下插入选项' onclick='add_single_answer($(this));'></a>-->
|
2015-01-15 16:10:24 +08:00
|
|
|
|
<a class='icon_remove' title='删除' onclick='remove_single_answer($(this))'></a>
|
|
|
|
|
</li>
|
|
|
|
|
<div class='cl'></div>
|
2016-10-10 14:13:20 +08:00
|
|
|
|
<li class='ur_item new_answer'>
|
2015-03-24 16:56:39 +08:00
|
|
|
|
<label>选项<span class='ur_index'></span>: </label>
|
2016-10-10 14:13:20 +08:00
|
|
|
|
<input maxlength="200" type='text' name='question_answer[2]' placeholder='输入选项内容'/>
|
|
|
|
|
<!--<a class='icon_add' title='向下插入选项' onclick='add_single_answer($(this));'></a>-->
|
2015-01-15 16:10:24 +08:00
|
|
|
|
<a class='icon_remove' title='删除' onclick='remove_single_answer($(this))'></a>
|
|
|
|
|
</li>
|
|
|
|
|
<div class='cl'></div>
|
|
|
|
|
</ul>
|
2016-10-10 14:13:20 +08:00
|
|
|
|
<ul>
|
|
|
|
|
<li class="ur_item">
|
|
|
|
|
<div class="dash-block new-question" onclick='add_single_answer($(this));'>新建选项</div>
|
|
|
|
|
</li>
|
|
|
|
|
<div class='cl'></div>
|
|
|
|
|
<li class="ur_item">
|
|
|
|
|
<a href="javascript:void(0);" class="ml50 fontGrey2" onclick='add_other_answer($(this))'>添加[其他]选项</a>
|
|
|
|
|
</li>
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
</ul>
|
2015-01-15 16:10:24 +08:00
|
|
|
|
</div>
|
|
|
|
|
<div class="ur_editor_footer">
|
2016-10-12 13:34:09 +08:00
|
|
|
|
<a class="grey_btn fr borderRadius" data-button="cancel" onclick="$(this).parent().parent().parent().remove();">
|
2015-01-27 10:14:05 +08:00
|
|
|
|
<%= l(:button_cancel)%>
|
|
|
|
|
</a>
|
2016-10-12 13:34:09 +08:00
|
|
|
|
<a class="blue_btn fr borderRadius mr5" data-button="ok" id="add_new_question_new">
|
|
|
|
|
<%= l(:label_button_ok)%>
|
|
|
|
|
</a>
|
2015-01-15 16:10:24 +08:00
|
|
|
|
</div>
|
|
|
|
|
<div class="cl"></div>
|
2015-01-15 14:40:17 +08:00
|
|
|
|
</div>
|
2015-01-15 16:10:24 +08:00
|
|
|
|
<!--编辑单选 end-->
|
2016-05-13 16:50:41 +08:00
|
|
|
|
<% end%>
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
|
$(function(){
|
|
|
|
|
$("#add_new_question_new").one('click', function(){
|
|
|
|
|
add_poll_question_new($(this));
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
</script>
|