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

47 lines
2.4 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|%>
<!--新建单选start-->
<div class="ur_editor radio">
<div class="ur_editor_title">
<label>问题:&nbsp;&nbsp;</label>
<input type="hidden" name="question_type" value="1"/>
<input maxlength="250" class="ur_question_title" type="text" name="poll_questions_title" id="poll_questions_title" placeholder="请输入单选题标题"/>
<input type="checkbox" name="is_necessary" value="true" checked/>
<label>必答</label>
</div>
<div class="ur_editor_content">
<ul>
<li class='ur_item'>
<label>选项<span class='ur_index'></span></label>
<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>
</li>
<div class='cl'></div>
<li class='ur_item'>
<label>选项<span class='ur_index'></span></label>
<input maxlength="200" type='text' name='question_answer[1]' placeholder='新建选项'/>
<a class='icon_add' title='向下插入选项' onclick='add_single_answer($(this));'></a>
<a class='icon_remove' title='删除' onclick='remove_single_answer($(this))'></a>
</li>
<div class='cl'></div>
<li class='ur_item'>
<label>选项<span class='ur_index'></span></label>
<input maxlength="200" type='text' name='question_answer[2]' placeholder='新建选项'/>
<a class='icon_add' title='向下插入选项' onclick='add_single_answer($(this));'></a>
<a class='icon_remove' title='删除' onclick='remove_single_answer($(this))'></a>
</li>
<div class='cl'></div>
</ul>
</div>
<div class="ur_editor_footer">
<a class="btn btn_dark btn_submit" data-button="ok" onclick="add_poll_question($(this));">
<%= l(:label_button_ok)%>
</a>
<a class="btn btn_light btn_cancel" data-button="cancel" onclick="$(this).parent().parent().parent().remove();">
<%= l(:button_cancel)%>
</a>
</div>
<div class="cl"></div>
</div>
<!--编辑单选 end-->
<% end%>