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

29 lines
1.3 KiB
Plaintext

<%= 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="3"/>
<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_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>