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

52 lines
2.5 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<%= form_for PollQuestion.new,:url =>create_poll_question_poll_path(@poll.id),:remote => true do |f|%>
<div class="questionContainer"> <!--编辑多行文字start-->
<div class="ur_editor_title">
<label for="ur_question_title" class="questionLabel mt8">问题:&nbsp;&nbsp;</label>
<input type="hidden" name="question_type" value="4"/>
<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>
<label>
<input name="is_necessary" value="true" checked type="checkbox">
必答
</label>
</div>
<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>
<!--<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">
<a class="grey_btn fr borderRadius" data-button="cancel" onclick="$(this).parent().parent().parent().remove();">
<%= l(:button_cancel)%>
</a>
<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>
</div><!--编辑多行文字end-->
<% end%>
<script type="text/javascript">
$(function(){
$("#add_new_question_new").one('click', function(){
add_poll_question_new($(this));
});
});
</script>