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

52 lines
2.5 KiB
Plaintext
Raw Normal View History

2015-01-16 15:34:25 +08:00
<%= form_for PollQuestion.new,:url =>create_poll_question_poll_path(@poll.id),:remote => true do |f|%>
2016-10-12 13:34:09 +08:00
<div class="questionContainer"> <!--编辑多行文字start-->
<div class="ur_editor_title">
<label for="ur_question_title" class="questionLabel mt8">问题:&nbsp;&nbsp;</label>
2015-01-16 15:34:25 +08:00
<input type="hidden" name="question_type" value="4"/>
2016-10-14 16:11:46 +08:00
<textarea maxlength="250" id="poll_questions_title_new" class="questionTitle w590" contenteditable="true" type="text" name="poll_questions_title" placeholder="请输入多行主观题的问题描述" oninput="autoHeight('#poll_questions_title_new',30)"></textarea>
2016-10-12 13:34:09 +08:00
<label>
<input name="is_necessary" value="true" checked type="checkbox">
必答
</label>
</div>
2016-10-12 13:34:09 +08:00
<div class="ur_editor_content">
<ul>
<li class="ur_item new_answer">
<label class="ml50">问题<span class="ur_index"></span>&nbsp;&nbsp;&nbsp;</label>
<input placeholder="请输入主观题分题的问题" style="width:520px;" type="text" name="question_answer[0]">
<a class="icon_remove" title="删除" onclick="remove_single_answer($(this))"></a> </li>
<div class="cl"></div>
<li class="ur_item new_answer">
<label class="ml50">问题<span class="ur_index"></span>&nbsp;&nbsp;&nbsp;</label>
<input placeholder="请输入主观题分题的问题" style="width:520px;" type="text" name="question_answer[1]">
<a class="icon_remove" title="删除" onclick="remove_single_answer($(this))"></a> </li>
<div class="cl"></div>
</ul>
<ul>
<li class="ur_item">
<div class="dash-block new-subjective" onclick='add_multi_question($(this));'>新建选项</div>
</li>
<div class="cl"></div>
</ul>
2015-01-16 15:34:25 +08:00
<!--<label>尺寸:</label>-->
<!--<label>宽 <input name="cols" type="number" min="1" value="60"> 字</label>,-->
<!--<label>高 <input name="rows" type="number" min="1" value="5"> 行</label>-->
</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>
</div>
<div class="cl"></div>
2015-01-16 15:34:25 +08:00
</div><!--编辑多行文字end-->
<% end%>
<script type="text/javascript">
$(function(){
$("#add_new_question_new").one('click', function(){
add_poll_question_new($(this));
});
});
</script>