85 lines
3.9 KiB
Plaintext
85 lines
3.9 KiB
Plaintext
<%= form_for PollQuestion.new,:url =>create_poll_question_poll_path(@poll.id),:remote => true do |f|%><!--新建多选start-->
|
||
<div class="questionContainer">
|
||
<div class="ur_editor_title">
|
||
<label class="questionLabel mt8">问题: </label>
|
||
<input type="hidden" name="question_type" value="2"/>
|
||
<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>
|
||
<input type="checkbox" name="is_necessary" value="true" checked/>
|
||
<label>必答</label>
|
||
</div>
|
||
<div class="ur_editor_content">
|
||
<ul>
|
||
<li class='ur_item new_answer'>
|
||
<label>选项<span class='ur_index'></span>: </label>
|
||
<input maxlength="200" type='text' name='question_answer[0]' placeholder='新建选项'/>
|
||
<a class='icon_remove' title='删除' onclick='remove_single_answer($(this))'></a>
|
||
</li>
|
||
<div class='cl'></div>
|
||
<li class='ur_item new_answer'>
|
||
<label>选项<span class='ur_index'></span>: </label>
|
||
<input maxlength="200" type='text' name='question_answer[1]' placeholder='新建选项'/>
|
||
<a class='icon_remove' title='删除' onclick='remove_single_answer($(this))'></a>
|
||
</li>
|
||
<div class='cl'></div>
|
||
<li class='ur_item new_answer'>
|
||
<label>选项<span class='ur_index'></span>: </label>
|
||
<input maxlength="200" type='text' name='question_answer[2]' placeholder='新建选项'/>
|
||
<a class='icon_remove' title='删除' onclick='remove_single_answer($(this))'></a>
|
||
</li>
|
||
<div class='cl'></div>
|
||
</ul>
|
||
<ul>
|
||
<li class='ur_item'>
|
||
<div class="fl mr30">
|
||
<label>下限<span class='ur_index'></span>: </label>
|
||
<select name="min_choices" class="poll-multiple-limit">
|
||
<option value="0">不限</option>
|
||
<option value="1">1</option>
|
||
<option value="2">2</option>
|
||
<option value="3">3</option>
|
||
</select>
|
||
<span class="fontGrey2">(可选)答题时最少选几项</span>
|
||
</div>
|
||
</li>
|
||
<div class="cl"></div>
|
||
<li class='ur_item'>
|
||
<div class="fl mr30">
|
||
<label>上限<span class='ur_index'></span>: </label>
|
||
<select name="max_choices" class="poll-multiple-limit">
|
||
<option value="0">不限</option>
|
||
<option value="1">1</option>
|
||
<option value="2">2</option>
|
||
<option value="3">3</option>
|
||
</select>
|
||
<span class="fontGrey2">(可选)答题时最多选几项</span><span class="c_red ml10" id="choices_notice"></span>
|
||
</div>
|
||
</li>
|
||
<div class="cl"></div>
|
||
<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>
|
||
</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> |